SpectrogramSequence

class sunraster.SpectrogramSequence(data_list, common_axis=None, meta=None)[source]

Bases: ndcube.ndcube_sequence.NDCubeSequence, sunraster.spectrogram.SpectrogramABC

Class for holding, slicing and plotting a sequence of spectrogram cubes.

Spectrogram cubes can be 2D or higher.

Parameters
  • data_list (list) – List of SpectrogramCube objects from the same spectral window and OBS ID. Must also contain the ‘detector type’ in its meta attribute.

  • common_axis (int or None (optional)) – If the sequence axis is aligned with an axis of the component SpectrogramCube instances, e.g. Spectrogram cubes have a time dimension and are arranged within the sequence in chronological order, set this input to the axis number of the time axis within the cubes. Default=None implies there is no common axis.

  • meta (dict or header object (optional)) – Metadata associated with the sequence.

Attributes Summary

exposure_time

Return the exposure time for each exposure.

lat

Return the latitude coordinates for each pixel.

lon

Return the longitude coordinates for each pixel.

spectral_axis

Return the spectral coordinates for each pixel.

time

Return the time coordinates for each pixel.

Methods Summary

apply_exposure_time_correction([undo, copy, ...])

Applies or undoes exposure time correction to data and uncertainty and adjusts unit.

Attributes Documentation

exposure_time
lat
lon
spectral_axis
time

Methods Documentation

apply_exposure_time_correction(undo=False, copy=False, force=False)[source]

Applies or undoes exposure time correction to data and uncertainty and adjusts unit.

Correction is only applied (undone) if the object’s unit doesn’t (does) already include inverse time. This can be overridden so that correction is applied (undone) regardless of unit by setting force=True.

Parameters
  • undo (bool) – If False, exposure time correction is applied. If True, exposure time correction is removed. Default=False

  • copy (bool) – If True a new instance with the converted data values is returned. If False, the current instance is overwritten. Default=False

  • force (bool) – If not True, applies (undoes) exposure time correction only if unit doesn’t (does) already include inverse time. If True, correction is applied (undone) regardless of unit. Unit is still adjusted accordingly.

Returns

result – If copy=False, the original SpectrogramSequence is modified with the exposure time correction applied (undone). If copy=True, a new SpectrogramSequence is returned with the correction applied (undone).

Return type

None or SpectrogramSequence