```
```
 CalTempFromBias stsdas.hst_calib.nicmos CalTempFromBias

NAME · USAGE · DESCRIPTION · PARAMETERS · EXAMPLES · REVISIONS
BUGS · REFERENCES · SEE_ALSO ·

## NAME

CalTempFromBias -- Calculate the temperature of the detectors from their measured bias.

## USAGE

CalTempFromBias input

## DESCRIPTION

There are actually two methods for calculating the temperature from bias in the routine. The methods are named the Blind-Correction method and the Quietest-Quad method.

Both work on the pretext that the voltage drop across a diode changes as some function of the temperature. Each NICMOS detector is an array of 65536 diodes. Each detector is further broken down into 4 quadrants. This is significant, because each quadrant is biased separately (each one gets its own reset voltage, which is the voltage that is actually measured when reading out the array). Immediately following the reset the applied reset voltage across each diode is measured. The NICMOS detectors are currently biased at 0.6 Volts (keywords ND*BIASV in the spt files). In a perfect world, all one would need to do to get the temmperature of a give quadrant would be to measure the value of a given pixel right after reset and apply a simple function that relates counts to temperature. And that's just what each of the above algoritms does, but each handles the imperfections of the world a little differently - each has a different strength in a particular situation.

There is a large "noise" on the reset levels of the quads. This is sometimes referred to as the kTC noise, although that is a misnomer. This noise appears as random jumps in the mean bias level of each quad of up to ± 200 DN from readout to readout. Since the bias increases by about 290 DN/K, a 400 DN PtoP random error on the measurement of the bias translates into more than a degree of uncertainty in the derrived temperature. A method to remove the noise is desireable.

It has been discovered that the apparently "random" reset levels are not so random. They fall into 6-13 (maybe more) discreet, quantized levels, which I call "states". The quads are independent, but their reset levels are fixed relative to one another in a given state. Unfortunately, it seems that the states are not constant with time; since the states can not definetely be determined, the state information can not be reliably used as a method in calculating the temperature from bias.

The Blind-Correction algorithm uses the fact that certain quad differences can be scaled and subtracted from another quad to give "near- perfect" correction without the need to figure out which state is which. This method has the obvious advantage that it doesn't care what the states have done in the past or future. The reason it even works is likely because of the timing differences between quads.

The Quietest-Quad method uses the fact that the amplitude of the noise signal on some of the quads is lower than on the other quads (smaller phase probably). By using just that quiet quad, or an average of the two quietest quads in some cases, one can gte a temperature that is accurate to ± 0.15 K, without any correction whatsoever.

By default, both algorithms are run and temperatures and error estimates made for each. The errors are then cascaded to select the one with the smallest error, and that temperature is returned as the result. Maximum uncertainty should not be larger than 0.15-0.2 K.

## PARAMETERS

input = "" [filename]
Input filename.
(edit_type = "RAW") [string, values: RAW, SPT]
Type of file in which keywords will be updated.
(hdr_key = "TFBT") [string]
Name of keyword for temperature.
(err_key = "TFBE") [string]
Name of keyword for error associated with temperature estimate.
(nref_par = "/grp/hst/cdbs/nref/") [string]
Name of the directory containing the nonlinearity file.
(force = "") [string, values: S(tate),B(lind),Q(uietest]
Character for name of algorithm whose value is to be returned, regardless of which algorithm had the lowest estimated sigma.
(noclean = "no") [boolean]
Flag to force use of UNCLEANed 0th read

## EXAMPLES

1. Calculate the temperature for the NICMOS image "n8tf30jnq_raw.fits" using both algorithms, and write the default keywords for the algorithm having the least estimated sigma to the input file.

```--> tfb = CalTempFromBias.CalTempFromBias( "n8tf30jnq_raw.fits")
--> [temp, sigma, winner ]= tfb.calctemp()
--> stat = tfb.update_header( temp, sigma, winner)
```

2. Calculate the temperature for the same image using only the Quietest-Quad algorithm, write the keywords MYHKEY for the temperature and MYEKEY for the estimate of the associated error for the temperature to the SPT file "n8tf30jnq_spt.fits"

```--> tfb = CalTempFromBias.CalTempFromBias( "n8tf30jnq_raw.fits", edit_type="SPT",
force="QUIET", hdr_key="MYHKEY", err_key="MYEKEY")
--> [temp, sigma, winner ]= tfb.calctemp()
--> stat = tfb.update_header( temp, sigma, winner)
```

## REVISIONS

Initial implementation: May 2008.

## REFERENCES

This task was written by D. Grumm based on the description and prototype code by Eddie Bergeron.

Source Code · Package Help · Search Form · STSDAS

Maintained by the Science Software Group at STScI
This file last updated on 24 Feb 2011