background#

Utilities for estimating the stray light background of FUV spectrograph images.

Functions

model_background(velocity, bias, slope)

A simple linear model of the background in the proximity of a spectral line, given by

model_spectral_line(velocity, amplitude, ...)

A simple model of a spectral line profile.

model_total(velocity, amplitude, shift, ...)

The sum of model_background() and model_spectral_line().

fit(data, velocity, axis_wavelength[, where])

Compute the parameters of model_total() which best fit data using the gradient descent method.

average(obs, axis)

Compute the average along the given axis using numpy.nanmedian()

subtract_spectral_line(obs, axis_wavelength)

Fit obs using fit() and subtract the model_spectral_line() component.

smooth(obs, axis_wavelength, axis_detector_y)

Smooth the given observation using named_arrays.ndfilters.trimmed_mean_filter().

estimate(obs, axis_time, axis_wavelength, ...)

Estimate the background from a given spectrograph observation.