\appendix
%\appendixpage
%\noappendicestocpagenum
%\setcounter{secnumdepth}{-1}
%\backmatter % book mode only
%\appendix
\renewcommand{\thesection}{A}
%\renewcommand{\thesection}{B.\arabic{section}}
%\appendix
\hypertarget{appendix}{}
\chapter{Level 0 Header Keywords} \label{append}
This appendix explains the 162 keywords in the XRT Level 0 FITS header. \\

\begin{footnotesize}
\rowcolors{3}{gray!35}{}
\begin{tabular}{p{0.65in}p{1.5in}p{3.1in}}
\toprule
\multicolumn{3}{c}{\textbf{XRT Level 0 FITS Header Keywords}} \\
\midrule
\T \textbf{Keyword} \B & \textbf{Value} & \textbf{Definition} \\ \hline
\T {\tt SIMPLE} \B &  T & Conforms to FITS standard  \\
\T {\tt BITPIX} \B & 8, 16, 32, -32, -64  & Number of bits per pixel  \\
\T {\tt NAXIS} \B &  2 & Number of axes in the image  \\
\T {\tt NAXIS1} \B &   & Full image size in {\it x}  \\
\T {\tt NAXIS2} \B &   &  Full image size in {\it y} \\
\T {\tt DATE} \B &  `YYYY-MM-DDThh:mm:ss.sss' & Date and time of file creation (`T' is character `T') \\
\T {\tt DATE\_RF0} \B & `YYYY-MM-DDThh:mm:ss.sss'  & Date and time of Level 0 reformatting (`T' is character `T')\\
\T {\tt SATELLIT} \B & 0x21 & Satellite number (from PDU header for images)  \\
\T {\tt TELESCOPE} \B &  `SolarB' & Derived from above  \\
\T {\tt INSTRUME} \B &  `XRT'; `SOT/SP'; `SOT/FG' & Name of the instrument; reformatter only retrieves XRT records  \\
\T {\tt TIMESYS} \B &  `UTC'; `TAI' & Time system of file header \\
\T {\tt MDP\_CLK} \B &   & MDP clock in units of 1/512$^{th}$ seconds; same as {\tt E\_SCLOCK}  \\
\T {\tt FILEORIG} \B &   & Original filename used by level 0 reformatter  \\
\T {\tt P1ROW} \B & 0 to N-1 & {\it x}-coordinate of beginning, or lower left hand corner, pixel in image FOV; same as {\tt RPOS\_ROW}   \\
\T {\tt P2ROW} \B & 0 to N-1 & {\it x}-coordinate of ending, or upper right hand corner, pixel in image FOV; same as {\tt RPOS\_ROW} + {\tt RSIZ\_ROW}  - 1    \\
\T {\tt P1COL} \B & 0 to N-1 & {\it y}-coordinate of beginning, or lower left hand corner, pixel in image FOV; same as {\tt RPOS\_COL}    \\
\T {\tt P2COL} \B & 0 to N-1 & {\it y}-coordinate of ending, or upper right hand corner, pixel in image FOV; same as {\tt RPOS\_COL} + {\tt RSIZ\_COL}  - 1   \\
\T {\tt TR\_MODE} \B & `TR1'; `TR2'; `TR3'; `TR4'; `FIX' &  Tracking mode \\
\end{tabular}
\null
\vfill

