sshift

A Python module for aligning the spectra in different flat-fielded images of an IMSET. These files can then be combined with along-the-slit dithering to reject hot pixels and cosmic rays. The POSTARG2 keyword is used to determine the number of rows to be shifted.

stistools.sshift.shiftimage(infile, outfile, shift=0)

Shift each image extension of an input file by N rows and write the new image extension to the output file.

stistools.sshift.sshift(input, output=None, shifts=None, platescale=None, tolerance=None)

Align spectra from different images of an imset.

Parameters
inputlist

A list of input filenames. These must be STIS flat- fielded (_flt) image FITS files. This argument will accept a single filename or a list of filenames.

shiftslist, optional

A list of integers indicating the number of rows to shift each image of each file in the cross-dispersion (Y-) direction.

platescalefloat, optional

The size of a pixel in arcseconds. Used to convert the value of the POSTARG2 keyword to pixels.

tolerancefloat, optional

The allowed difference between calculated shifts and integer pixel shifts (fraction of pixel).

Returns
outputlist, optional

A list of output filenames. The number of output filenames must match the number of input filenames. If no output is given, then the _flt substring of the input file is replace by the _sfl substring to create an output file. This option will accept a single filename or a list of filenames.

Notes

Author:
  • Paul Barrett (STScI)