stisnoise

stistools.stisnoise.gauss(x, x0, dx, ymax)
stistools.stisnoise.medianfilter(time_series, width)
stistools.stisnoise.stisnoise(infile, exten=1, outfile=None, dc=1, verbose=1, boxcar=0, wipe=None, window=None)

Computes an FFT on STIS CCD frames to evaluate fixed pattern noise.

Fixed pattern noise is most obvious in a FFT of bias frames. Optional filtering to correct the fixed pattern noise is provided through keywords boxcar, wipe, and window. Filtered data can be saved as an output file.

Parameters:
infilestring

STIS FITS file

extenint, optional

fits extension to be read

dcint, optional

the power in the first freq bin is set to zero for better plotting of the power spectrum.

verboseint, optional [Default: 1]

set to 0 if you do not want brief information about each image.

boxcarint

width of boxcar smoothing to be applied.

wipendarray

a 3-element array, specifying how to modify the data in frequency space. If set, the image is converted to a 1-D time series, fourier transformed to frequency space, modified, inverse transformed back to time space, and converted back to a 2-D image. The first and second elements specify the range in frequencies to be scaled (in hz), and the third element specifies the scaling factor (should be 0-1).

windowndarray

a 3 element array, specifying how to modify the data in frequency space. The first element is the center of the window (in hz). The second element is the width of the window (in hz). The third element controls the tapering of the window - it is the scale (in hz) of the tapering width. Specifically, a square bandstop is convolved with a gaussian having the FWHM given by the third parameter.

outfilestring,optional

name of filtered image file

Returns:
noise_termstuple of arrays

A tuple containing the arrays; namely, the arrays:

freq  = frequency in power spectrum (hz)
magn  = magnitude in power spectrum

Notes

Authors:
  • Original algorithm: Thomas M. Brown (STScI)

  • Python version: Paul Barrett (STScI)

stistools.stisnoise.windowfilter(time_series, image_type, sst, freqpeak, width, taper)
stistools.stisnoise.wipefilter(time_series, image_type, sst, freqmin, freqmax, scale)