trident.lsf.LSF

class trident.lsf.LSF(function=None, width=None, filename=None)[source]

A class representing a spectrograph’s line spread function.

A line spread function can be defined either by a function and width or by a filename containing a custom kernel.

Parameters

Function

string, optional

The function defining the LSF kernel. valid functions are “boxcar” or “gaussian”

Width

int, optional

The width of the LSF kernel in bins.

Filename

string, optional

The filename of a textfile for a user-specified kernel. Each line in the textfile contains a normalized flux value of the kernel. For examples, see contents of trident.__path__/data/lsf_kernels Trident searches for these files either in the aforementioned directory or in the execution directory.

Examples

Generate an LSF based on a text file:

>>> LSF(filename='avg_COS.txt')

Generate a boxcar-based LSF:

>>> LSF(function='boxcar', width=30)

Generate a gaussian-based LSF:

>>> LSF(function='guassian', width=7)

Methods

__init__