Package nictools :: Module rnlincor
[hide private]
[frames] | no frames]

Module rnlincor

source code


rnlincor: Module to correct for the countrate-dependent nonlinearity in 
          a NICMOS image.

Usage:    Normally used via the STSDAS task rnlincor in the nicmos package.
          To use as pure python, just invoke the run method:
          >>> rnlincor.run('inputfile.fits','outputfile.fits')
          It may also be run from the shell:
          % rnlincor.py infile.fits [outfile.fits] [--nozpcorr]
          

For more information:
          Additional user information, including parameter definitions and more
          examples, can be found in the help file for the STSDAS rnlincor task,
          located in nicmos$doc/rnlincor.hlp.

          This task is based on prototype code developed by R. de Jong. The
          algorithm is described in more detail in ISR NICMOS 2006-003 by
          de Jong.

Dependencies:
          numpy v1.0.2dev3534 or higher
          pyfits v1.1b4 or higher


Version: 0.8

Classes [hide private]
  FitsRowObject
Class to facilitate working with single table rows.
Functions [hide private]
 
getcurve(fname, col1='wavelength', col2='correction', pad=0)
Gets a 2-column table from the first extension of a FITS file.
source code
 
getrow(photmode, corrname)
Pick out the correction parameters from the proper row of the table located in corrname, based on photmode.
source code
 
expandname(pattern)
Select the latest file that matches the pattern in the directory specified in the pattern
source code
 
check_infile(infile)
Open the input file and check all the things that can go wrong.
source code
 
update_data(f, imgext, img, mul) source code
 
update_header(f, alpha, zpcorr, zpratio=None)
Update all the header keywords
source code
 
rnlincor(infile, outfile, **opt)
The main routine
source code
 
parrun(parfile) source code
 
set_default_options(inopt) source code
 
run(*args, **inopt) source code
Variables [hide private]
  __vdate__ = '2007-12-14'
  __package__ = 'nictools'

Imports: numerixenv, N, pyfits, osfn, irafglob, xyinterp, sys, os, glob, time


Function Details [hide private]

getcurve(fname, col1='wavelength', col2='correction', pad=0)

source code 

Gets a 2-column table from the first extension of a FITS file. Defaults to "wavelength" and "correction" for column names, but others can be specified. If pad keyword is nonzero, the wavelength table will be extended by the pad amount in each direction.

getrow(photmode, corrname)

source code 

Pick out the correction parameters from the proper row of the table located in corrname, based on photmode. Return an object that contains the row fields as attributes.

check_infile(infile)

source code 

Open the input file and check all the things that can go wrong. If we pass all the tests, return the handle to the open file to pass to the main routine.