SpectralCubePatch

class sitelle.process.SpectralCubePatch

Bases: sitelle.process.SpectralCube

Overload of orcs.process.SpectralCube, to extend or correct some behaviors.

Methods Summary

_extract_spectra_from_region(region[, …]) Extracts non integrated spectra from the cube, given a region.
_extract_spectrum_from_region(region[, …]) Overloads orcs.core.HDFCube._extract_spectrum_from_region, to make use of _extract_spectra_from_region().
get_filter_range([wavenumber]) Returns the filter range of a given SpectralCube.
integrate(filter_function[, xmin, xmax, …]) Integrate a cube under a filter function and generate an image

Methods Documentation

_extract_spectra_from_region(region, silent=False, return_theta=False)

Extracts non integrated spectra from the cube, given a region. The parallelization is automatically decided, given the number of pixel to treat.

Parameters:
  • region (tuple) – a region in pixel (obtained with numpy.where() for example), from which we want to get spectra.
  • silent (bool, Default = False) – (Optional) If True, a log is displayed.
  • return_theta (bool, Default = False) – (Optional) If True, returns the theta values in the region
Returns:

out – Extracted spectra of the same shape as region

Return type:

3D ndarray

_extract_spectrum_from_region(region, subtract_spectrum=None, median=False, mean_flux=False, silent=False, return_spec_nb=False, return_mean_theta=False, return_gvar=False, output_axis=None)

Overloads orcs.core.HDFCube._extract_spectrum_from_region, to make use of _extract_spectra_from_region().

get_filter_range(wavenumber=True)

Returns the filter range of a given SpectralCube.

Parameters:wavenumber (bool, Default = True) – (Optional) If True, the range is in cm-1, else in Angstroms.

See also

orcs.process.SpectralCube.get_filter_range

integrate(filter_function, xmin=None, xmax=None, ymin=None, ymax=None)

Integrate a cube under a filter function and generate an image

\(I = \int F(\sigma)S(\sigma)d\sigma\)

with \(I\), the image, \(S\) the spectral cube, \(F\) the filter function.

Contrary to orcs.process.SpectralCube.integrate, it uses the correctly wavelength calibrated spectra.

Parameters:
  • filter_function (orcs.core.Filter) – The filter to use.
  • xmin (int) – (Optional) lower boundary of the ROI along x axis in pixels (default None, i.e. 0)
  • xmax (int) – (Optional) upper boundary of the ROI along y axis in pixels (default None, i.e. dimx)
  • ymin (int) – (Optional) lower boundary of the ROI along y axis in pixels (default None, i.e. 0)
  • ymax (int) – (Optional) upper boundary of the ROI along y axis in pixels (default None, i.e. dimy)
Returns:

sframe – The integrated frame

Return type:

2D ndarray