BoxcarExtract

class specreduce.extract.BoxcarExtract(image: NDData, trace_object: Trace, width: float = 5, disp_axis: int = 1, crossdisp_axis: int = 0)[source]

Bases: SpecreduceOperation

Does a standard boxcar extraction.

Example:

trace = FlatTrace(image, trace_pos)
extract = BoxcarExtract(image, trace)
spectrum = extract(width=width)
Parameters:
imageNDData-like or array-like, required

image with 2-D spectral image data

trace_objectTrace, required

trace object

widthfloat, optional

width of extraction aperture in pixels

disp_axisint, optional

dispersion axis

crossdisp_axisint, optional

cross-dispersion axis

Returns:
specSpectrum1D

The extracted 1d spectrum expressed in DN and pixel units

Attributes Summary

crossdisp_axis

disp_axis

spectrum

width

Methods Summary

__call__([image, trace_object, width, ...])

Extract the 1D spectrum using the boxcar method.

Attributes Documentation

crossdisp_axis: int = 0
disp_axis: int = 1
spectrum
width: float = 5

Methods Documentation

__call__(image=None, trace_object=None, width=None, disp_axis=None, crossdisp_axis=None)[source]

Extract the 1D spectrum using the boxcar method.

Parameters:
imageNDData-like or array-like, required

image with 2-D spectral image data

trace_objectTrace, required

trace object

widthfloat, optional

width of extraction aperture in pixels [default: 5]

disp_axisint, optional

dispersion axis [default: 1]

crossdisp_axisint, optional

cross-dispersion axis [default: 0]

Returns:
specSpectrum1D

The extracted 1d spectrum with flux expressed in the same units as the input image, or u.DN, and pixel units