%+
% Name:
%    memo_hkp0_calibration_1.0.tex
%
% Usage:
%    latex memo_hkp0_calibration_1.0.tex
%
% Description:
%    This document describes how to compute the values of some of the values
%    for the column QUERY_VAL in Level 0 ACIS housekeeping files.
%
% Input:
%
% Output:
%
% Notes:
%
% History:
%    14 Apr 02, created, Glenn E. Allen
%-

\documentclass{article}

\usepackage{cxo-memo-logo}
\usepackage[dvips]{graphics}
\usepackage{gea}

\newcommand{\queryval}{{\rm QUERY\_VAL}}
\newcommand{\queryvaltu}{{\rm QUERY\_VAL\_TU}}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 1. Header

\memobasic{
   Martin Elvis, SDS Group Leader }{
   Glenn E.\ Allen, SDS }{
   The computation of some of the values of \queryval\ in hkp0.fits files }{
   1.0 }{
   http://space.mit.edu/\~{}gea/docs/memo\_hkp0\_calibration\_1.0.ps }{
   /nfs/cxc/h2/gea/sds/docs/memos/memo\_hkp0\_calibration\_1.0.tex }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 2. Introduction

\vspace*{0.3in} 

This memo describes how to compute physically meaningful quantities for some
of the entries in the column \queryval\ from the number of digital units in
the column \queryvaltu\ of Level 0 ACIS housekeeping files.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 3. ???

\section{ Computations }

The following table lists the appropriate equation or value to use for
\queryval\ based on the values of CCD\_ID, QUERY\_ID, and \queryvaltu in the
Level 0 hkp0.fits files.

{ \small

\begin{center}
\hspace*{-0.50in}
\begin{tabular}{| c | c | l | c c | c c | c c | c |}
\hline
\
   & \
   & \
   & \multicolumn{6}{c}{\queryvaltu/\queryval}
   & \
   \\
CCD\_ID
   & QUERY\_ID
   & MNEMONIC
   & \multicolumn{2}{c}{Low}
   & \multicolumn{2}{c}{Valid}
   & \multicolumn{2}{c}{High}
   & Units
   \\
\hline
0--9
   & 128
   & DEAHOUSE\_CCD\_PIA\_P
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 129
   & DEAHOUSE\_CCD\_PIA\_M
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 130
   & DEAHOUSE\_CCD\_PFS\_P
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 131
   & DEAHOUSE\_CCD\_PFS\_M
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 132
   & DEAHOUSE\_CCD\_S\_P
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 133
   & DEAHOUSE\_CCD\_S\_M
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 134
   & DEAHOUSE\_CCD\_R\_P
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 135
   & DEAHOUSE\_CCD\_R\_M
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 136
   & DEAHOUSE\_CCD\_OG
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 137
   & DEAHOUSE\_CCD\_SCP
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 138
   & DEAHOUSE\_CCD\_RD
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn1}
   & $\ge 4086$
   & $+$999
   & V
   \\
\hline
0--9
   & 139
   & DEAHOUSE\_CCD\_DR0
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn2}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 140
   & DEAHOUSE\_CCD\_DR1
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn2}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 141
   & DEAHOUSE\_CCD\_DR2
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn2}
   & $\ge 4086$
   & $+$999
   & V
   \\
0--9
   & 142
   & DEAHOUSE\_CCD\_DR3
   & $\le 10$
   & $-$999
   & 11--4085
   & eqn.~\ref{eqn2}
   & $\ge 4086$
   & $+$999
   & V
   \\
\hline
0--9
   & 144
   & DEAHOUSE\_CCD\_TEMP\_BOARD
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
0--9
   & 145
   & DEAHOUSE\_CCD\_TEMP\_SRAM
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
0--9
   & 146
   & DEAHOUSE\_CCD\_TEMP\_ADC
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
0--9
   & 147
   & DEAHOUSE\_CCD\_TEMP\_ACTEL
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
\hline
\end{tabular}
\end{center}

\begin{center}
\hspace*{-0.80in}
\begin{tabular}{| c | c | l | c c | c c | c c | c |}
\hline
\
   & \
   & \
   & \multicolumn{6}{c}{\queryvaltu/\queryval}
   & \
   \\
CCD\_ID
   & QUERY\_ID
   & MNEMONIC
   & \multicolumn{2}{c}{Low}
   & \multicolumn{2}{c}{Valid}
   & \multicolumn{2}{c}{High}
   & Units
   \\
