Specviz#
- class jdaviz.configs.specviz.helper.Specviz(*args, **kwargs)[source]#
Bases:
ConfigHelper,LineListMixinSpecviz Helper class.
Methods Summary
Sets the x-axis limits to the min/max of the reference data
Sets the y-axis limits to the min/max of the reference data
flip_x()Flips the current limits of the x-axis
flip_y()Flips the current limits of the y-axis
get_data([data_label, spectral_subset, cls])Returns data with name equal to data_label of type cls with subsets applied from subset_to_apply.
get_spectra([data_label, subset_to_apply, ...])Returns the current data loaded into the main viewer
A simple wrapper around the app-level call to retrieve only spectral subsets, which are now returned as SpectralRegions by default.
load_spectrum(data[, data_label, format, ...])Loads a data file or
Spectrum1Dobject into Specviz.set_spectrum_tick_format(fmt[, axis])Manually set the tick format of one of the axes of the profile viewer.
x_limits([x_min, x_max])Sets the limits of the x-axis
y_limits([y_min, y_max])Sets the limits of the y-axis
Methods Documentation
- get_data(data_label=None, spectral_subset=None, cls=None, **kwargs)[source]#
Returns data with name equal to data_label of type cls with subsets applied from subset_to_apply.
- Parameters:
- data_labelstr, optional
Provide a label to retrieve a specific data set from data_collection.
- spectral_subsetstr, optional
Spectral subset applied to data.
- cls
Spectrum1D, optional The type that data will be returned as.
- Returns:
- datacls
Data is returned as type cls with subsets applied.
- get_spectra(data_label=None, subset_to_apply=None, apply_slider_redshift='Warn')[source]#
Returns the current data loaded into the main viewer
- get_spectral_regions()[source]#
A simple wrapper around the app-level call to retrieve only spectral subsets, which are now returned as SpectralRegions by default.
- Returns:
- spec_regsdict
Mapping from the names of the subsets to the subsets expressed as
specutils.SpectralRegionobjects.
- load_spectrum(data, data_label=None, format=None, show_in_viewer=True, concat_by_file=False)[source]#
Loads a data file or
Spectrum1Dobject into Specviz.- Parameters:
- datastr,
Spectrum1D, orSpectrumList Spectrum1D, SpectrumList, or path to compatible data file.
- data_labelstr
The Glue data label found in the
DataCollection.- formatstr
Loader format specification used to indicate data format in
readio method.- show_in_viewerbool
Show data in viewer(s).
- concat_by_filebool
If True and there is more than one available extension, concatenate the extensions within each spectrum file passed to the parser and add a concatenated spectrum to the data collection.
- datastr,
- set_spectrum_tick_format(fmt, axis=None)[source]#
Manually set the tick format of one of the axes of the profile viewer.
- Parameters:
- fmtstr
Format of tick marks in the spectrum viewer. For example,
'0.1e'to set scientific notation or'0.2f'to turn it off.- axis{0, 1}
The spectrum viewer data axis. Axis 1 corresponds to the Y-axis and 0 to the X-axis.