# Hubble Space Telescope WFPC2 CTE Tool #1 Help Page

MJD of Observation: Enter the Modified Julian Date of the observation's start time. This is the header keyword EXPSTART. The expected format is 5#####.####...

Measured Source Counts: Enter your measured counts, in electrons, for the source you wish to estimate CTE effects.

X-Position on CCD: Enter the X-position of the source on the CCD. The expected range is from 1 - 800.

Y-Position on CCD: Enter the Y-position of the source on the CCD. The expected range is from 1 - 800.

Background Counts: Enter your measured background for the observation, in electrons.

Stellar Magnitude: Enter your stellar magnitude.

#### The CTE Correction Formulae:

1. Calculate the following variable values:

```LCT0 = ln (CT) - 7

BG = sqrt (background2+1) - 10

LBG = ln( sqrt(background2+1) ) - 1

YR = (MJD - 50193) / 365.25
```

2. Calculate XCTE, the CTE loss (in magnitudes) in the X readout:

```XCTE = 0.0194 * e - (0.00085 * BG) * (X/800.0)
```

3. Recalculate LCT using:

```LCT0 = ln (CT) - 7

LCT  = LCT0 + 0.921*XCTE
```

4. Calculate YCTE, the CTE loss (in magnitudes) in the Y readout:

```c1 = 0.0143 * (0.729 * e - (0.397 * LBG) + 0.271 * e - (0.0144 * BG))
* (1.0 + 0.267 * YR + 0.0004 * YR2) * (Y/800.0)

c2 = 2.99 * e - (0.479 * LCT)

YCTE = ( ln (ec1 * 1.0 + c2) - c2) / 0.441
```

5. The corrected magnitude for the star is then given by:

```MAGcorr = MAG - XCTE - YCTE
```

Where:

```CT = Number of counts in electrons for the point source.

XCTE = CTE loss in percent over 800 pixels in the X-direction.

YCTE = CTE loss in percent over 800 pixels in the Y-direction.

X, Y = X, Y source position in pixels.

background = Mean number of counts in electrons for a blank region of the
background.

BG = sqrt (background2+1) - 10

LBG = ln ( sqrt(background2+1) ) - 1

MJD = Modified Julian Date for the observation.

YR = (MJD - 50193) / 365.25

MAG = uncorrected stellar magnitude.

MAGcorr = CTE corrected stellar magnitude.
```

Note 1: Small uncertainties in the bias level can lead to the measurement of negative values for background when the background is very low (about 4 DN in a 14 sec exposure).