Package wfpc2tools :: Module wfpc2cte
[hide private]
[frames] | no frames]

Module wfpc2cte

source code

WFPC2CTE - Module for computing the CTE degradation for WFPC2 images

This module updates the header of the input WFPC2 image with standardized
computations of the effect of CTE based on the algorithm published by Dolphin
(2004, http://purcell.as.arizona.edu/wfpc2_calib/2004_12_20.html).  

ASSUMPTIONS for the COMPUTATION: 
    1. The CTE gets computed for a source at the chip center.
    2. The background (in electrons) gets defined by the clipped mode of the 
        central 200x200 pixels from the image.
    3. The source is assumed to have 100 electrons, 1000 electrons and 
        10000 electrons in the aperture.
    4. The reported CTE is the sum of the XCTE and YCTE computed from 
        Dolphin's algorithm.

INPUT:
The sole input for this task is the filename of the WFPC2 image. 
    
    If the input image is in GEIS format, it will convert it to
    a multi-extension FITS formatted file, then update the FITS file while
    leaving the GEIS image un-modified.  
    
    If the input image is already multi-extension FITS, it will update the
    header directly.
    
    If the input image is waivered FITS, it will quit with a message 
    telling the user to first convert the file to GEIS. The user can then
    provide the GEIS image as input.

OUTPUT:    
The keywords which get updated are:
    CTE_1E2  - CTE for a source with an intensity of 100 electrons 
    CTE_1E3  - CTE for a source with an intensity of 1000 electrons
    CTE_1E4  - CTE for a source with an intensity of 10000 electrons

SYNTAX:
This task can be run on an input WFPC2 image using either of the following 
calls:
    wfpc2cte.compute_CTE(filename,quiet=True)
  -or-
    wfpc2cte.run(filename,quiet=True)

where the filename is the name of the input WFPC2 image.


EXAMPLE:

The syntax for running this task on a WFPC2 file named 'u40x0102m.c0h':
    import wfpc2cte
    wfpc2cte.run('u40x0102m.c0h')
    
The command to print out this help file:
    wfpc2cte.help() 


Version: 1.2.4 (2-July-2008)

Functions [hide private]
 
compute_chip_values(extn, gain, nclip=3) source code
 
compute_XCTE(xpos, bg) source code
 
compute_YCTE(chip_values, yr, xcte) source code
 
update_CTE_keywords(hdr, cte, quiet=False, update=True) source code
 
compute_CTE(filename, quiet=True, nclip=3, update=True) source code
 
run(filename, quiet=True, nclip=3) source code
 
help() source code
Variables [hide private]
  DEFAULT_COUNTS = array([ 100., 1000., 10000.], dtype=floa...
  chip_bg_factor = 10
  chip_lbg_factor = 1
  chip_lct_factor = 7
  __package__ = 'wfpc2tools'

Imports: np, pyfits, pytools, readgeis, fileutil, imagestats


Variables Details [hide private]

DEFAULT_COUNTS

Value:
array([   100.,   1000.,  10000.], dtype=float32)