Package stistools :: Module mktrace
[hide private]
[frames] | no frames]

Module mktrace

source code


Refine a STIS trace table.

- A trace is generated from the science file and a trace
  center is computed.
- The two traces bracketing the trace center are extracted
  from the trace table and interpolated
- The correction is computed as the difference between the
  linear fit to the science and interpolated traces
- The correction is applied to all traces in the trace file
  for that particular OPT_ELEM and CENWAVE
- A new trace table is written to the current directory and
  the relevant keywords are updates in the header of the input file.

Usage:
>>>import mktrace
>>>mktrace.mktrace('file.fits', [tracecen=509.4], [weights=[(x1,x2),(x3,x4)])

Author (IDL): Linda Dressel
Python version: Nadia Dencheva


Version: 1.1

Classes [hide private]
  Trace
tr=Trace(file) file is a crj or flt file.
Functions [hide private]
 
mktrace(fname, tracecen=0.0, weights=None)
Refine a stis spectroscopic trace.
source code
 
iterable(v) source code
 
interp(y, n)
Given a 1D array of size m, interpolates it to a size n (m<n).
source code
 
trace_interp(tr1, tr2, cen) source code
 
getKWInfo(hdr0, hdr1) source code
Variables [hide private]
  __vdate__ = '2007-03-02'
  __package__ = 'stistools'

Imports: N, pyfits, os, ni, conv, gfit, linefit, fu