The BAA Solar Section observation databases


Each month over 50 BAA solar observers submit their daily observations to the Solar Section, which need to be collated to form the summary tables published in the Section’s monthly Newsletter and in the ‘Notes and News’ section of the Journal. These observations are also used for monitoring the longer-term activity of the solar cycle. The collation has been quite time consuming due to it being a manual process, even though the majority of observers submitted their observations using a standard Excel spreadsheet template.

During a conversation between the Section Director Lyn Smith and the author, the idea of developing a web-based online form and database for the submission and collation of solar observations was suggested. In fact, two online forms and databases were developed: one for white light observations and the other for hydrogen alpha observations.

After extensive testing, the online forms have been successfully used by the majority of BAA solar observers since 2018 April. This has considerably eased the Director’s data collation task each month. In addition, the databases enable the individual observer to easily retrieve their previous observations and view these via a graphical plot.



Both online forms were initially based on that used by the Solar Influences Data Analysis Center (SIDC),1 for the submission of white light observations that are used for determining the International Sunspot Number from solar observers around the globe,2 including BAA observers. The SIDC form has been extensively altered to be compatible with the layout of the previously-used Excel form, together with additional outputs for both the observer and the Director.

The project used XAMPP,3 a popular PHP development environment. PHP is a widely-used open-source, general-purpose scripting language that is especially suited for web development and can be embedded into HTML web pages. This includes an offline web server and a MySQL database, enabling the two forms and databases to be developed and tested. The Sublime Text editor environment was used to easily edit a number of PHP web pages that form the new database system.4 Graphical output was created using Highcharts.5

The main pages created are listed as follows.

registration.php – for initial registration using a username, e-mail address and password (encrypted). Includes HTML and PHP.

login.php – to enable access to the observation forms. Includes HTML and PHP.

index.php – the main form page, where observations are entered for a user-selected month (defaults to the current month). Includes HTML, PHP, JavaScript (for checking of input errors) and SQL (for database submission and retrieval).

actions.php – used following the submission of observations, to display graphical output. Includes HTML, PHP and SQL.

summary.php – a summary page for the Director, giving all the required tables for the Newsletter and Journal. Includes HTML, PHP and SQL.

logout.php – for logging out of the databases. Includes PHP.

Linked with the PHP web pages are a number of MySQL database tables, given below.

users – username, password, e-mail address, name, white light telescope, hydrogen alpha telescope and brief location.

WLDaily – username, year, month, day and daily white light data.

WLMDF – username, year, month and monthly white light data.

WLDailySummary – year, month, day and observer; averaged daily white light data.

WLMDFSummary – year, month and observer; averaged monthly white light data.

HaDaily – username, year, month, day and daily hydrogen alpha data.

HaMDF – username, year, month and monthly hydrogen alpha data.

Note that the two white light summary tables are only used to generate a long-term activity graph based on all submitted observations (a similar graph is not produced for hydrogen alpha).

Following the initial development, the web pages were transferred to a sub-domain of the author’s own website for testing by a few BAA observers. This proved very useful, as a few problems were identified and improvements made based on feedback. The final step was to transfer the web pages to the BAA website, so that all the Association’s solar observers could switch from using the Excel spreadsheets to the new online databases via a link from the Solar Section website and the Newsletter. A presentation was prepared and provided to observers on how to use the online forms and databases.

(Login or click above to view the full illustrated article in PDF format)

The British Astronomical Association supports amateur astronomers around the UK and the rest of the world. Find out more about the BAA or join us.