It gives me great pleasure to write this post about the SunPy Database Browser, that I developed as part of the Google Summer of Code'14 for the organization SunPy. It has been a wonderful and I feel delighted to say that the first version is ready. I have developed the plug-in as a plug-in with Ginga, an astronomical FITS file viewer, so as to enable side-by-side viewing and manipulation of Solar FITS files. The plug-in is wrapped as a Python package 'ginga-sunpy' which can be easily installed by the following steps:
- First install Ginga if you don't have it already.
- Download the code (or clone this repo).
-
To install
- For general use, from the ginga-sunpy directory run
python setup.py install
. - For developers, from the ginga-sunpy directory run
python setup.py develop
. - Run
ginga-sunpy
from your command-line and Ginga will open with the SunPy plug-in running.
The following database parameters are needed by the plug-in to connect to the database: - For general use, from the ginga-sunpy directory run
- Driver: Database name such as mysql, oracle, postgresql, etc., and driver the name of a DBAPI, such as psycopg2, pyodbc, cx_oracle, etc.”
- Database Name: Name of the database to which to connect. (Can also specify the path to the database here)
- User: Username of the user
- Password: Password of the User
Optional Parameters
- Default Wavelength Unit
- Set Database as default
Actions
- Connect: Connects to a database based on passed arguments. Defaults to sqlite:///sunpydb
- Add file to Database: Adds new entries to database based on the selected file from a File Dialog Box
- View Database: Opens a new tab with tabular display of database entries
- Open Database: Connects to a sqlite database selected from a File Dialog Box
- Commit to Database: Commits the new entries added, changes made to the database
Database Table
-
Entries are displayed one-per row
-
- The following attributes are displayed
- id
- path
- observation_time_start
- observation_time_end
- instrument
- min_wavelength
- max_wavelength
- is_starred
-
On clicking on any database entry's row, the FITS file associated to that entry opens in Ginga
-
Can display only the starred entires by selecting the 'Show starred entries only' checkbox below the table
The repository can be found at https://github.com/sunpy/ginga-sunpy