\hline
10
   & 1
   & DEAHOUSE\_CNTL\_ADC\_TMP\_BEP\_PCB
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 2
   & DEAHOUSE\_CNTL\_ADC\_TMP\_BEP\_OSC
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 3
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP0\_MONG
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 4
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP0\_PCB
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 5
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP0\_ACTEL
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 6
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP0\_RAM
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 7
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP0\_FB
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 8
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP1\_MONG
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 9
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP1\_PCB
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 10
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP1\_ACTEL
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 11
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP1\_RAM
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 12
   & DEAHOUSE\_CNTL\_ADC\_TMP\_FEP1\_FB
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 13
   & DEAHOUSE\_CNTL\_ADC\_SUBAHK
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn3}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
\hline
10
   & 15
   & DEAHOUSE\_CNTL\_ADC\_FPTEMP\_12
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn4}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
10
   & 16
   & DEAHOUSE\_CNTL\_ADC\_FPTEMP\_11
   & $\le 2199$
   & $-$999
   & 2200-3699
   & eqn.~\ref{eqn4}
   & $\ge 3700$
   & $+$999
   & $^{\circ}$C
   \\
\hline
10
   & 17
   & DEAHOUSE\_CNTL\_ADC\_DPAGNDREF1
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn5}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 18
   & DEAHOUSE\_CNTL\_ADC\_DPA5VHKA
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 19
   & DEAHOUSE\_CNTL\_ADC\_DPAGNDREF2
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn5}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 20
   & DEAHOUSE\_CNTL\_ADC\_DPA5VHKB
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 25
   & DEAHOUSE\_CNTL\_ADC\_DEA28VDCA
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn7}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 26
   & DEAHOUSE\_CNTL\_ADC\_DEA24VDCA
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn7}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 27
   & DEAHOUSE\_CNTL\_ADC\_DEAM15VDCA
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 28
   & DEAHOUSE\_CNTL\_ADC\_DEAP15VDCA
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 29
   & DEAHOUSE\_CNTL\_ADC\_DEAM6VDCA
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 30
   & DEAHOUSE\_CNTL\_ADC\_DEAP6VDCA
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 31
   & DEAHOUSE\_CNTL\_ADC\_RAD\_PCB\_A
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn5}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 32
   & DEAHOUSE\_CNTL\_ADC\_GND\_1
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn5}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 33
   & DEAHOUSE\_CNTL\_ADC\_DEA28VDCB
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn7}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 34
   & DEAHOUSE\_CNTL\_ADC\_DEA24VDCB
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn7}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 35
   & DEAHOUSE\_CNTL\_ADC\_DEAM15VDCB
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 36
   & DEAHOUSE\_CNTL\_ADC\_DEAP15VDCB
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 37
   & DEAHOUSE\_CNTL\_ADC\_DEAM6VDCB
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 38
   & DEAHOUSE\_CNTL\_ADC\_DEAP6VDCB
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn6}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 39
   & DEAHOUSE\_CNTL\_ADC\_RAD\_PCB\_B
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn5}
   & $\ge 4086$
   & $+$999
   & V
   \\
10
   & 40
   & DEAHOUSE\_CNTL\_ADC\_GND\_2
   & $\le 10$
   & $-$999
   & 11-4085
   & eqn.~\ref{eqn5}
   & $\ge 4086$
   & $+$999
   & V
   \\
\hline
\end{tabular}
\end{center}

}

The equations to use for \queryval\ include
%
\begin{equation}
\queryval
   =
   - 14.592 + 7.125 \times 10^{-3} \queryvaltu,
   \label{eqn1}
\end{equation}
%
\begin{equation}
\queryval
   =
   - 43.776 + 2.1375 \times 10^{-2} \queryvaltu,
   \label{eqn2}
\end{equation}
%
\begin{equation}
\queryval
   =
   - 273.16 + \left( 1.4733 \times 10^{-3} + 2.372 \times 10^{-4} x + 1.074
      \times 10^{-7} x^{3} \right)^{-1},
   \label{eqn3}
\end{equation}
%
where 
%
\begin{equation}
x 
   = 
   \ln \left( \frac{1.0711 \times 10^{7} + 5230 \queryvaltu}{
      3844.49 - \queryvaltu} \right),
\end{equation}
%
\begin{equation}
\queryval
   =
   - 246.3 + 0.1863 x + 1.415 \times 10^{-5} x^{2} - 1.885 \times 10^{-9}
      x^{3},
   \label{eqn4}
\end{equation}
%
where
%
\begin{equation}
x
   =
   -1631.87 + 0.796813 \queryvaltu,
\end{equation}
%
\begin{equation}
\queryval
   =
   -2.5 + 1.22 \times 10^{-3} \queryvaltu,
   \label{eqn5}
\end{equation}
%
\begin{equation}
\queryval
   =
   -20.83 + 1.017 \times 10^{-2} \queryvaltu,
   \label{eqn6}
\end{equation}
%
and
%
\begin{equation}
\queryval
   =
   -41.90 + 2.044 \queryvaltu.
   \label{eqny}
\end{equation}
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 4. References

\section*{ References }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 5. Finish

\end{document}
