class irispy.spectrograph.IRISSpectrogramCube(data, wcs, uncertainty, unit, meta, mask=None, copy=False)[source]

Bases: sunraster.spectrogram.SpectrogramCube

Class representing IRISSpectrogramCube data described by a single WCS.

  • data (numpy.ndarray) – The array holding the actual data in this object.

  • wcs (ndcube.wcs.wcs.WCS) – The WCS object containing the axes’ information

  • unit (astropy.unit.Unit or str) – Unit for the dataset. Strings that can be converted to a Unit are allowed.

  • meta (dict-like object) – Additional meta information about the dataset. Must contain at least the following keys: - detector type: str, (FUV1, FUV2 or NUV) - OBSID: int - spectral window: str

  • uncertainty (any type, optional) – Uncertainty in the dataset. Should have an attribute uncertainty_type that defines what kind of uncertainty is stored, for example “std” for standard deviation or “var” for variance. A metaclass defining such an interface is NDUncertainty - but isn’t mandatory. If the uncertainty has no such attribute the uncertainty is stored as UnknownUncertainty. Defaults to None.

  • mask (any type, optional) – Mask for the dataset. Masks should follow the numpy convention that valid data points are marked by False and invalid ones with True. Defaults to None.

  • copy (bool, optional) – Indicates whether to save the arguments as copy. True copies every attribute before saving it while False tries to save every parameter as reference. Note however that it is not always possible to save the input as reference. Default is False.

Methods Summary

convert_to(new_unit_type[, time_obs, ...])

Converts data, unit and uncertainty attributes to new unit type.

plot(*args, **kwargs)

A convenience function for the plotters default plot() method.

Methods Documentation

convert_to(new_unit_type, time_obs=None, response_version=4)[source]

Converts data, unit and uncertainty attributes to new unit type.

Takes into consideration also the observation time and response version.

The presence or absence of the exposure time correction is preserved in the conversions.

  • new_unit_type (str) – Unit type to convert data to. Three values are accepted: “DN”: Relevant IRIS data number based on detector type. “photons”: photon counts “radiance”: Perorms radiometric calibration conversion.

  • time_obs (astropy.time.Time, optional) – Observation times of the datapoints. Must be in the format of, e.g., time_obs=Time('2013-09-03', format='utime'), which yields 1094169600.0 seconds in value. The argument time_obs is ignored for versions 1 and 2.

  • response_version (int, optional) – Version number of effective area file to be used. Cannot be set simultaneously with response_file or pre_launch kwarg. Default=4.


New IRISSpectrogramCube in new units.

Return type


plot(*args, **kwargs)[source]

A convenience function for the plotters default plot() method.

Calling this method is the same as calling cube.plotter.plot, the behaviour of this method can change if the NDCube.plotter class is set to a different Plotter class.