Graphical User Interface

Spectro package contains sviewer - the graphical user interface for the interactive spectral data analysis. It is located in the separate folder sviewer.

Run

sviewer GUI can be run using path/to/spectro/sviewer/__main__.py, for example:

$ path/to/python.exe path/to/spectro/sviewer/__main__.py

Alternatively, one can use convenient IDE to run the __main__.py, for example PyCharms, Spider, MScode, etc.

Main window

The main window of sviewer is typically looks like

_images/main.png

where numbers highlight the following parts of GUI:

  1. Main menu
  2. Residuals panel
  3. Spectrum panel
  4. Control panel
  5. Console
  6. Status bar

Residuals panel

It shows the residuals between spectrum and the fit model. It has shared x-axis with the Spectrum panel. Residuals panel can be shown/hide by pressing F4 or view/Residuals in the Main Menu. The blue area and green line in the left of this panel show the kde of the residual distribution, that is calculated using pixels from the whole spectrum and from the view window only, respectively. The red line shows the gaussian function with unit dispersion, that should be approaching in case of good fit. Note: that consistency between blue and red lines are not necessary means relaible fit, since you also need to control the structure in residuals.

Spectrum panel

Tha main interactive window to work with the spectra. It shows the spectrum and the fit model and different graphical objects suitable for the spectral analysis. It is build on the base of PlotWidget class from the pyqtgraph package. The interaction process is quite essential, but the description of the main features of the interaction module can be find in the pyqtgraph manual, for example mouse interaction.

Control panel

This panel contains some useful buttons for the spectral analysis, including:

  1. Redshift line edit field: input the redshift for the line markers shown in Spectrum panel. The redshift also can be changed either by moving line markers SHIFT``+ drag or by using ``LEFT and RIGHT keys on the keyboard (and also with SHIFT+LEFT and SHIFT+RIGHT).
  2. Normilize: switch between normalized and raw views (where continuum is explicitly shown), i.e. NORMALIZED = I/I_0
  3. Substract: switch between substacted and raw views, i.e. SUBSTARCTED = I-I_0
  4. AOD: switch between aparent optical depth and raw views, i.e. AOD = np.ln(-I/I_0)
  5. Fit: start the fit using LM minimization routine.
  6. SAS: open spectrum in SDSS science archive server (only for SDSS spectra)
  7. SkyS: open spectrum in SDSS sky server (only for SDSS spectra)
  8. ESO: open spectrum in ESO data archive (not avaliable yet)
  9. NIST: show the list of the possible lines avaliable in The NIST database which can be located within the Region object within Spectrum panel taking into account specified redshift.

Console

It allows to input commands moslty concerned with GUI management. For the detailed descriptions see Console.

Status bar

Status bar shows some messages and indicate some useful numbers that are can be instructive during the fitting process, e.g. the number of the current fit component, chi^2/dof, etc