\rowcolors{3}{gray!35}{}
\begin{tabular}{p{0.65in}p{1.5in}p{3.1in}}
\toprule
\multicolumn{3}{c}{\textbf{XRT Level 0 FITS Header Keywords}} \\ 
\midrule
\T \textbf{Keyword} \B & \textbf{Value} & \textbf{Definition} \\ \hline
\T {\tt IMG\_MODE} \B & 1-3 & Image mode (source of exposure trigger); 1: Table and manual, 2: Automatic Region Selection Patrol, 3: Flare Detection Patrol  \\
\T {\tt AEC\_FLG} \B &  `off' ; `on' & Automatic Exposure Control; 1: Off, 2: On  \\
\T {\tt AEC\_TNUM} \B &   & AEC table number; 0: Out of RB, 1: In RB  \\
\T {\tt AEC\_RSLT} \B & 0-3 & Result of AEC calculation used to determine exposure time; 0: Normal, 1: Underexposure, 2: Overexposure, 3: No feedback  \\
\T {\tt ORIGIN}  \B &  `ISASÕ; ÔNAOJÕ; ÔMSSLÕ;  ÔLMSALÕ; ÔGSFCÔ; `SAOÕ & Origin of the Chief Observer  \\
\T {\tt DATA\_LEV} \B &  0, 1& Data Level; running {\bf xrt\_prep.pro} will change 0 to 1 \\
\T {\tt ORIG\_RF0} \B & `ISASÕ ; ÔNAOJÕ ; ÔMSSLÕ ;  ÔLMSALÕ ; ÔGSFCÔ ; `SAOÕ   &  Where the level 0 file was created \\
\T {\tt VER\_RF0} \B &   & Version of Level 0 reformatter  \\
\T {\tt PROG\_VER} \B & 0-7  & MDP observation table program version number  \\
\T {\tt SEQN\_VER} \B & 0-7 & OT sequence table version number  \\
\T {\tt PARM\_VER} \B & 0-3 & OT parameter table version number  \\
\T {\tt PROG\_NO} \B &  & OT program number  \\
\T {\tt SUBR\_NO} \B &   &  OT subroutine number being executed \\
\T {\tt SEQN\_NO} \B &   & OT sequence table number \\
\T {\tt MAIN\_CNT} \B &  0-7 & OT number of times to repeat main loop  \\
\T {\tt MAIN\_RPT} \B &   & OT current main-routine iteration  \\
\T {\tt MAIN\_POS} \B &   &  OT main-routine position \\
\T {\tt SUBR\_CNT} \B &   & OT sequential number of this subroutine in the main routine  \\
\T {\tt SUBR\_RPT} \B &   & OT number of times current subroutine is repeated \\
\T {\tt SUBR\_POS} \B &   &  OT loop count for current subroutine \\
\T {\tt SEQN\_CNT} \B &   & OT current sequence table repeat count  \\
\T {\tt SEQN\_RPT} \B &   &  OT sequence table repeat count \\
\T {\tt SEQN\_POS} \B &   &  OT sequence table position \\
\T {\tt OBSTITLE} \B &   & Title of observation \\
\T {\tt TARGET} \B & `Active region' ; `Quiet region' ; `Coronal hole' ; `Flare site'  &  Indicates the observation region. Flare site used when flare flag is set. Source of 
information observation planning database, or telemetry if flare flag is set. \\
\T {\tt SCI\_OBJ} \B &   & Up to 5 target phenomena selected from list. See Mission-Wide Keywords document, p. 26.  \\
\end{tabular}

\rowcolors{3}{gray!35}{}
\begin{tabular}{p{0.65in}p{1.5in}p{3.1in}}
\toprule
\multicolumn{3}{c}{\textbf{XRT Level 0 FITS Header Keywords}} \\
\midrule
\T \textbf{Keyword} \B & \textbf{Value} & \textbf{Definition} \\ \hline
\T {\tt SCI\_OBS} \B &   & Target phenomena.  \\
\T {\tt OBS\_DEC} \B &   & A few sentences describing the properties of the observation. \\
\T {\tt JOIN\_SB} \B & `ESX'; `SX'; `EX'; `X'  & Joint observation; E=EIS, S=SOT, X=XRT \\
\T {\tt OBS\_NUM} \B &   & Equal to {\tt OBS\_ID}  \\
\T {\tt JOP\_ID} \B &   & Identifier of JOP  \\
\T {\tt NOAA\_NUM} \B &   & AR Number as assigned by NOAA  \\
\T {\tt OBSERVER} \B &   &  Name(s) of Chief Observer \\
\T {\tt PLANNER} \B &   &  Name(s) of Chief Planner  \\
\T {\tt TOHBANS} \B &   &  Name(s) of Tohbans \\
\T {\tt DATATYPE} \B & `SCI'; `ENG'  & Science or engineering data; darks and flats are considered engineering data  \\
\T {\tt SAA} \B & `In'; `Out'  &  Indicates whether Hinode is in or out of a South Atlantic Anomaly region \\
\T {\tt HLZ} \B & `In'; `Out'  &  Indicates whether Hinode is in or out of  Hight Latitude Zone region \\
\T {\tt FLFLG} \B & `Flr'; `Non'  &  Indicates if flare flag set or not \\
\T {\tt S\_INSTRU} \B & 4 & Instrument number  \\
\T {\tt S\_DAT\_ID} \B & 1-3, 5-7 & Type of status packet this record was created from: 0: Not used, 1: Normal status, 2: Normal and extended status, 3: Normal 
status and memory, 4: Not used, 5: Standard HDR only, 6: Extended status, 7: Memory  \\
\T {\tt S\_DAT\_M} \B & 0, 1 & 0: Transfer to Kagoshima Space Center (KSC) and Sagamihara Satellite Operation Center (SSOC); 1: Monitor only at KSC \\
\T {\tt S\_SP\_SIZ} \B & 31-609 & Status packet size; maximum value is 609, including header.  \\
\T {\tt EC\_ID} \B & 0-65535 & Unique identifier, `main ID' \\
\T {\tt EC\_INDEX} \B & 0-35 & Redundant to {\tt EC\_EINDE}; consider this keyword obsolete\\
\T {\tt EC\_EINDE} \B & 0-35  & Exposure Index   \\
\T {\tt EC\_CD\_MO} \B & 0, 1 & Cadence mode  \\
\T {\tt EC\_CD\_M\_} \B & `safe' ; `fast'  &  Cadence mode as name \\
\T {\tt EC\_IMTYP} \B & 0, 1 & Image type; 0: Normal, 1: Dark (closed shutter)  \\
\T {\tt EC\_IMTY\_} \B & `normal' ; `dark'  & Image type; a dark is taken with the shutter closed  \\
\end{tabular}

