mos_spec2d_parser#

jdaviz.configs.mosviz.plugins.parsers.mos_spec2d_parser(app, data_obj, data_labels=None, add_to_table=True, show_in_viewer=False, ext=1, transpose=False, cache=None, local_path=None, timeout=None)[source]#

Attempts to parse a 2D spectrum object.

Parameters:
appApplication

The application-level object used to reference the viewers.

data_objstr or list or spectrum-like

File path, list, or spectrum-like object to be read as a new row in the mosviz table.

data_labelsstr, optional

The label applied to the glue data component.

extint, optional

The extension in the FITS file that contains the data to be loaded.

transposebool, optional

Flag to transpose the data array before loading.

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).

Returns:
n_specsint

Number of data objects loaded.

Notes

Default arguments assume that the data is in the second HDU of the FITS file unless otherwise specified with the ext parameter.