Rampviz#

class jdaviz.configs.rampviz.helper.Rampviz(*args, **kwargs)[source]#

Bases: CubeConfigHelper

Rampviz Helper class

Methods Summary

create_image_viewer([viewer_name, data])

Create a new image viewer.

get_data([data_label, spatial_subset, ...])

Returns data with name equal to data_label of type cls with subsets applied from temporal_subset, if applicable.

load_data(data[, data_label])

Load and parse a data cube with Cubeviz.

select_group(group_index)

Select the slice closest to the provided wavelength.

Methods Documentation

create_image_viewer(viewer_name=None, data=None)[source]#

Create a new image viewer.

Parameters:
viewer_namestr or None

Viewer name/ID to use. If None, it is auto-generated.

Returns:
viewerImvizImageView

Image viewer instance.

get_data(data_label=None, spatial_subset=None, temporal_subset=None, cls=None, use_display_units=False)[source]#

Returns data with name equal to data_label of type cls with subsets applied from temporal_subset, if applicable.

Parameters:
data_labelstr, optional

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

spatial_subsetstr, optional

Spatial subset applied to data. Only applicable if data_label points to a cube or image. To extract a spectrum from a cube, use the spectral extraction plugin instead.

temporal_subsetstr, optional
clsSpectrum1D, CCDData, optional

The type that data will be returned as.

Returns:
datacls

Data is returned as type cls with subsets applied.

load_data(data, data_label=None, **kwargs)[source]#

Load and parse a data cube with Cubeviz. (Note that only one cube may be loaded per Cubeviz instance.)

Parameters:
datastr, DataModel, NDDataArray or ndarray

A string file path, Roman DataModel object pointing to the data cube, an NDDataArray, or a Numpy array. If plain array is given, axes order must be (x, y, z).

data_labelstr or None

Data label to go with the given data. If not given, one will be automatically generated.

**kwargsdict

Extra keywords accepted by Jdaviz application-level parser.

select_group(group_index)[source]#

Select the slice closest to the provided wavelength.

Parameters:
group_indexfloat

Group index to select in units of the x-axis of the integration. The nearest group will be selected if “snap to slice” is enabled in the slice plugin.