scopesim.effects.spectral_trace_list_utils

scopesim.effects.spectral_trace_list_utils#

Utility classes and functions for SpectralTraceList.

This module contains
  • the definition of the SpectralTrace class. The visible effect should always be a SpectralTraceList, even if that contains only one SpectralTrace.

  • the definition of the XiLamImage class

  • utility functions for use with spectral traces

Functions

fill_zeros(x)

Fill in zeros in a sequence with the previous non-zero number.

fit2matrix(fit)

Return coefficients from a polynomial fit as a matrix.

get_affine_parameters(coords)

Return rotation and shear for each MTC point along a SpectralTrace.

make_image_interpolations(hdulist, **kwargs)

Create 2D interpolation functions for images.

rolling_median(x, n)

Calculate the rolling median of a sequence for +/- n entries.

xilam2xy_fit(layout, params)

Determine polynomial fits of FPA position.

xy2xilam_fit(layout, params)

Determine polynomial fits of wavelength/slit position.

Classes

SpectralTrace(trace_tbl[, cmds])

Definition of one spectral trace.

Transform2D(matrix[, pretransform_x, ...])

2-dimensional polynomial transform.

XiLamImage(fov, dlam_per_pix)

Class to compute a rectified 2D spectrum.