API Reference#

specreduce Package#

Functions#

parse_image(image[, disp_axis, mask_treatment])

Convert all accepted image types to a consistently formatted Spectrum object.

Classes#

SpecreduceOperation()

An operation to perform as part of a spectroscopic reduction pipeline.

WavelengthCalibration1D(input_spectrum[, ...])

input_spectrum: Spectrum

specreduce.core Module#

Functions#

parse_image(image[, disp_axis, mask_treatment])

Convert all accepted image types to a consistently formatted Spectrum object.

Classes#

SpecreduceOperation()

An operation to perform as part of a spectroscopic reduction pipeline.

specreduce.utils.synth_data Module#

Functions#

make_2d_trace_image([nx, ny, background, ...])

make_2d_arc_image([nx, ny, wcs, extent, ...])

make_2d_spec_image([nx, ny, wcs, extent, ...])

Classes#

SynthImage([nx, ny, wcs, extent, wave_unit, ...])

Immutable, composable builder for synthetic 2D spectroscopic images.

specreduce.tracing Module#

Classes#

Trace(image)

Basic tracing class that by default traces the middle of the image.

FlatTrace(image, trace_pos)

Trace that is constant along the axis being traced.

ArrayTrace(image, trace)

Define a trace given an array of trace positions.

FitTrace(image, bins, guess, window, ...)

Trace the spectrum aperture in an image.

specreduce.background Module#

Classes#

Background(image, traces, width, statistic, ...)

Determine the background from an image for subtraction.

specreduce.extract Module#

Classes#

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

Standard boxcar extraction along a trace.

HorneExtract(image, trace_object[, ...])

Perform a Horne (a.k.a.

OptimalExtract(image, trace_object[, ...])

An alias for HorneExtract.

specreduce.wavecal1d Module#

Classes#

WavelengthCalibration1D([arc_spectra, ...])

A class for wavelength calibration of one-dimensional spectra.

specreduce.wavesol1d Module#

Classes#

WavelengthSolution1D(p2w, bounds_pix, unit)

Class defining a one-dimensional wavelength solution.

specreduce.calibration_data Module#

Utilities for defining, loading, and handling spectroscopic calibration data

Functions#

get_available_line_catalogs()

Returns a dictionary of available line catalogs.

load_pypeit_calibration_lines([lamps, ...])

Load reference calibration lines from pypeit linelists.

load_MAST_calspec(filename[, cache, ...])

Load a standard star spectrum from the calspec database at MAST.

load_onedstds([dataset, specfile, cache, ...])

This is a convenience function for loading a standard star spectrum from the 'onedstds' dataset in the specreduce_data package.

Classes#

AtmosphericExtinction([model, extinction, ...])

Spectrum container for atmospheric extinction in magnitudes as a function of wavelength.

AtmosphericTransmission([data_file, wave_unit])

Spectrum container for atmospheric transmission as a function of wavelength.

specreduce.tilt_correction Module#

Classes#

TiltCorrection(arc_frames[, trace, ...])

A class for 2D spectral tilt correction.

specreduce.tilt_solution Module#

Classes#

TiltSolution(solution[, disp_axis, image_shape])

A solution for 2D spectral tilt correction.