Cube

class kgpy.observatories.iris.spectrograph.Cube(intensity=None, intensity_uncertainty=None, wcs=None, time=None, time_index=None, channel=None, exposure_length=None, time_wcs=None)

Bases: Cube

Parameters:
  • intensity (Quantity | None) –

  • intensity_uncertainty (Quantity | None) –

  • wcs (ndarray | None) –

  • time (Time | None) –

  • time_index (ndarray | None) –

  • channel (Quantity | None) –

  • exposure_length (Quantity | None) –

  • time_wcs (typ.Optional[u.Quantity]) –

__init__(intensity=None, intensity_uncertainty=None, wcs=None, time=None, time_index=None, channel=None, exposure_length=None, time_wcs=None)
Parameters:
Return type:

None

Attributes

axis

Relationship between physical dimension and axis index.

channel

channel_labels

colormap_spectrum

exposure_half_length

exposure_length

intensity

Intensity of each pixel in the data

intensity_despiked

intensity_uncertainty

num_channels

num_times

num_wavelength

num_x

num_y

shape

time

time_exp_end

time_exp_start

time_index

time_wcs

wcs

Methods

__init__([intensity, intensity_uncertainty, ...])

add_index_axis_to_shared_time_axes(axs)

rtype:

typing.Sequence[matplotlib.axes._axes.Axes]

add_index_axis_to_time_axis(ax)

rtype:

matplotlib.axes._axes.Axes

animate(data[, time_slice, axs, thresh_min, ...])

rtype:

matplotlib.animation.FuncAnimation

animate_channel(images, image_names[, ax, ...])

animate_colors(ax[, channel_index, ...])

rtype:

matplotlib.animation.FuncAnimation

animate_intensity([axs, thresh_min, ...])

rtype:

matplotlib.animation.FuncAnimation

animate_intensity_channel([ax, time_slice, ...])

rtype:

matplotlib.animation.FuncAnimation

colors([shift_doppler_max])

from_archive(archive[, spectral_window])

rtype:

kgpy.observatories.iris.spectrograph.Cube

from_path_sequence(path_sequence[, ...])

rtype:

kgpy.observatories.iris.spectrograph.Cube

from_pickle([path])

plot_channel(image[, image_name, ax, ...])

rtype:

matplotlib.axes._axes.Axes

plot_channel_from_data(data[, ax, ...])

rtype:

matplotlib.axes._axes.Axes

plot_exposure_length(ax)

rtype:

typing.Tuple[matplotlib.axes._axes.Axes, typing.List[matplotlib.lines.Line2D]]

plot_intensity_channel([ax, time_index, ...])

rtype:

matplotlib.axes._axes.Axes

plot_intensity_mean_vs_time(ax)

rtype:

typing.Tuple[matplotlib.axes._axes.Axes, typing.List[matplotlib.lines.Line2D]]

plot_intensity_time([axs, time_index, ...])

rtype:

numpy.ndarray

plot_quantity_vs_index(ax, a[, t, a_name])

rtype:

typing.Tuple[matplotlib.axes._axes.Axes, typing.List[matplotlib.lines.Line2D]]

plot_time(images, image_names, axs[, ...])

rtype:

numpy.ndarray

plot_time_from_data(data[, axs, time_index, ...])

rtype:

numpy.ndarray

to_pickle(path)

window_doppler([shift_doppler])

rtype:

kgpy.observatories.iris.spectrograph.Cube

zeros(shape)

rtype:

kgpy.observatories.iris.spectrograph.Cube

Inheritance Diagram

digraph inheritance3ac1f146b4 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "abc.ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "kgpy.mixin.Pickleable" [URL="kgpy.mixin.Pickleable.html#kgpy.mixin.Pickleable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Class for adding 'to_pickle' and 'from_pickle' methods for objects with long creation times."]; "abc.ABC" -> "kgpy.mixin.Pickleable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.obs.Image" [URL="kgpy.obs.Image.html#kgpy.obs.Image",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Image(intensity: Optional[astropy.units.quantity.Quantity] = None, intensity_uncertainty: Optional[astropy.units.quantity.Quantity] = None, wcs: Optional[numpy.ndarray] = None, time: Optional[astropy.time.core.Time] = None, time_index: Optional[numpy.ndarray] = None, channel: Optional[astropy.units.quantity.Quantity] = None, exposure_length: Optional[astropy.units.quantity.Quantity] = None)"]; "kgpy.mixin.Pickleable" -> "kgpy.obs.Image" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.obs.spectral.Cube" [URL="kgpy.obs.spectral.Cube.html#kgpy.obs.spectral.Cube",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a sequence of spectrally-resolved images (data with two spatial dimensions and one spectral dimension)."]; "kgpy.obs.Image" -> "kgpy.obs.spectral.Cube" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.observatories.iris.spectrograph.Cube" [URL="kgpy.observatories.iris.spectrograph.Cube.html#kgpy.observatories.iris.spectrograph.Cube",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Cube(intensity: Optional[astropy.units.quantity.Quantity] = None, intensity_uncertainty: Optional[astropy.units.quantity.Quantity] = None, wcs: Optional[numpy.ndarray] = None, time: Optional[astropy.time.core.Time] = None, time_index: Optional[numpy.ndarray] = None, channel: Optional[astropy.units.quantity.Quantity] = None, exposure_length: Optional[astropy.units.quantity.Quantity] = None, time_wcs: 'typ.Optional[u.Quantity]' = None)"]; "kgpy.obs.spectral.Cube" -> "kgpy.observatories.iris.spectrograph.Cube" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
add_index_axis_to_shared_time_axes(axs)
Return type:

