pypeit.display.spec1dview module
Spec1dView is a plugin for the Ginga viewer that provides functionality for visualizing and analyzing 1D spectra from FITS files. The plugin allows users to plot spectra, identify spectral lines from various line lists, and customize the display according to different parameters.
Plugin Type: Local
Spec1dView is a local plugin, which means it is associated with a specific channel in the Ginga viewer. An instance of the plugin can be opened for each channel, allowing for multiple spectra to be analyzed simultaneously.
Usage
Load and visualize 1D spectra from FITS files.
Customize the display by selecting different line lists, extraction types, and flux/mask settings.
Update the redshift to shift the spectral lines accordingly.
Editing
Users can modify the visualization by:
Choosing from a variety of line lists to identify spectral features.
Selecting different types of extraction methods (OPT, BOX).
Applying or removing flux calibration and masking options.
Updating the redshift value to reflect the observed wavelengths.
UI
The user interface provides controls for:
Selecting the line list from a combobox.
Entering a redshift value to shift the spectrum.
Choosing the extraction type, flux calibration, and masking options via comboboxes.
Buttons to load a FITS file and clear the current selection.
Tips
Use the comboboxes to switch between different line lists and adjust the spectrum display settings.
Ensure that the correct FITS file path is entered before attempting to load the data.
- class pypeit.display.spec1dview.Spec1dView(fv, fitsimage)[source]
Bases:
LocalPlugin- build_gui(container)[source]
Construct the UI in the plugin container.
This get’s called just prior to the
startmethod when the plugin is activated.
- plot_lines()[source]
Plot the line list.
Lines are made into a single compound object so that it is easier to remove them as a group if the line list is changed.
- process_file(filepath)[source]
Process filepath creating SpecObjs (a series of extensions), which can then have data extracted and plotted.
- recalc()[source]
Reprocess the chosen extension, based on current choices for extraction method, fluxing and masking.
Replot everything as a result.
- redo()[source]
Method called when a new FITS image or extension is loaded into the channel.
We do some minimal checks to make sure that it is a table, then call the routine to process the file that is behind this table.
- set_exten_cb(w, val)[source]
Callback for changing the extension in the UI.
Try to process the new extension.
- set_extraction_cb(w, idx)[source]
Callback for changing the extraction option in the plugin.
Redo the data extraction and replot everything as a result.
- set_fluxed_cb(w, idx)[source]
Callback for changing the fluxed option in the plugin.
Redo the data extraction and replot everything as a result.
- set_line_list_cb(w, idx)[source]
Callback for setting the line list in the plugin.
Construct a new line list (or None) and replot the lines as a result.
- set_masked_cb(w, idx)[source]
Callback for changing the masked option in the plugin.
Redo the data extraction and replot everything as a result.
- set_params(ext=None, extraction=None, masked=None, fluxed=None)[source]
Used to set up defaults from command line args to pypeit_show_1dspec script.
- set_z_cb(w)[source]
Callback for setting the zed value in the plugin.
Replot the lines as a result.