Specviz2d#

class jdaviz.configs.specviz2d.helper.Specviz2d(*args, **kwargs)[source]#

Bases: ConfigHelper, LineListMixin

Specviz2D Helper class

Attributes Summary

specviz

A Specviz helper (Specviz) for the Jdaviz application that is wrapped by Specviz2d.

Methods Summary

get_data([data_label, spectral_subset, cls])

Returns data with name equal to data_label of type cls with subsets applied from spectral_subset.

load_data([spectrum_2d, spectrum_1d, ...])

Load and parse a pair of corresponding 1D and 2D spectra.

load_trace(trace, data_label[, show_in_viewer])

Load a trace object and load into the spectrum-2d-viewer

Attributes Documentation

specviz#

A Specviz helper (Specviz) for the Jdaviz application that is wrapped by Specviz2d.

Methods Documentation

get_data(data_label=None, spectral_subset=None, cls=None)[source]#

Returns data with name equal to data_label of type cls with subsets applied from spectral_subset.

Parameters:
data_labelstr, optional

Provide a label to retrieve a specific data set from data_collection.

spectral_subsetstr, optional

Spectral subset applied to data.

clsSpectrum1D, CCDData, optional

The type that data will be returned as.

Returns:
datacls

Data is returned as type cls with subsets applied.

load_data(spectrum_2d=None, spectrum_1d=None, spectrum_1d_label=None, spectrum_2d_label=None, show_in_viewer=True, ext=1, transpose=False, cache=None, local_path=None, timeout=None)[source]#

Load and parse a pair of corresponding 1D and 2D spectra.

Parameters:
spectrum_2d: str

A spectrum as translatable container objects (e.g., Spectrum1D) that can be read by glue-jupyter. Alternatively, can be a string file path.

spectrum_1d: str or Spectrum1D

A spectrum as translatable container objects (e.g., Spectrum1D) that can be read by glue-jupyter. Alternatively, can be a string file path.

spectrum_1d_labelstr

String representing the label for the data item loaded via spectrum_1d.

spectrum_2d_labelstr

String representing the label for the data item loaded via spectrum_2d.

show_in_viewerbool

Show data in viewer(s).

extint, optional

Extension of the input spectrum_2d file to load. Defaults to 1.

transposebool, optional

Flag to transpose the 2D data array before loading. Useful for uncalibrated data that is dispersed vertically, to change it to horizontal dispersion.

cacheNone, bool, or str

Cache the downloaded file if the data are retrieved by a query to a URL or URI.

local_pathstr, optional

Cache remote files to this path. This is only used if data is requested from astroquery.mast.

timeoutfloat, optional

If downloading from a remote URI, set the timeout limit for remote requests in seconds (passed to download_file or timeout).

load_trace(trace, data_label, show_in_viewer=True)[source]#

Load a trace object and load into the spectrum-2d-viewer

Parameters:
traceTrace

A specreduce trace object

data_labelstr

String representing the label

show_in_viewerbool

Whether to load into the spectrum-2d-viewer.