\rowcolors{3}{gray!35}{}
\begin{tabular}{p{0.65in}p{1.5in}p{3.1in}}
\toprule
\multicolumn{3}{c}{\textbf{XRT Level 0 FITS Header Keywords}} \\
\midrule
\T \textbf{Keyword} \B & \textbf{Value} & \textbf{Definition} \\ \hline
\T {\tt EC\_FW1} \B & 0-5 & Filter Wheel 1 position  \\
\T {\tt EC\_FW1\_} \B & `Open' ; `Al\_poly' ; `C\_poly' ; `Be\_thin' ; `Be\_med' ; `Al\_med' &  Filter Wheel 1 position as name \\
\T {\tt EC\_FW2} \B & 0-5 & Filter Wheel 2 position \\
\T {\tt EC\_FW2\_} \B & `Open' ; `Al\_mesh' ; `Ti\_poly' ; `Gband' ; `Al\_thick' ; `Be\_thick' &  Filter Wheel 2 position as name \\
\T {\tt EC\_VL} \B & 0, 1 & Visible light shutter during exposure; 0: Closed, 1: Open \\
\T {\tt EC\_VL\_} \B & `closed' ; `open'  & Visible light shutter during exposure as name  \\
\T {\tt E\_SCLOCK} \B &   & Spacecraft clock of most recent status request prior to arrival of exposure command  \\
\T {\tt E\_LCLOCK} \B &  0-16777215 & Time at which exposure command processing began, local clock, converted to $\mu$s  \\
\T {\tt E\_SH\_OPE} \B &  0-16777215  & Time {\tt CCD\_EXPOSE} and {\tt OPENOUT} signals were raised (low 24 bits), converted to $\mu$s  \\
\T {\tt E\_SH\_CLO} \B &  0-16777215 & Time {\tt CCD\_EXPOSE} and {\tt OPENOUT} signals were lowered (low 24 bits), converted to $\mu$s   \\
\T {\tt EXCCDEX}  \B &  & Duration of {\tt CCD\_EXPOSE} in $\mu$s; this is the correct value to use for dark exposure times  \\
\T {\tt OBT\_TIME}  \B &   & Spacecraft clock time when {\tt CCD\_EXPOSE} was raised; this is {\tt E\_SH\_OPE} converted to spacecraft clock time  \\
\T {\tt OBT\_END}  \B &   &  Spacecraft clock time when {\tt CCD\_EXPOSE} was lowered; this is {\tt E\_SH\_CLO} converted to spacecraft clock time \\
\T {\tt E\_SH\_POS}  \B &   & Shutter encoder position  \\
\T {\tt E\_SH\_WA}  \B &   &  Waiting position A \\
\T {\tt E\_SH\_WB}  \B &   & Waiting position B  \\
\T {\tt E\_SH\_WC}  \B &   &  Waiting position C \\
\T {\tt E\_SH\_CW}  \B &   &  Waiting clockwise exposure time \\
\T {\tt E\_SH\_CCW}  \B &   &  Waiting counterclockwise exposure time \\
\T {\tt E\_VLO}  \B & 0, 1  &  VLS open microswitch; 0: Off (VLS not fully open), 1: On (VLS fully open) \\
\T {\tt E\_VLO\_}  \B & `not fully open'; `fully open'  & State of VLS  \\
\T {\tt E\_VLC}  \B & 0, 1 & VLS closed microswitch; 0: Off (VLS not fully open), 1: On (VLS fully open)   \\
\T {\tt E\_VLC\_}  \B & `not fully open'; `fully open' &  State of VLS \\
\T {\tt E\_SH\_ERR}  \B & 0, 1  & 0: No error, 1: Shutter command error \\
\T {\tt E\_FW1\_PO}  \B &   &  Filter Wheel 1 course position (internal diagnostic format) \\
\end{tabular}

