ctestis

The purpose of this ctestis task is to correct signal levels of point-like source in photometry tables measured from STIS CCD images for charge loss due to imperfect Charge Transfer Efficiency (CTE). The algorithm used to correct for CTE-induced signal loss is the one published in Goudfrooij, Bohlin, Maiz-Apellaniz, & Kimble, 2006, PASP, October 2006 edition (astro-ph/0608349). The values of CTE loss derived using this algorithm should be accurate to about 3% RMS (tested for data taken between March 1997 and August 2004). No significant differences in CTE loss were found for different aperture sizes, although this has been verified only for a limited range of aperture sizes (2, 3, and 5 pixel radii). The algorithm was derived from measurements of point sources in a relatively sparse field (the outskirts of a Galactic globular cluster), as detailed in the PASP paper mentioned above.

The function also computes the shift in the Y centroid of point sources due to distortions in the steller PDF cause by CTE trails. the algorithm is taken from the Equation 9 of Goodfrooij et al. (2006). Note, however, that the equation has been multiplied by -1, so that the resulting correction may be ADDED to measured Y centriod of each star.

Examples

ctestis with ycol set to 182, net set to 5,000 and sky set to 150.

>>> from stistools.ctestis import ctestis
>>> fluxc, dmagc, dyc = ctestis(182., 5000., 150., stisimage='o4qp9g010_crj.fits')
mjd: 50893.30
nread: 2
ybin: 1
gain:  1.0
amp: D
tt0: -2.3865942
lcts: -0.67595399
bck: 75.0
lbck: 2.317577
cti: 1.7314006e-05
fluxc: 2536.7133
dmagc: -0.015828427
cti10000: 0.17314006
dy512: 0.0043051192
dyc: 0.007079903
net: 5000.0
sky: 150.0
ycol: 182.0
fluxc: 2536.7133
dmagc: -0.015828427
dyc: 0.007079903
stistools.ctestis.ctestis(ycol, net, sky, stisimage=None, mjd=None, nread=None, ybin=None, gain=None, amp='D', sx2=False)

Calculate the STIS empirical correction to magnitude and astrometric shift, given photometry results.

Parameters:
ycol : arr

Y-column # of object

net : arr

Net photometric counts

sky : arr

Counts in sky region, scaled to source area (?)

stisimage : str, optional

The name of the SX2 file from which to pull the header keywords.

mjd : float, optional

Modified julian date corresponding to the start time of the 1st exposure, corresponds to the TEXPSTRT keyword. If stisimage file is defined TEXPSTRT keyword will overwrite any provided mjd value.

nread : int, optional

Number of image sets combined during CR rejection, corresponds to the NCOMBINE keyword. If stisimage file is defined NCOMBINE keyword will overwrite any provided nread value.

ybin : int , optional

Axis2 data bin size in unbinned detector pixels, corresponds to the BINAXIS2 keyword. If stisimage file is defined BINAXIS2 keyword will overwrite any provided ybin value.

gain : float, optional

The image gain, corresponds to the CCDGAIN keyword. If stisimage file is defined the CCDGAIN keyword will overwrite any provided gain value. If the gain is 4.0, it will be upated to 4.08.

amp : str, optional

The amplifier used for the observation (default ‘D’). Ignored if stisimage is provided.

sx2 : bool, optional

Force the procedure to remove the top/bottom 38 rows. This is automatically done if the file in stisname contains ‘_sx2’. Default values is False

Returns:
fluxc : arr

The empirically-corrected flux (counts)

dmagc : arr

The empirical photometric correction (delta mag)

dyc : arr

The empirical astrometric correction (delta pixels)