Make PCTETAB Reference File

The PCTETAB reference file contains data in both its primary header and in several table extensions. The parameters that go into the primary header are single numbers that must be specified in the call to MakePCTETab.

The data that goes into the table extensions is kept in text files. The names of these text files are given to MakePCTETab, which reads them to populate the table extensions. See the documentation for MakePCTETab for more detailed descriptions, argument names, and default values.

Primary Header Parameters

  • Number of times the readout is simulated to arrive at the corrected image.

  • Number of times the pixels are shifted per readout simulation.

  • The read noise, in electrons, of the image. This is technically different for each amp but here we pick a single representative value.

  • The default value selecting a model for how read noise is handled before CTE correction.

  • Threshold for re-correcting over-subtracted pixels. Sometimes the CTE correction removes too much flux from a trail leaving a large divot.

Table Extensions

Functions for ACS PCTETAB reference file.

Examples

>>> from reftools import pctetab
>>> pctetab.MakePCTETab(
...     'pctetab_pcte.fits', 'pctetab_dtdel.txt',
...     ['pctetab_chgleak-1.txt', 'pctetab_chgleak-2.txt'],
...     'pctetab_levels.txt', 'pctetab_scaling.txt',
...     'pctetab_column_scaling.txt', history_file='pctetab_history.txt')  
reftools.pctetab.MakePCTETab(out_name, dtde_file, chg_leak_file, levels_file, scale_file, column_file, sim_nit=7, shft_nit=7, read_noise=5.0, noise_model=1, oversub_thresh=-10, useafter='Mar 01 2002 00:00:00', pedigree='INFLIGHT 01/03/2002 22/07/2010', creatorName='ACS Team', history_file='', detector='WFC')

Make the CTE parameters reference file.

Parameters:
out_namestr

Name of pcte fits file being created. May include path.

dtde_filestr

Path to text file containing dtde data.

The file should have 2 columns with the following format:

DTDE  Q
float int
...   ..

Lines beginning with # are ignored.

chg_leak_filestr or list of str

Path to text file(s) containing charge leak data. If passed as a string the string may contain wild cards so that multiple files are specified.

The input file should contain 5 columns with following format:

NODE LOG_Q_1 LOG_Q_2 LOG_Q_3 LOG_Q_4
int  float   float   float   float
...  ...     ...     ...     ...

Lines beginning with # are ignored.

levels_filestr

Text file containing charge levels at which to do CTE evaluation.

The input file should have a single column with the following format:

LEVELS
int
...

Lines beginning with # are ignored.

scale_filestr

Text file containing CTE scaling parameters

The input file should have two columns with the following format:

MJD     SCALE
float   float
...     ...

Lines beginning with # are ignored.

column_filestr

Text file containing CTE column-by-column scaling.

The input file should have 5 columns with the following format:

COLUMN  AMPA    AMPB    AMPC    AMPD
int     float   float   float   float
...     ...     ...     ...     ...

Lines beginning with # are ignored.

sim_nitint, optional

Number of iterations of readout simulation per column.

shft_nitint, optional

Number of shifts each readout simulation is broken up into. A large number means pixels are shifted a smaller number of rows before the CTE is evaluated again.

read_noisefloat

Value for RN_CLIP keyword in PCTEFILE EXT 0. This is the maximum amplitude of read noise used in the read noise mitigation. Unit is in electrons.

noise_model{0, 1, 2}

Select the method to be used for readnoise removal:

0: no read noise smoothing
1: standard smoothing
2: strong smoothing
oversub_threshfloat

Value for SUBTHRSH keyword in PCTEFILE header. CTE corrected pixels taken below this value are re-corrected. Unit is in electrons.

useafterstr, optional

Value for USEAFTER keyword. Defaults to ‘Mar 01 2002 00:00:00’

pedigreestr, optional

Value for PEDIGREE keyword. Defaults to ‘INFLIGHT 01/03/2002 22/07/2010’

creatorNamestr, optional

Name of the person generating this fitsFile. Defaults to ‘ACS Team’

historyFilestr, optional

ASCII file containing HISTORY lines for EXT 0. Include path. Each row will produce one HISTORY line. Defaults to ‘’

detectorstr, optional

Supported detector. Defaults to ‘WFC’

Examples

Saving file pctetab_pcte.fits with the command:

>>> from reftools.pctetab import MakePCTETab
>>> MakePCTETab(
...     'pctetab_pcte.fits', 'pctetab_dtdel.txt',
...     ['pctetab_chgleak-1.txt', 'pctetab_chgleak-2.txt'],
...     'pctetab_levels.txt', 'pctetab_scaling.txt',
...     'pctetab_column_scaling.txt', history_file='pctetab_history.txt')  
exception reftools.pctetab.PCTEFileError

Generic exception for errors in this module.