\rowcolors{3}{gray!35}{}
\begin{tabular}{p{0.65in}p{1.5in}p{3.1in}}
\toprule
\multicolumn{3}{c}{\textbf{XRT Level 0 FITS Header Keywords}} \\
\midrule
\T \textbf{Keyword} \B & \textbf{Value} & \textbf{Definition} \\ \hline
\T {\tt E\_FW1\_ST}  \B &   & Filter Wheel 1 status  \\
\T {\tt E\_FW2\_PO}  \B &   & Filter Wheel 2 course position (internal diagnostic format)   \\
\T {\tt E\_FW2\_ST}  \B &   & Filter Wheel 2 status  \\
\T {\tt E\_ETIM\_E}  \B &   & Exposure time (exponent); see also {\tt E\_ETIM} (Though the value for {\tt E\_ETIM} should be normalized if the data is normalized, {\tt E\_ETIM\_E} should remain {\it unchanged} so the user can reconstruct the original exposure time.)\\
\T {\tt E\_ETIM\_M} \B &   &  Exposure time (mantissa); see also {\tt E\_ETIM}  (Though the value for {\tt E\_ETIM} should be normalized if the data is normalized, {\tt E\_ETIM\_M} should remain {\it unchanged} so the user can reconstruct the original exposure time.) \\
\T {\tt E\_ETIM}  \B &   & Exposure time in $\mu$s, derived from above two fields; this number should be normalized if the data is normalized by exposure time  \\
\T {\tt EXPTIME}  \B &   &  Requested exposure time in seconds (calculated from {\tt EC\_EINDE} and exposure table) \\
\T {\tt E\_TTN} \B &   &  Rev. number of exposure table \\
\T {\tt EXPMPAS} \B & `single'; `multi'  & Single or multipass exposure  \\
\T {\tt E\_FW1\_P} \B & `Open'; `Al\_poly'; `C\_poly'; `Be\_thin'; `Be\_med'; `Al\_med'  & Filter Wheel 1 position \\
\T {\tt E\_FW2\_P} \B & `Al\_mesh; `Ti\_poly'; `Gband'; `Al\_thick'; `Be\_thick'  & Filter Wheel 2 position  \\
\T {\tt CCD\_TEMP}\B &   & CCD temperature; ${\it t}_{c}=-95.853 + 0.55376{\it t}_{raw} + 5.9941 \cdot 10^{-5} {\it t}_{raw}^{2}$ \\
\T {\tt CCD\_TMPC} \B &   &  CCD temperature, derived from {\tt CCD\_TEMP} \\
\T {\tt CCD\_READ} \B & 0, 1 & CCD readout port; 0: right, 1: left  \\
\T {\tt READPORT} \B & `L'; `R'  & CCD readout port  \\
\T {\tt CHIP\_SUM} \B & 1, 2, 4, 8  & On-chip pixel summation for CCD; 1: 1${\times}$1, 2: 2${\times}$2, 3: 4${\times}$4, 4: 8${\times}$8  \\
\T {\tt CAL\_INFO}\B & 0, 1 & CCD image type; 0: Calibration image, 1: Observation image \\
\T {\tt CALIMAGE}\B & `CAL' ; `OBS'  & CCD readout port (from {\tt CAL\_INFO})  \\
\T {\tt POS\_COL} \B &   & CCD column number of start of image (original value multiplied by 8 to get number of pixels)  \\
\T{\tt POS\_ROW} \B &   & CCD row number of start of image (original value multiplied by 8 to get number of pixels)  \\
\end{tabular}