typing.Sequence[matplotlib.axes._axes.Axes]

Parameters:

axs (Sequence[Axes]) –

add_index_axis_to_time_axis(ax)
Return type:

matplotlib.axes._axes.Axes

Parameters:

ax (Axes) –

animate(data, time_slice=slice(None, None, None), axs=None, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>, norm_gamma=1, frame_interval=<Quantity 100. ms>)
Return type:

matplotlib.animation.FuncAnimation

Parameters:
animate_channel(images, image_names, ax=None, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>, norm_gamma=1, norm_vmin=None, norm_vmax=None, frame_interval=<Quantity 1. s>, colormap=None)
Parameters:
animate_colors(ax, channel_index=0, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>, frame_interval=<Quantity 1. s>, max_doppler_shift=<Quantity 50. km / s>, align_frames=True, repeat_factor=1)
Return type:

matplotlib.animation.FuncAnimation

Parameters:
animate_intensity(axs=None, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>, norm_gamma=1, frame_interval=<Quantity 100. ms>)
Return type:

matplotlib.animation.FuncAnimation

Parameters:
animate_intensity_channel(ax=None, time_slice=None, channel_index=0, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>, norm_gamma=1, norm_vmin=None, norm_vmax=None, frame_interval=<Quantity 100. ms>, colormap=None)
Return type:

matplotlib.animation.FuncAnimation

Parameters:
colors(shift_doppler_max=<Quantity 50. km / s>)
Parameters:

shift_doppler_max (Quantity) –

classmethod from_archive(archive, spectral_window='Si IV 1394')
Return type:

kgpy.observatories.iris.spectrograph.Cube

Parameters:
  • archive (Path) –

  • spectral_window (str) –

classmethod from_path_sequence(path_sequence, spectral_window='Si IV 1394')
Return type:

kgpy.observatories.iris.spectrograph.Cube

Parameters:
classmethod from_pickle(path=None)
Parameters:

path (Path | None) –

plot_channel(image, image_name='', ax=None, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>, colorbar_location='right', transpose=False)
Return type:

matplotlib.axes._axes.Axes

Parameters:
plot_channel_from_data(data, ax=None, time_index=0, channel_index=0, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>)
Return type:

matplotlib.axes._axes.Axes

Parameters:
plot_exposure_length(ax)
Return type:

typing.Tuple[matplotlib.axes._axes.Axes, typing.List[matplotlib.lines.Line2D]]

Parameters:

ax (Axes) –

plot_intensity_channel(ax=None, time_index=0, channel_index=0, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>)
Return type:

matplotlib.axes._axes.Axes

Parameters:
plot_intensity_mean_vs_time(ax)
Return type:

typing.Tuple[matplotlib.axes._axes.Axes, typing.List[matplotlib.lines.Line2D]]

Parameters:

ax (Axes) –

plot_intensity_time(axs=None, time_index=0, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>)
Return type:

numpy.ndarray

Parameters:
plot_quantity_vs_index(ax, a, t=None, a_name='')
Return type:

typing.Tuple[matplotlib.axes._axes.Axes, typing.List[matplotlib.lines.Line2D]]

Parameters:
plot_time(images, image_names, axs, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>)
Return type:

numpy.ndarray

Parameters:
plot_time_from_data(data, axs=None, time_index=0, thresh_min=<Quantity 0.01 %>, thresh_max=<Quantity 99.9 %>)
Return type:

numpy.ndarray

Parameters:
to_pickle(path)
Parameters:

path (Path | None) –

window_doppler(shift_doppler=<Quantity 300. km / s>)
Return type:

kgpy.observatories.iris.spectrograph.Cube

Parameters:

shift_doppler (Quantity) –

classmethod zeros(shape)
Return type:

kgpy.observatories.iris.spectrograph.Cube

Parameters:

shape (Sequence[int]) –

axis: typ.ClassVar[CubeAxis] = <kgpy.obs.spectral.CubeAxis object>

Relationship between physical dimension and axis index.

channel: typ.Optional[u.Quantity] = None
property channel_labels: List[str]
property colormap_spectrum: ScalarMappable
property exposure_half_length
exposure_length: typ.Optional[u.Quantity] = None
intensity: typ.Optional[u.Quantity] = None

Intensity of each pixel in the data

property intensity_despiked
intensity_uncertainty: typ.Optional[u.Quantity] = None
property num_channels: int
property num_times: int
property num_wavelength: int
property num_x: int
property num_y: int
property shape: Tuple[int, ...]
time: typ.Optional[astropy.time.Time] = None
property time_exp_end: Time
property time_exp_start: Time
time_index: typ.Optional[np.ndarray] = None
time_wcs: typ.Optional[u.Quantity] = None
wcs: typ.Optional[np.ndarray] = None