\rowcolors{3}{gray!35}{}
\begin{tabular}{p{0.65in}p{1.5in}p{3.1in}}
\toprule
\multicolumn{3}{c}{\textbf{XRT Level 0 FITS Header Keywords}} \\
\midrule
\T \textbf{Keyword} \B & \textbf{Value} & \textbf{Definition} \\ \hline
\T {\tt ROI\_H\_SI} \B &   & ROI horizontal size; 1: 64, 2: 128, 3: 192, 4: 256, 6: 384, 8: 512, 12: 768, 16: 1024, 24: 1540, 32: 2048; (original value multiplied by 64 to get number of pixels) \\
\T {\tt SIZ\_COL} \B &   &  Horizontal size of ROI, derived from above; value is 0 if {\tt ROI\_H\_SIZE} is reserved \\
\T {\tt ROI\_V\_SI} \B &   & ROI vertical size;  1: 64, 2: 128, 3: 192, 4: 256, 6: 384, 8: 512, 12: 768, 16: 1024, 24: 1540, 32: 2048; (original value multiplied by 64 to get number of pixels) \\
\T {\tt SIZ\_ROW} \B &   & Vertical size of ROI, derived from above; value is 0 if {\tt ROI\_V\_SIZE} is reserved \\
\T {\tt RECTIFY} \B &   & Status of rectification to put solar south-east corner at the start of the CCD image \\
\T {\tt RPOS\_COL} \B &   & The rectified coordinate, equivalent to POS\_COL, as though the image had been read out with this coordinate. If {\tt READPORT}=ÕRÕ, {\tt RPOS\_COL}={\tt POS\_COL}; otherwise {\tt RPOS\_CPOS\_COL}. \\
\T {\tt RPOS\_ROW} \B &   & Rectified {\tt POS\_ROW}. Always the same as {\tt POS\_ROW}. \\
\T {\tt RSIZ\_COL} \B &   & Rectified {\tt SIZ\_COL}. Always the same as {\tt SIZ\_COL}.  \\
\T {\tt RSIZ\_ROW} \B &   & Rectified {\tt SIZ\_ROW}. Always the same as {\tt SIZ\_ROW}.  \\
\T {\tt EFFPORT} \B &   &  Rectified readout port \\
\T {\tt FOC\_POS} \B &  -2500 to 2500 &  Focus position \\
\T {\tt BITCOMP1} \B &   & Compression table keyword  \\
\T {\tt IMGCOMP1} \B &   & Compression table keyword \\
\T {\tt QTABLE1} \B &   & Compression table keyword \\
\T {\tt BITC\_VER} \B & 2 & Bit compression lookup table version  \\
\T {\tt ACHF\_VER} \B &  76 & AC Huffman table version  \\
\T {\tt DCHF\_VER} \B & 15 & DC Huffman table version   \\
\T {\tt QTAB\_VER} \B & 0-7 & Quantization table version  \\
\T {\tt PCK\_SN0} \B &  & Data packet keyword \\
\T {\tt PCK\_SN1} \B &   & Data packet keyword \\
\T {\tt NUM\_PCKS} \B &   & Data packet keyword  \\
\T {\tt HKTSYNC} \B &   &  True if fields derived from housekeeping data have been updated. (That is, they are not missing from the database.) Default is false.  \\
\T {\tt DATE\_OBS} \B & `YYYY-MM-DDThh:mm:ss.sss' & UTC time when exposure began (`T' is character `T') \\
\T {\tt TIME-OBS} \B & `hh:mm:ss.sss' & Same value as {\tt DATE\_OBS}, but in a different format \\
\T {\tt CTIME}& `DOW MON DD hh:mm:ss YYYY' & Example: `Mon Mar 19 00:02:11 2007'; Same value as {\tt DATE\_OBS}, but in a different format   \\
\end{tabular}

\rowcolors{3}{gray!35}{}
\begin{tabular}{p{0.65in}p{1.5in}p{3.1in}}
\toprule
\multicolumn{3}{c}{\textbf{XRT Level 0 FITS Header Keywords}} \\
\midrule
\T \textbf{Keyword} \B & \textbf{Value} & \textbf{Definition} \\ \hline
\T {\tt DATE\_END} \B & `YYYY-MM-DDThh:mm:ss.sss' & UTC time when exposure began (`T' is character `T') \\
\T {\tt CRPIX1} \B & \T (NAXIS1+1)/2 \B  & Horizontal location of the image center in pixel coordinates \\
\T {\tt CRPIX2} \B & (NAXIS2+1)/2 \B  & Vertical location of the image center in pixel coordinates \\
\T {\tt SC\_ATTX} \B &   & Spacecraft attitude in {\it longitude}  \\
\T {\tt SC\_ATTY} \B &   & Spacecraft attitude in {\it latitude} \\
\T {\tt CRVAL1} \B & & Number of arcseconds of the center of the sun from the reference position in the azimuthal direction (E-W); positive is to Solar West  \\
\T {\tt CRVAL2} \B & & Number of arcseconds of the center of the sun from the reference position in the elevation direction (N-S); positive is to Solar North \\
\T {\tt CDELT1} \B & {\tt PLATESCALE} $\times$ {\tt SUMROW}  & Horizontal pixel size \\
\T {\tt CDELT2} \B & {\tt PLATESCALE} $\times$ {\tt SUMCOL}  & Vertical pixel size \\
\T {\tt CUNIT1} \B &   & Horizontal units  \\
\T {\tt CUNIT2} \B &   & Vertical Units  \\
\T {\tt CTYPE1} \B &   &  Type of units (label) of horizontal axis \\
\T {\tt CTYPE2} \B &   &  Type of units (label) of vertical axis \\
\T {\tt SAT\_ROT} \B &   &  Difference between Solar north and 
\T {\it y}-axis of the satellite \\
\T {\tt INST\_ROT} \B &   & Difference between spacecraft {\it y}-axis and image {\it y}-axis \\
\T {\tt CROTA1} \B &   &  Angle between {\it x}-axis of image (same as {\it x}-axis of CCD) and E-W axis of heliocentric coordinates ({\tt SAT\_ROT} + {\tt INST\_ROT}) \\
\T {\tt CROTA2} \B &   &  Angle between {\it y}-axis of image and N-S axis of heliocentric coordinates ({\tt SAT\_ROT} + {\tt INST\_ROT}); {\tt CROTA1} and {\tt CROTA2} are identical for XRT \\
\T {\tt XCEN} \B &   & {\it X}-coordinate of center of field of view \\
\T {\tt YCEN} \B &   &  {\it Y}-coordinate of center of field of view \\
\T {\tt XSCALE} \B &   &  Same as {\tt PLATESCL} \\
\T {\tt YSCALE} \B &   &  Same as {\tt PLATESCL} \\
\T {\tt FOVX} \B &   &  Width of field of view {\it x}-axis; equivalent to {\tt NAXIS1} $\times$ {\tt CDELT1} \\
\T {\tt FOVY} \B &   & Width of field of view {\it y}-axis; equivalent to {\tt NAXIS2} $\times$ {\tt CDELT2}  \\
\T {\tt PLATESCL} \B &   & Platescale, in units of arcseconds per pixel  \\
\end{tabular}

\end{footnotesize}

%\end{appendices}