\documentstyle [12pt]{article}
\makeindex

\newcommand{\idlinput}[1]{        \vspace{0.2in}\newline\noindent IDL$>$~{\bf\large #1}\vspace{0.2in}\newline}
\newcommand{\ftpinput}[1]{        \vspace{0.2in}\newline\noindent FTP$>$~{\bf\large #1}\vspace{0.2in}\newline}
\newcommand{\ultrixinput}[1]{     \vspace{0.2in}\newline\noindent \%~{\bf\large #1}\vspace{0.2in}\newline}
\newcommand{\vmsinput}[1]{        \vspace{0.2in}\newline\noindent \$~{\bf\large #1}\vspace{0.2in}\newline}
\newcommand{\promptinput}[2]{     \vspace{0.2in}\newline\noindent #1~{\bf\large #2}\vspace{0.2in}\newline}

%\newcommand{\idlinput}[1]{
%\begin{quotation}
%\noindent IDL$>$~{\bf #1}
%\end{quotation} \noindent}

%\newcommand{\ultrixinput}[1]{
%\begin{quotation}
%\noindent \#~{\bf #1}
%\end{quotation} \noindent}

%\newcommand{\ftpinput}[1]{
%\begin{quotation}
%\noindent FTP$>$~{\bf #1}
%\end{quotation} \noindent}

%\newcommand{\promptinput}[2]{
%\begin{quotation}
%\noindent #1~{\bf #2}
%\end{quotation} \noindent}

\begin{document}

\title{\bf Yohkoh Database and Software \\ User's Guide \\ Volume 1}

\author{
\\
\\
{\sl Ver 1.02 M.Morrison  8-Sep-92} \\
{\sl Ver 1.03 M.Morrison 18-Sep-92} \\
{\sl Ver 1.04 M.Morrison 28-Oct-92} \\
{\sl Ver 1.05 M.Morrison 30-Oct-92} \\
{\sl Ver 1.06 M.Morrison  6-Nov-92} \\
\\
\\
\\
\\
\\
}

\date{This Copy Printed: \today}

\maketitle

\newpage
\pagestyle{headings}
\pagenumbering{roman}

Some suggested reference books are:

\begin{itemize}
\item The `Red' Book: `The Yohkoh (Solar-A) Mission', Solar Physics,
Volume 136, No.1 1991

\item The `Blue' Book: Solar-A (M-3SII-6) Engineering Reference Book
(written in Japanese)

\item The File Control Document (FCD)

\item The Interactive Data Language (IDL) User's Guide

\end{itemize}

\vspace{1in}

This document is intended to be used as an introduction and quick reference
to the Yohkoh Database and Software.  The document describes the organization
of the data and the software, as well as a list of the most commonly used
programs.  If there are comments, suggestions, or questions regarding this 
document, please send them to:
\begin{quotation}
\noindent {\tt software@isass0.solar.isas.ac.jp}
\end{quotation}
\vspace{0.5in}

There will be weekly or monthly newletters which will describe additions to
the User's Guide (new programs) and modifications or corrections made to
existing software.  If you wish to be on the mailing list, please send your
request to the software account listed above.

\vspace{0.5in}
\Large{BEWARE: Version 1.06 has not been completely reviewed by all of the different 
instrument teams and might have errors.  In addition, you will notice that 
there are several sections that have not been written yet.}
\normalsize

\newpage
\tableofcontents

\newpage
\section*{Preface}

Chapter 1 is an introduction to the Yohkoh spacecraft and the instruments
on the spacecraft.  It discusses the instrument resolutions and energy ranges
as well as the basic modes in which the instruments can be operated.

Chapters 2 and 3 discuss the organization of the Yohkoh database and software.
The file names and directory organization is briefly discussed.

Chapter 4 is a simple introduction for how to access the Yohkoh data.  A user
should be able to read this chapter and follow the step by step instructions and
have data displayed on the screen in less than 5 minutes.

Chapters 5 through 21 provide a brief description of the different software 
that is available.  The information is very brief and it is recommended that
you use DOC\_LIBRARY to get more details on the capabilities of each of these
routines.  It
is organized by function and covers all the fundamental routines needed to
analyze the Yohkoh data.

Appendix A is a description of how to log into the Yohkoh computer systems and
to set up the X-window displays.  Appendix B and C describe how to access
Hawaii SPAM and NAOJ H-Alpha data.  Appendix D describes how to make laser disk and
VCR movies, and appendix E and F describes exabytes and magneto-optical disks.
Appedix G gives some guidelines for writing Yohkoh software.

Volume 2 of the Yohkoh Database and Software User's Guide contains a detailed
description of making software installations at remote sites; the internal
organization of the archive tapes; and how to run the weekly reformatter
program.

The conventions used in this manual are:
\begin{itemize}
\item Bold face for examples of what the user should type
\item Program names are capitalized when mentioned in the text description, but
are not capitalized in the user input examples
\item Variable names are in italicized when mentioned in the text description
\item There are several different types of prompts that appear in the examples.
The prompt IDL$>$ is used for when the user has already entered and is running
IDL.  The prompt \% is used to signify Unix commands, and the prompt \$ 
signifies VMS commands.  There are also FTP$>$ prompts for `File Transfer
Protocal'.
\end{itemize}

For example, you would only type .run yodat for the following User's Guide
description.  You would not type IDL$>$.  Also, for long example strings, the
string might wrap around to the next line.  The user should use a \$ sign to
continue on the next line when necessary (the example on the page is not
exactly proper)
%
\idlinput{.run yodat}
%
Some of the IDL routines are marked with a notation surrounded by [ and ].  
The notations are:

\begin{itemize}
\item [{[IDL]}] for standard IDL procedures and functions
\item [{[IDL-LIB]}] for standard IDL user library procedures and functions
\item [{[IDL-YO]}] for standard IDL user library procedures and functions that
were modified by the Yohkoh team.
\item [{[*]}] for Yohkoh software that is user contributed and might not be
completely bug free or checked out by one of the Yohkoh database and
software managers.  These are also routines which might be renamed at some
point in the future.  We would be interested in any problems or errors, but
might not be able to respond and fix them in a timely manner.   However, please
still send mail to \mbox{`software@isass0.solar.isas.ac.jp'}.  These routines might
also be removed and/or incorporated into other routines.  Please be careful
when using these routines.
\item [{~}]Routines not marked by any of the above are formal Yohkoh procedures
or functions which are fully supported by the Yohkoh team.  If there are
problems or errors with any of these routines, please send mail to the
software account on isass0.
\end{itemize}

\newpage
\pagenumbering{arabic}
\newpage %------------------------------------------------------------------------
\section{Introduction to the Yohkoh Instruments} 

\subsection{Yohkoh Observing Modes}

There are generally two Data Processor (DP) modes when Yohkoh is taking
scientific data, FLARE mode and QUIET mode.  Yohkoh uses the WBS HXS and
SXS instruments to monitor the solar activity and when a threshold is
passed the S/C enters FLARE mode.

There are three different telemetry rates, but only two are used when
observing the sun.  HIGH rate is 32 Kbits/sec and MEDIUM is 4 Kbits/sec.
When first entering FLARE mode, the DP goes into HIGH rate.  After
10 minutes, it will go into MEDIUM rate if the intensity of the flare
has subsided, but is still flaring.

\subsection{Bragg Crystal Spectrometer (BCS)}

\begin{verbatim}
Instrument:             Bent Crystal Spectrometers
Spectral lines:         Fe XXVI (1.7636-1.8044 A)    (Chan 1)
                        Fe XXV  (1.8298-1.8942 A)    (Chan 2)
                        Ca XIX  (3.1631-3.1912 A)    (Chan 3)
                        S XV    (5.0160-5.1143 A)    (Chan 4)
Spectral resolution  (l/dl):    3000 - 8000
Angular resolution:     Full disk
Best time resolution:   0.125 sec
\end{verbatim}

The BCS has the capability to bin the different channels in a variety 
of ways.  Each different binning group is defined by a separate ModeID.
For a given ModeID is it possible to determine how the data original
bins were combined before being telemetered to the ground.

\subsection{Hard X-Ray Telescope (HXT)}

\begin{verbatim}
Instrument:             Fourier Synthesis Telescope
Energy bands:           (15 - 100 keV, 4 channels)
                        Low       15- 24 keV
                        Medium-1  24- 35 keV
                        Medium-2  35- 57 keV
                        High      57-100 keV
Angular resolution:     ~5 arcsec
Effective area:         1.5 cm2 avg. x 64 elements
Best time resolution:   0.5 sec
\end{verbatim}

\subsection{Soft X-Ray Telescope (SXT)}

\begin{verbatim}
Instrument:          Glancing incidence mirror/CCD sensor
                     Co-aligned optical telescope using same CCD
Wavelength ranges:   2.5-46 A     no analysis filter
                     2.5-36 A     1265 A Al
                     2.4-32 A     2930 A Al, 2070 A Mg, 562 A Mn, 190 A C
                     2.4-23 A     2.52 micron Mg
                     2.4-13 A     11.6 micron Al
                     2.3-10 A     119 micron Be
                     4600-4800 A  Wide band optical filter
                     4290-4320 A  Narrow band optical filter
Spectral discrimination:   Filters
Angular resolution:        3 arcsec
Best time resolution:      0.5 sec
Typical resolution:        2.0 sec in FLARE, 8.0 sec in QUIET
\end{verbatim}

\subsubsection{Sequence Tables}

SXT uses sequence tables to define how to take the images will be taken.
There are 13 `slots' which are available to set the parameters.  For each
slot a separate filter, resolution and obserserving region can be
specified.  The observing region selection is from a table of 9 entries,
each entry specifies a location and the size of the output image in
pixels (this means that the field of view is different depending on the
pixel resolution used).

\newpage
\begin{verbatim}
LOOP 1 (n=infinity)
                              Img 1-1   --------------------+
   LOOP 2 (n= )                                             |
                                 Img 2-1   ------------+    |
                                 Img 2-2               |    |
       LOOP 3 (n= )                                    |    |
                                    Img 3-1   ----+    |    |
                                    Img 3-2       |    |    |
                                    Img 3-3       |    |    |
                                    Img 3-4   ----+ ---+    |
   LOOP 4 (n= )                                             |
                                 Img 4-1   ------------+    |
                                 Img 4-2               |    |
        LOOP 5 (n= )                                   |    |
                                    Img 5-1   ----+    |    |
                                    Img 5-2       |    |    |
                                    Img 5-3       |    |    |
                                    Img 5-4   ----+ ---+ ---+
\end{verbatim}

\subsubsection{Automatic Exposure Control (AEC)}

\subsubsection{Automatic Region Selection (ARS)}

\subsection{Wide Band Spectrometer (WBS)}

\begin{verbatim}
Instruments:
           Soft X-ray Spectrometer (SXS)
           Hard X-ray Spectrometer (HXS)
           Gamma-ray Spectrometer (GRS)
           Radiation Belt Monitor (RBM)

           SXS: Gas Proportional Counter (2-30 KeV, 128 channels)
           HXS: NaI scintillation counter (20-400 KeV, 32 channels)
           GRS: BGO scintillation counter (0.2-100 MeV, 134 channels)
Angular resolution:     Full disk
Best time resolution:   0.125 sec
\end{verbatim}

PC and PH data

SXS has two detectors and two channels for each detector.
\begin{verbatim}
          sxs_pc11 - SXS1 Detector, chan 1 (3-15 keV) 
          sxs_pc12 - SXS1 Detector, chan 2 (15-40 keV)
          sxs_pc21 - SXS2 Detector, chan 1 (3-15 keV) 
          sxs_pc22 - SXS2 Detector, chan 2 (15-40 keV)

          hxs_pc1  - HXS Detector, chan 1 (20-60 keV)
          hxs_pc2  - HXS Detector, chan 2 (60-600 keV)

          rbm_sc_pc1 - NaI scintillation detector (5-60 keV)
          rbm_sc_pc2 - NaI scintillation detector (60-300 keV)
          rbm_sd_pc  - Si detector (20 kev)
\end{verbatim}
           
\subsection{Spacecraft Attitude Systems}

\subsubsection{Inertial Reference Unit (IRU)}

\subsubsection{Two Dimensional Fine Sun Sensor (TFSS)}

\subsubsection{HXT Aspect Sensor (HXA)}

\subsubsection{Attitude Determination Software (ADS)}

\newpage %------------------------------------------------------------------------
\section{Introduction to the Yohkoh Database}

For a full description of the Yohkoh database and all of the different data
structures, please see the File Control Document.

\subsection{Yohkoh Data Format}

Each file shall be logically divided into the following six sections.  Some
files will not use all of the sections described below, but all of them will
have a Pointer and File Header Section.

\begin{enumerate}
\item File Information and Pointer Section
\item File Header Section
\item Quasi-Static Index Section
\item Index and Data Section
\item Instrument Optional Sections
\item Road Map Section
\end{enumerate}

The program which reads the file will learn from the Pointer Section how
to read the rest of the file and where to go to get certain data.  

The File Header Section provides information on what data is contained in
the file, generally, the extent of the time covered by the contents. 

The Quasi-Static Section of the file contains index information that
does not vary during the course of an orbit, or varies slowly.  

The Index and Data section contain `data sets'.  A data set is a single 
image for SXT, single spectra for BCS, a single major frame of data for
HXT, and two major frames of data for WBS (it takes two major frames for
a complete set of WBS data).  For each data set there is an index which
describes information on the date and time that the data was taken, the
mode and position of the instrument's peripherals (filters, HV, ...), and
information on temperature and gain information.

The Instrument Optional Section is only used by the BCS data (BDA) files and the
spacecraft attitude (ADA) files.  The BDA files hold the `DP\_SYNC' information,
which is information that is coming down every major frame.  Since the BCS
spectra is asynchronous to the major frames, it is stored separately.  The
ADA file holds the full 2048 point HXA scans.

The Roadmap Section allows a user to access a brief summary of the contents of 
the file and to perform searches on that summary to select what data should be 
extracted.

\subsection{Yohkoh Data File Names}

\subsubsection{Yohkoh Directories}

There is a set of VMS logicals and UNIX enviroment variables which point to 
the database directories.  By using these logicals in all of the access routines
(along with the routine CONCAT\_DIR) it is possible for software to be directly 
portable between VMS and Unix machines.  The following is a list of the logicals 
that exist for the Yohkoh database.

\vspace{0.2in}

% LIST_DIR.TXT input

\begin{tabular}{|l|l|l|} \hline
{\raggedright DIR\_GEN\_ADS} & {\raggedright DIR\_SXT\_CALIBRATE} & {\raggedright DIR\_BCS\_ATODAT}  \\
{\raggedright DIR\_GEN\_EVN} & {\raggedright DIR\_SXT\_DC} & {\raggedright DIR\_BCS\_BALDAT}  \\
{\raggedright DIR\_GEN\_FEM} & {\raggedright DIR\_SXT\_DOC} & {\raggedright DIR\_BCS\_CALDAT}  \\
{\raggedright DIR\_GEN\_GEV} & {\raggedright DIR\_SXT\_ENGIN} & {\raggedright DIR\_BCS\_DOC}  \\
{\raggedright DIR\_GEN\_GXT} & {\raggedright DIR\_SXT\_SENSITIVE} & {\raggedright DIR\_BCS\_EXE}  \\
{\raggedright DIR\_GEN\_MOVIE} & {\raggedright DIR\_SXT\_SFS} & {\raggedright DIR\_BCS\_LOGS}  \\
{\raggedright DIR\_GEN\_NAR} & {\raggedright DIR\_SXT\_SOT} & {\raggedright DIR\_BCS\_MICRO}  \\
{\raggedright DIR\_GEN\_OBS} & {\raggedright DIR\_SXT\_SSL} & {\raggedright DIR\_BCS\_SYNSPEC}  \\
{\raggedright DIR\_GEN\_ORBIT} & {\raggedright DIR\_SXT\_SSX} & { }  \\
{\raggedright DIR\_GEN\_ORBIT\_RAW} & {\raggedright DIR\_SXT\_SXL} & {\raggedright DIR\_GBO\_BBSO}  \\
{\raggedright DIR\_GEN\_ORBIT\_SOL} & {\raggedright DIR\_SXT\_TABLES} & {\raggedright DIR\_GBO\_KP}  \\
{\raggedright DIR\_GEN\_ORBIT\_SW} & { } & {\raggedright DIR\_GBO\_SELSISI}  \\
{\raggedright DIR\_GEN\_PAN\_LASER} & {\raggedright DIR\_WBS\_CAL} & {\raggedright DIR\_GBO\_TEMP}  \\
{\raggedright DIR\_GEN\_PNT} & { } & {~}  \\
{\raggedright DIR\_GEN\_SCRIPT} & {\raggedright DIR\_HXT\_CAL} & {~}  \\
{\raggedright DIR\_GEN\_SETUP} & {~} & {~}  \\
{\raggedright DIR\_GEN\_SYNOPTIC} & {~} & {~}  \\
{\raggedright DIR\_GEN\_TAPECOPY} & {~} & {~}  \\
{\raggedright DIR\_GEN\_XAD} & {~} & {~}  \\
{\raggedright DIR\_GEN\_XBD} & {~} & {~}  \\ \hline
\end{tabular}\vspace{0.2in}

\subsubsection{Yohkoh Prefixes}

\begin{tabular}{|l|l|l|} \hline
{\sl Prefix} & {\sl Description} & {\sl File Type}\\ \hline

ADA & {\raggedright S/C Attitude Raw Reformatted Data} & {\raggedright per Orbit}\\ \hline

BDA & {\raggedright BCS Raw Reformatted Data} & {\raggedright per Orbit}\\

BSD & {\raggedright *OLD* BCS Instrument Calibrated Spectra} & {\raggedright per Orbit}\\
BPC & {\raggedright *OLD* BSDCAL Output (parameters)} & {\raggedright per Orbit}\\
BTH & {\raggedright *OLD* BSDFIT Output (Fitted Spectra)} & {\raggedright per Orbit}\\
BFT & {\raggedright *OLD* BSDFIT Output (parameters)} & {\raggedright per Orbit}\\

BSC & {\raggedright *NEW* BCS Instrument Calibrated Spectra} & {\raggedright per Orbit}\\
BSA & {\raggedright *NEW* Answer File for BSC Generation} & {\raggedright per Orbit}\\
BSF & {\raggedright *NEW* Output from Spectral Fitting} & {\raggedright per Orbit}\\ \hline

CBA & {\raggedright S/C Common Basic Raw Reformatted Data} & {\raggedright per Orbit}\\ \hline

EVN & {\raggedright Yohkoh Event Log} & {\raggedright Weekly}\\ \hline

FEM & {\raggedright Yohkoh Ephemeris} & {\raggedright Weekly}\\ \hline

GBC & {\raggedright GBO Big Bear Large Scale H-alpha PFI FITS Image} & {\raggedright per Image}\\ \index{FITS files}
GBH & {\raggedright GBO Big Bear H-alpha FITS Image} & {\raggedright per Image}\\
GBK & {\raggedright GBO Big Bear Calcium FITS Image} & {\raggedright per Image}\\
GBW & {\raggedright GBO Big Bear White Light FITS Image} & {\raggedright pre Image}\\ \hline

GEV & {\raggedright GOES Event Log} & {\raggedright Weekly}\\
GXT & {\raggedright GOES One Minute Light Curve Data} & {\raggedright Weekly}\\
GXD & {\raggedright GOES Three Second Light Curve Data} & {\raggedright Weekly}\\ \hline

GKI & {\raggedright GBO Kitt Peak He 10830 FITS Image} & {\raggedright per Image}\\
GKM & {\raggedright GBO Kitt Peak Magnetogram FITS Image} & {\raggedright per Image}\\ \hline

HDA & {\raggedright HXT Raw Reformatted Data} & {\raggedright per Orbit}\\
HXI & {\raggedright HXT Synthesized Image} & {\raggedright per Orbit}\\ \hline

NAR & {\raggedright NOAA Active Region} & {\raggedright Weekly}\\ \hline

OBS & {\raggedright Yohkoh Observing Log} & {\raggedright Weekly}\\ \hline

PNT & {\raggedright S/C Pointing File} & {\raggedright Weekly}\\ \hline
\end{tabular}

\begin{tabular}{|l|l|l|} \hline
{\sl Prefix} & {\sl Description} & {\sl File Type}\\ \hline
SDL & {\raggedright SXT Dark Current Log} & {\raggedright Weekly}\\
SDC & {\raggedright SXT Dark Current Images} & {\raggedright Weekly (SDA)}\\
SDW & {\raggedright SXT Dark Current Images for Warm CCD} & {\raggedright Weekly (SDA)}\\

SFD & {\raggedright SXT FFI Desaturated Composite Images} & {\raggedright Weekly (SDA)}\\
SFR & {\raggedright SXT FFI Raw Reformatted Data} & {\raggedright per Orbit (SDA)}\\
SFS & {\raggedright SXT FFI Special Images (diffuser, flood...)} & {\raggedright Weekly (SDA)}\\
SFW & {\raggedright SXT FFI White Light Images} & {\raggedright Weekly (SDA)}\\

SPR & {\raggedright SXT PFI Raw Reformatted Data} & {\raggedright per Orbit (SDA)}\\

SOT & {\raggedright SXT Optical Telescope} & {\raggedright Weekly}\\

SSC & {\raggedright SXT Synoptic Images (centered)} & {\raggedright Weekly (SDA)}\\
SSE & {\raggedright SXT Synoptic Images (east of center)} & {\raggedright Weekly (SDA)}\\
SSL & {\raggedright SXT Summary Log} & {\raggedright Weekly}\\
SSW & {\raggedright SXT Synoptic Images (west of center)} & {\raggedright Weekly (SDA)}\\

SXL & {\raggedright SXT X-Ray Log} & {\raggedright Weekly}\\ \hline

WDA & {\raggedright WBS Raw Reformatted Data} & {\raggedright per Orbit}\\ \hline

XAD & {\raggedright Exabyte ASCII Directory for Archive Tape} & {\raggedright per Tape}\\ 
XBD & {\raggedright Exabyte Binary Directory for Archive Tape} & {\raggedright per Tape}\\ \hline
\end{tabular}

\vspace{0.2in}
The PNT file (eg: pnt92\_26a.01) has one dataset per major frame for each
non-night major frame of data available.  Each dataset has the average
IRU, TFSS, and HXA raw values for that major frame.  The ground derived
attitude determination software (ADS) results are also written into the
PNT file in the `sc\_pntg' field. 

The OBS...

The EVN...

The FEM file has a dataset for each time the S/C has a night to day
transition.  The times of any SAA passages and station contacts are also
saved in those files.  The files are created using the orbital solutions
which are derived weekly by NASDA. 

The SFD files (eg: sfd92\_25a.03) are the SXT full-frame desaturated
images (combination of long and short exposures to eliminate saturation
spikes on the CCD.  The two exposures must be taken less than 10 minutes
apart, be complete, and not taken during earth eclipse.  The background
is subtracted using the nearest available suitable dark frame and the
exposures and resolutions are normalized.

%TODO???... List the directory locations of the above prefix files, as well
% as the names of the routines to read it, and flag if YODAT can read it....

\subsubsection{Yohkoh File IDs}

The orbit file ID's are 11 characters long in the format shown below:

\begin{verbatim}
        YYMMDD.HHMM

        where YY - Year of data
              MM - Month of data
              DD - Day of data
              HH - Hours
              MM - Minutes
\end{verbatim}

\subsubsection{Yohkoh Week IDs}

The weekly IDs are of the form:

\begin{verbatim}

        YY_WWa.NN

        where YY - Year of data
              WW - Week number of the data (1 to 53)
               a - is fixed (reserved for future use)
              NN - is the program version number which created the file

\end{verbatim}

The following are the dates covered by each of the weeks for 1991-1993:

% MK_WEEKID.TXT input

\begin{tabular}{|l|r|r|r|} \hline
{\sl Week} & {\sl\centering 1991} & {\sl\centering 1992} & {\sl\centering 1993}\\ \hline
  01 & {\small\tt ~1-Jan-91 - ~5-Jan-91} & {\small\tt ~1-Jan-92 - ~4-Jan-92} & {\small\tt ~1-Jan-93 - ~2-Jan-93}\\
  02 & {\small\tt ~6-Jan-91 - 12-Jan-91} & {\small\tt ~5-Jan-92 - 11-Jan-92} & {\small\tt ~3-Jan-93 - ~9-Jan-93}\\
  03 & {\small\tt 13-Jan-91 - 19-Jan-91} & {\small\tt 12-Jan-92 - 18-Jan-92} & {\small\tt 10-Jan-93 - 16-Jan-93}\\
  04 & {\small\tt 20-Jan-91 - 26-Jan-91} & {\small\tt 19-Jan-92 - 25-Jan-92} & {\small\tt 17-Jan-93 - 23-Jan-93}\\
  05 & {\small\tt 27-Jan-91 - ~2-Feb-91} & {\small\tt 26-Jan-92 - ~1-Feb-92} & {\small\tt 24-Jan-93 - 30-Jan-93}\\
  06 & {\small\tt ~3-Feb-91 - ~9-Feb-91} & {\small\tt ~2-Feb-92 - ~8-Feb-92} & {\small\tt 31-Jan-93 - ~6-Feb-93}\\
  07 & {\small\tt 10-Feb-91 - 16-Feb-91} & {\small\tt ~9-Feb-92 - 15-Feb-92} & {\small\tt ~7-Feb-93 - 13-Feb-93}\\
  08 & {\small\tt 17-Feb-91 - 23-Feb-91} & {\small\tt 16-Feb-92 - 22-Feb-92} & {\small\tt 14-Feb-93 - 20-Feb-93}\\
  09 & {\small\tt 24-Feb-91 - ~2-Mar-91} & {\small\tt 23-Feb-92 - 29-Feb-92} & {\small\tt 21-Feb-93 - 27-Feb-93}\\
  10 & {\small\tt ~3-Mar-91 - ~9-Mar-91} & {\small\tt ~1-Mar-92 - ~7-Mar-92} & {\small\tt 28-Feb-93 - ~6-Mar-93}\\
  11 & {\small\tt 10-Mar-91 - 16-Mar-91} & {\small\tt ~8-Mar-92 - 14-Mar-92} & {\small\tt ~7-Mar-93 - 13-Mar-93}\\
  12 & {\small\tt 17-Mar-91 - 23-Mar-91} & {\small\tt 15-Mar-92 - 21-Mar-92} & {\small\tt 14-Mar-93 - 20-Mar-93}\\
  13 & {\small\tt 24-Mar-91 - 30-Mar-91} & {\small\tt 22-Mar-92 - 28-Mar-92} & {\small\tt 21-Mar-93 - 27-Mar-93}\\
  14 & {\small\tt 31-Mar-91 - ~6-Apr-91} & {\small\tt 29-Mar-92 - ~4-Apr-92} & {\small\tt 28-Mar-93 - ~3-Apr-93}\\
  15 & {\small\tt ~7-Apr-91 - 13-Apr-91} & {\small\tt ~5-Apr-92 - 11-Apr-92} & {\small\tt ~4-Apr-93 - 10-Apr-93}\\
  16 & {\small\tt 14-Apr-91 - 20-Apr-91} & {\small\tt 12-Apr-92 - 18-Apr-92} & {\small\tt 11-Apr-93 - 17-Apr-93}\\
  17 & {\small\tt 21-Apr-91 - 27-Apr-91} & {\small\tt 19-Apr-92 - 25-Apr-92} & {\small\tt 18-Apr-93 - 24-Apr-93}\\
  18 & {\small\tt 28-Apr-91 - ~4-May-91} & {\small\tt 26-Apr-92 - ~2-May-92} & {\small\tt 25-Apr-93 - ~1-May-93}\\
  19 & {\small\tt ~5-May-91 - 11-May-91} & {\small\tt ~3-May-92 - ~9-May-92} & {\small\tt ~2-May-93 - ~8-May-93}\\
  20 & {\small\tt 12-May-91 - 18-May-91} & {\small\tt 10-May-92 - 16-May-92} & {\small\tt ~9-May-93 - 15-May-93}\\
  21 & {\small\tt 19-May-91 - 25-May-91} & {\small\tt 17-May-92 - 23-May-92} & {\small\tt 16-May-93 - 22-May-93}\\
  22 & {\small\tt 26-May-91 - ~1-Jun-91} & {\small\tt 24-May-92 - 30-May-92} & {\small\tt 23-May-93 - 29-May-93}\\
  23 & {\small\tt ~2-Jun-91 - ~8-Jun-91} & {\small\tt 31-May-92 - ~6-Jun-92} & {\small\tt 30-May-93 - ~5-Jun-93}\\
  24 & {\small\tt ~9-Jun-91 - 15-Jun-91} & {\small\tt ~7-Jun-92 - 13-Jun-92} & {\small\tt ~6-Jun-93 - 12-Jun-93}\\
  25 & {\small\tt 16-Jun-91 - 22-Jun-91} & {\small\tt 14-Jun-92 - 20-Jun-92} & {\small\tt 13-Jun-93 - 19-Jun-93}\\
  26 & {\small\tt 23-Jun-91 - 29-Jun-91} & {\small\tt 21-Jun-92 - 27-Jun-92} & {\small\tt 20-Jun-93 - 26-Jun-93}\\
  27 & {\small\tt 30-Jun-91 - ~6-Jul-91} & {\small\tt 28-Jun-92 - ~4-Jul-92} & {\small\tt 27-Jun-93 - ~3-Jul-93}\\
  28 & {\small\tt ~7-Jul-91 - 13-Jul-91} & {\small\tt ~5-Jul-92 - 11-Jul-92} & {\small\tt ~4-Jul-93 - 10-Jul-93}\\
  29 & {\small\tt 14-Jul-91 - 20-Jul-91} & {\small\tt 12-Jul-92 - 18-Jul-92} & {\small\tt 11-Jul-93 - 17-Jul-93}\\
  30 & {\small\tt 21-Jul-91 - 27-Jul-91} & {\small\tt 19-Jul-92 - 25-Jul-92} & {\small\tt 18-Jul-93 - 24-Jul-93}\\
  31 & {\small\tt 28-Jul-91 - ~3-Aug-91} & {\small\tt 26-Jul-92 - ~1-Aug-92} & {\small\tt 25-Jul-93 - 31-Jul-93}\\
  32 & {\small\tt ~4-Aug-91 - 10-Aug-91} & {\small\tt ~2-Aug-92 - ~8-Aug-92} & {\small\tt ~1-Aug-93 - ~7-Aug-93}\\
  33 & {\small\tt 11-Aug-91 - 17-Aug-91} & {\small\tt ~9-Aug-92 - 15-Aug-92} & {\small\tt ~8-Aug-93 - 14-Aug-93}\\
  34 & {\small\tt 18-Aug-91 - 24-Aug-91} & {\small\tt 16-Aug-92 - 22-Aug-92} & {\small\tt 15-Aug-93 - 21-Aug-93}\\ \hline
\end{tabular}
\newpage
\begin{tabular}{|l|r|r|r|} \hline
{\sl Week} & {\sl\centering 1991} & {\sl\centering 1992} & {\sl\centering 1993}\\ \hline
 
  35 & {\small\tt 25-Aug-91 - 31-Aug-91} & {\small\tt 23-Aug-92 - 29-Aug-92} & {\small\tt 22-Aug-93 - 28-Aug-93}\\
  36 & {\small\tt ~1-Sep-91 - ~7-Sep-91} & {\small\tt 30-Aug-92 - ~5-Sep-92} & {\small\tt 29-Aug-93 - ~4-Sep-93}\\
  37 & {\small\tt ~8-Sep-91 - 14-Sep-91} & {\small\tt ~6-Sep-92 - 12-Sep-92} & {\small\tt ~5-Sep-93 - 11-Sep-93}\\
  38 & {\small\tt 15-Sep-91 - 21-Sep-91} & {\small\tt 13-Sep-92 - 19-Sep-92} & {\small\tt 12-Sep-93 - 18-Sep-93}\\
  39 & {\small\tt 22-Sep-91 - 28-Sep-91} & {\small\tt 20-Sep-92 - 26-Sep-92} & {\small\tt 19-Sep-93 - 25-Sep-93}\\
  40 & {\small\tt 29-Sep-91 - ~5-Oct-91} & {\small\tt 27-Sep-92 - ~3-Oct-92} & {\small\tt 26-Sep-93 - ~2-Oct-93}\\
  41 & {\small\tt ~6-Oct-91 - 12-Oct-91} & {\small\tt ~4-Oct-92 - 10-Oct-92} & {\small\tt ~3-Oct-93 - ~9-Oct-93}\\
  42 & {\small\tt 13-Oct-91 - 19-Oct-91} & {\small\tt 11-Oct-92 - 17-Oct-92} & {\small\tt 10-Oct-93 - 16-Oct-93}\\
  43 & {\small\tt 20-Oct-91 - 26-Oct-91} & {\small\tt 18-Oct-92 - 24-Oct-92} & {\small\tt 17-Oct-93 - 23-Oct-93}\\
  44 & {\small\tt 27-Oct-91 - ~2-Nov-91} & {\small\tt 25-Oct-92 - 31-Oct-92} & {\small\tt 24-Oct-93 - 30-Oct-93}\\
  45 & {\small\tt ~3-Nov-91 - ~9-Nov-91} & {\small\tt ~1-Nov-92 - ~7-Nov-92} & {\small\tt 31-Oct-93 - ~6-Nov-93}\\
  46 & {\small\tt 10-Nov-91 - 16-Nov-91} & {\small\tt ~8-Nov-92 - 14-Nov-92} & {\small\tt ~7-Nov-93 - 13-Nov-93}\\
  47 & {\small\tt 17-Nov-91 - 23-Nov-91} & {\small\tt 15-Nov-92 - 21-Nov-92} & {\small\tt 14-Nov-93 - 20-Nov-93}\\
  48 & {\small\tt 24-Nov-91 - 30-Nov-91} & {\small\tt 22-Nov-92 - 28-Nov-92} & {\small\tt 21-Nov-93 - 27-Nov-93}\\
  49 & {\small\tt ~1-Dec-91 - ~7-Dec-91} & {\small\tt 29-Nov-92 - ~5-Dec-92} & {\small\tt 28-Nov-93 - ~4-Dec-93}\\
  50 & {\small\tt ~8-Dec-91 - 14-Dec-91} & {\small\tt ~6-Dec-92 - 12-Dec-92} & {\small\tt ~5-Dec-93 - 11-Dec-93}\\
  51 & {\small\tt 15-Dec-91 - 21-Dec-91} & {\small\tt 13-Dec-92 - 19-Dec-92} & {\small\tt 12-Dec-93 - 18-Dec-93}\\
  52 & {\small\tt 22-Dec-91 - 28-Dec-91} & {\small\tt 20-Dec-92 - 26-Dec-92} & {\small\tt 19-Dec-93 - 25-Dec-93}\\
  53 & {\small\tt 29-Dec-91 - 31-Dec-91} & {\small\tt 27-Dec-92 - 31-Dec-92} & {\small\tt 26-Dec-93 - 31-Dec-93}\\ \hline
\end{tabular}

\subsubsection{Yohkoh Carrington IDs}

The Carrington IDs are of the form:

\begin{verbatim}
        _crRRRRa.NN

      where cr   - signifies a Carrington Rotation ID
            RRRR - is the rotation number
             a   - is fixed (reserved for future use)
            NN   - is the program version number which created the file
\end{verbatim}
%
\noindent The following are the dates covered by the Carrington Rotations:

% MK_CR_ID.TXT input

\begin{tabular}{|c|r|} \hline
{\sl Carrington Rotation} & {\sl Starting Date} \\ \hline
  1846 & {\tt 21-AUG-91} \\
  1847 & {\tt 18-SEP-91} \\
  1848 & {\tt 15-OCT-91} \\
  1849 & {\tt 11-NOV-91} \\
  1850 & {\tt ~8-DEC-91} \\
  1851 & {\tt ~5-JAN-92} \\
  1852 & {\tt ~1-FEB-92} \\
  1853 & {\tt 28-FEB-92} \\
  1854 & {\tt 26-MAR-92} \\
  1855 & {\tt 23-APR-92} \\
  1856 & {\tt 20-MAY-92} \\
  1857 & {\tt 16-JUN-92} \\
  1858 & {\tt 14-JUL-92} \\
  1859 & {\tt 10-AUG-92} \\
  1860 & {\tt ~6-SEP-92} \\
  1861 & {\tt ~3-OCT-92} \\
  1862 & {\tt 31-OCT-92} \\
  1863 & {\tt 27-NOV-92} \\
  1864 & {\tt 24-DEC-92} \\
  1865 & {\tt 20-JAN-93} \\
  1866 & {\tt 17-FEB-93} \\
  1867 & {\tt 16-MAR-93} \\
  1868 & {\tt 12-APR-93} \\
  1869 & {\tt 10-MAY-93} \\
  1870 & {\tt ~6-JUN-93} \\
  1871 & {\tt ~3-JUL-93} \\
  1872 & {\tt 30-JUL-93} \\
  1873 & {\tt 27-AUG-93} \\
  1874 & {\tt 23-SEP-93} \\
  1875 & {\tt 20-OCT-93} \\
  1876 & {\tt 17-NOV-93} \\ \hline
\end{tabular}


\newpage %------------------------------------------------------------------------
\section{Introduction to the Yohkoh Software}

It is assumed that you have sucessfully installed the Yohkoh software on
your system or you are using a machine that has the Yohkoh software.  In
addition to having made the software installation, it is necessary to have
executed the Yohkoh initialization routine (`/ys/gen/script/idl\_setup' or
`.yslogin' for the Unix machines).  If you have not done this yet, please
see Volume 2 of the Yohkoh Database and Software User's Guide.

\subsection{Interactive Data Language (IDL)}

Most of the Yohkoh software is written in the programming language IDL.
If certain rules are followed, then the same IDL software can be run on
a wide variety of computers.

\subsubsection{Some Comments about IDL}

In using IDL it is very easy to create many variables to the point where
there might be no memory space available.  It is possible to delete old
variables by using the DELVAR command.  For example, if you wanted to delete
the variable DATA, you would type:
%
\idlinput{delvar, data} \index{DELVAR}
%
There is a peculiarity about using the IDL routine FINDFILE and using the
Unix symbol $\sim$ for the user's home directory.  FINDFILE does not return any
files when using the command:
%
\idlinput{ff = findfile('$\sim$/*')} \index{FINDFILE}
%
It is recommended to use the full path (for example `/2p/morrison/*') instead
of $\sim$.

\subsubsection{Programs, Procedures, and Functions}

An IDL main program requires a .RUN command to run, and the code within that
file starts executing after successful compliation.

An IDL procedure is a kind of subroutine and has something like \\
\mbox{`PRO PROCEDURE\_NAME, PARAM1, PARAM2'} at 
the top of the file.  The variables in the procedure definition can be input
or output.  It is possible to have keywords with a command like \\
\mbox{`PRO PROCEDURE\_NAME, KEY1=KEY1, KEY2=KEY2'}. It can be executed with a command like:
%
\idlinput{procedure\_name, a, b}\vspace{-0.6in}
\idlinput{procedure\_name, a, b, key1=c}
%
An IDL function is another kind of subroutine and has something like \\
 \mbox{`FUNCTION FUNCTION\_NAME, PARAM1, PARAM2'}
at the top of the file.  The primary output is passed to {\it result}
but it is possible to have parameters in the call which can receive output.
It is executed with a commadnd like:
%
\idlinput{result = function\_name(a,b)}
%

\subsubsection{Running IDL programs}

When running on a Unix system, it is important to use lower case when using
the .RUN command because Unix is case sensitive.  This is not necessary when
doing an `implied' compilation when accessing procedures or functions since
IDL will convert to lower case for you.  You cannot use upper case for a
procedure to do an explicit compilation (.RUN PROCEDURE\_NAME) to recompile 
a procedure.

\subsection{Directory Organization}

The Yohkoh software is organized under one tree.  The top directory is \$ys
for Unix systems, and is the logical YS: for the VMS systems.  Under that
tree are the following branches:

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
{\sl Branch} & {\sl Description} \\ \hline
SITE & {Site specific software} \\
GEN  & {General software and documents that all instruments can use} \\
BCS  & {BCS specific software and documentation} \\
HXT  & {HXT specific software and documentation} \\
SXT  & {SXT specific software and documentation} \\
WBS  & {WBS specific software and documentation} \\
ATEST  & {Newly created or modified software and documentation} \\
UCON  & {User Contributed software and documentation} \\ \hline
\end{tabular}\vspace{0.2in}

Under each of the above instrument directories, there are the following 
directories (for example, `/ys/sxt/doc')

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
{\sl Branch} & {\sl Description} \\ \hline
DOC & {Documentation} \\
RESPONSE & {Instrument calibration and response data files} \\
SOFT & {Software} \\
STATUS & {Instrument status information} \\ \hline
\end{tabular}\vspace{0.2in}

Software that has been thoroughly tested is put into the instrument release directory `soft'.  
(The previous organization had an `atest', `rel', and `usercontrib' branch
under each `soft' directory)
Software which has just been written, or software that is modified is put into the
`atest' area for a period of a few weeks.  Users only have write priveledge to 
that directory and they need to use the IDL routine ADD\_PRO to put some software
on-line.  If problems develop with modified
software, it is possible to recover the old version by copying it from the
`soft' directory.   The software developed by general users is placed online under
the `ucon' (usercontrib) branch.  Generally each user who is contributing has a directory
of their own.  The directories under the `soft' branch are broken up by function for
the `gen' and instrument branchs, but by person under the `ucon' branch.
If a user cannot remember the name of a function, he/she can do a listing on
the different directories and he/she will probably recognize it.  A list of the
directories that currently exist for the instrument teams is:

\index{ADD\_PRO}

% LIST_REL.TXT input

\vspace{0.2in}\begin{tabular}{|l|l|l|l|l|} \hline
{\sl GEN} & {\sl BCS} & {\sl HXT} & {\sl SXT} & {\sl WBS}  \\ \hline
{dbase} & {bda} & {util} & {register} & {util}  \\
{gbo} & {bsd} & {~} & {sensitivity} & {~}  \\
{jhuapl} & {junk} & {~} & {util} & {~}  \\
{movie} & {util} & {~} & {widgets} & {~}  \\
{orbit} & {~} & {~} & {~} & {~}  \\
{pointing} & {~} & {~} & {~} & {~}  \\
{ref\_access} & {~} & {~} & {~} & {~}  \\
{reformat} & {~} & {~} & {~} & {~}  \\
{tape} & {~} & {~} & {~} & {~}  \\
{util} & {~} & {~} & {~} & {~}  \\
{utplot} & {~} & {~} & {~} & {~}  \\ \hline
\end{tabular}


\newpage %------------------------------------------------------------------------
\section{Getting Started with Yohkoh Data}

\subsection{YODAT (formally TEST\_RD)} \index{YODAT} \index{TEST\_RD}
YODAT will access any data from BCS, HXT, SXT, or WBS.  It will also read the
FITS files which have been renamed to use the Yohkoh convention. \index{FITS files}

\begin{enumerate}
\item Shows what data is on line
\item Lets you select specific files to read and disply
\item Reads the ROADMAP for the selected files
\item If you select data sets to be read, it creates the variables DATA and INDEX.
\end{enumerate}

This procedure is run by typing (make sure that yodat is in lower case if
you are running on a Unix or Ultrix machine):
%
\idlinput{.run yodat} \index{YODAT}
%
The prompt that you will receive will look something like this:

\begin{verbatim}
% Compiled module: $MAIN$.
               *******  YODAT V9.0 (26-Oct-92)  *******

It is possible to have YODAT extract every "n"th dataset by setting
the variable QYODAT_NSAMP to 1.  You will be asked one extra question

It is possible to read the Ground Based Observation (GBO) FITS files
by using a command like: MENU g*
          gb_ files are from Big Bear, gk_ are from Kitt Peak
RFITS will be called with /SCALE option if QYODAT_SCALE is set to 1

Enter MENU if you want to use the filenames menu option
Enter SAME if you want to access the same fileID for a different instrument
Enter MANY if you want to use menu option and extract many files
Enter TIME if you want to enter the start/end time to extract
Enter QUIT to abort out of YODAT

Enter file name (or wild cards)
\end{verbatim}
%
The first step is to select the data files to be read.  The name of the file(s)
selected is saved in the variable INFIL.  When a file is selected, the roadmap
for those files are read into the variable ROADMAP.  There are several different
techniques for selecting files.

\begin{itemize}
\item You can type the full file name, including the directory if the data
file does not exist in the default directory.  Wild cards are acceptable.
\item You can use the MENU option to get a listing of all of the files 
that are on-line (this option uses the output of DATA\_PATHS to get a list
of the data directories).  For example, if you type MENU SPR*, you will get
a list of all SPR files that are on-line.  Of if you type MENU BDA9207* you
get a list of all BDA files for Jul-92 that are on-line.  Click on the 
file you wish to read.
\item You can use the MANY option to select several files.  This option is
also menu driven, and is very similar to the MENU option.  After you have
selected all of the files you want to read, click on QUIT/EXIT.
\item If you have already read a file, and wish to get the same file for
a different experiment, you can use the SAME option.  For example, if you
had just read spr911115.2141, and want to get the BDA file for that orbit,
type SAME BDA.
\item Once you have selected a file, you can re-run YODAT and simply
hit RETURN and the same file is selected again.
\item If you type QUIT, then YODAT will be stopped.
\end{itemize}

The second step is to perform a quick review of the data available, and to
select the data sets to be read.  The options for selecting the data are 
listed below.

\begin{verbatim}
Enter the number of data sets to extract
   * If you enter 0, all datasets will be extracted
   * If you enter -99, then it uses the datasets specified in variable "SS"
   * If you enter -888, then the file is not read
   * For SXT, enter a negative # (from -1 to -13) to access only that seq#
   * For SXT, enter -777 for seqence menu option
              Enter -776 to use "show_obs3" and select
              Enter -775 to use "plot_fov" and select
              Enter -774 to list the sequence summary
              Enter -773 to use "show_obs4" and select
   * For HXT, enter -666 to plot and select on SUM_L light curve
              Enter -665 to plot and select on SUM_M1 light curve
              Enter -664 to plot and select on SUM_M2 light curve
              Enter -663 to plot and select on SUM_H light curve
   * For WBS, enter -555 to plot and select on SXS1 light curve
              Enter -554 to plot and select on SXS2 light curve
              Enter -553 to plot and select on HXS light curve
   * For BCS, enter -444 to plot and select on S XV light curve
              Enter -443 to plot and select on Ca XIX light curve
              Enter -442 to plot and select on Fe XXV light curve
              Enter -441 to plot and select on FE XXVI light curve
   * For any, enter -333 to extract only flare mode data
\end{verbatim}

If you selected data to be read, then the results are saved in the following variables:

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
{\it infil} & {the input file(s)} \\
{\it index} & {the index structure for datasets extracted} \\
{\it data} & {the data (array or structure) for datasets extracted} \\
{\it roadmap} & {the complete roadmap for all datasets in {\it infil}} \\
{\it dset\_arr} & {the list of dataset numbers selected} \\
{\it info\_array} & {for SXT only, a text array describing each image} \\ \hline
\end{tabular}\vspace{0.2in}

Most of the options are self explanatory.  For SXT options `SHOW\_OBS3'
and `SHOW\_OBS4', please see the description in the later chapeters of
this guide.

The light curve options (all of the $-$400, $-$500, and $-$600 series)
will show a light curve of the selected channel.  It is possible to
select the range in time you wish to look at by:
\begin{enumerate}
\item Click with the left key at the starting time
\item Click with the right key at the ending time
\item Click with the middle key to exit
\end{enumerate}

An example of how one would use the $-$99 option is:
\begin{enumerate}
\item Run YODAT to select the file and to read the roadmap
\item Exit out of YODAT with the $-$888 option
\item Select the data to be extract using SSWHERE or some other option,
      putting the results in the variable `ss'
\item Run YODAT again selecting the same file by just hitting RETURN
\item Selecting option $-$99
\end{enumerate}

\subsection{Most Common BCS Display Routines}
After having read the BCS data with YODAT, it is common to use the following 
commands.  Experiment and enjoy.
%
\idlinput{plott\_bda, index}\vspace{-0.6in}\index{PLOTT\_BDA}
\idlinput{plott\_bda, roadmap, psym=10}\vspace{-0.6in}
\idlinput{plots\_bda, index, data}\vspace{-0.35in}
%
\subsection{Most Common HXT Display Routines}
After having read the HXT data with YODAT, it is common to use the following 
commands.  Experiment and enjoy.
%
\idlinput{plott\_hda, index}\vspace{-0.6in}\index{PLOTT\_HDA}
\idlinput{plott\_hda, roadmap, psym=10}\vspace{-0.6in}
\idlinput{plots\_hda, index, data}\vspace{-0.35in}
%
\subsection{Most Common SXT Display Routines}

After having read the SXT data, it is common to use the following 
commands.  Experiment and enjoy.
%
\idlinput{stepper, data}\vspace{-0.6in}\index{STEPPER}
\idlinput{stepper, data, xsiz=512}\vspace{-0.6in}
\idlinput{stepper, data, info=info\_array}\vspace{-0.6in}
\idlinput{show\_obs3, index}\index{SHOW\_OBS3}\vspace{-0.35in}
%
\subsection{Most Common WBS Display Routines}
After having read the WBS data with YODAT, it is common to use the following 
commands.  Experiment and enjoy.
%
\idlinput{plott\_wda, index}\vspace{-0.6in}\index{PLOTT\_WDA}
\idlinput{plott\_wda, roadmap, psym=10}\vspace{-0.6in}
\idlinput{plots\_wda, index, data}\vspace{-0.35in}
%
\subsection{Advanced YODAT Options}

It is possible to use the $-$777 option to select SXT data by the sequence
table entry.  If you wish to abort from this option, click on the title
(the heading of the table).  The most common technique is to just select
one sequence entry, but it is possible to select many entries.  The
procedure to do selection option $-$777, and then:

\begin{enumerate}
\item Click on ``Enable option to select mutiple sequences (reset)''
\item Click on all of the sequence entries you wish to extract
\item Click on ``If enabled selecting multiple options, now extract data''
\end{enumerate}

\newpage %------------------------------------------------------------------------
\section{Data Selection Routines}

\subsection{TIM2DSET}

TIM2DSET will take the roadmap and return the dataset number which is
closest to that time.  Examples,
%
\idlinput{dset = tim2dset(roadmap, input\_time)}\vspace{-0.6in}\index{TIM2DSET}
\idlinput{dset = tim2dset(roadmap, '23-jun-92 6:00')}\vspace{-0.35in}
%
\subsection{SSWHERE (SXT) [*]}

SSWHERE creates an array of subscripts (ss) that fulfill a set of
criteria that you define to select SXT images, for example to make an ss
array to be used by YODAT where you want to select images from a data
set represented by roadmap, you merely type:
%
\idlinput{ss=sswhere(roadmap)} \index{SSWHERE}
%
SSWHERE works on both roadmap and index.  The available selection
criteria are

\begin{itemize}
\item completeness of the image
\item SXT mode (normal/dark image/calibration)
\item pixel resolution
\item compression mode
\item filters
\item exposure DPE
\end{itemize}

It is a widget driven program.

\subsection{SHOW\_OBS3 (SXT)}

SHOW\_OBS3 will plot a time line summary of the SXT images that are in
the index or roadmap.  In addition to plotting a tick for each image
available, it also shows the DP mode, DP rate, and where the S/C days
are SAA passages occur.  Some sample calls to SHOW\_OBS3 are:
%
\idlinput{show\_obs3, roadmap}\vspace{-0.6in}\index{SHOW\_OBS3}
\idlinput{show\_obs3, index}
%
It is possible to select images using SHOW\_OBS3 by clicking twice on
diagonally opposite corners of a box surrounding the images you wish
to select.  The calling sequence for that is:
%
\idlinput{show\_obs3, roadmap, sel, ss}
%
where {\it sel} is a returned logical array the same length as roadmap, and is set 
true for all dsets selected, and {\it ss} is the returned subscripts of the selected
datasets.  A few examples on how to use the {\it sel} variable are:
%
\idlinput{ss = where(sel)}\vspace{-0.6in}
\idlinput{ss = where(sel and (gt\_dp\_mode(roadmap) eq 9))}\vspace{-0.35in}
%
\subsection{SHOW\_OBS4 (SXT)}

The calling sequence of SHOW\_OBS4 is the same as SHOW\_OBS3, except there
are a few additional options in SHOW\_OBS4.  Run SHOW\_OBS4 with one of
the following commands:
%
\idlinput{show\_obs4, roadmap}\vspace{-0.6in}\index{SHOW\_OBS4}
\idlinput{show\_obs4, index}
%
It is possible to click on a time range for a closer look by:
\begin{enumerate}
\item Click with the left button at the start tiem
\item Click with the right button at the end time
\item Click with the left button on the box in the lower right
\item If you wish to exit, click with the middle button somewhere on the plot
\end{enumerate}

If you want to select regions, it is possible to select several regions
using the following steps.
\begin{enumerate}
\item Click with the right button on the box in the lower left (Select Option).
      A square box should appear on the screeen.
\item Click and hold the left button on the lower left corner of the box and
     drag the box to the lower left corner of the region you want to select.
     Then release.
\item Click and hold the middle button on the upper right corner of the box
    and stretch the box to encompass the images that you want to select.
\item Repeat steps 2 and three until you have positioned the box where you
      want it.
\item Click on the right button to exit the selection option when you have 
     successfully positioned the box.
\item Now you can exit SHOW\_OBS4 by clicking on the middle button, or you can
     select another set of images by running steps 1 through 5 again.
\end{enumerate}

\subsection{LIST\_BDA (BCS)}

A sample call would be:
%
\idlinput{list\_bda, roadmap, start, nrec, ss=ss}\index{LIST\_BDA}
%
where {\it roadmap} is the input.

\subsection{SEL\_BDA (BCS) [*]}

Use SELECT\_BDA to plot the roadmap light curve of a selected channel
and  select  the  time  period  of  interest using the cursors.  (Note:
there is an option to read the data in with select\_bda if required).
 
A sample call would be:
%
\idlinput{.run sel\_bda}\index{SEL\_BDA}
%
where {\it roadmap} is the input.

\subsection{WMENU\_SEL}

WMENU\_SEL is an expansion on the IDL WMENU routine.  It allows for many menu
pages if the number of items will not fit on one page.  It also allows a user
to select several items.  Some sample calls are:
%
\idlinput{ss = wmenu\_sel(array)}\vspace{-0.6in}\index{WMENU\_SEL}
\idlinput{ss = wmenu\_sel(files, /one)}
%

\newpage %------------------------------------------------------------------------
\section{Time Plotting Routines}

\subsection{UTPLOT}

UTPLOT enables one to plot any quantity on a
time plot with hours, minutes, and seconds given a
corresponding index array by typing:
%
\idlinput{utplot, roadmap, gt\_total\_cnts(roadmap, 1)}\vspace{-0.6in}
\idlinput{utplot, index, timehist}\vspace{-0.6in}\index{UTPLOT}
\idlinput{utplot, x, y, ref\_time, xrange=xrange}\vspace{-0.6in}
\idlinput{utplot, x, y, ref\_time}
%
Most typical IDL plotting parameters also apply.  You can overplot other
quantities (timehist2, etc.) by using OUTPLOT.  This routine is a
modified version of the SMM UTPLOT routine.

\subsection{OUTPLOT}
OUTPLOT works just like UTPLOT but does not refresh the
screen so one can plot several different quantities on
the same plot (see UTPLOT first).  An example is:
%
\idlinput{outplot, index, timehist2} \index{OUTPLOT}\vspace{-0.35in}
%
\subsection{PLOTY}

PLOTY enables you to plot the lightcurves from all of the Yohkoh
instruments on the same plot and the same time axis.  If you have the
observing log on-line and wish to use it to make the plots, you can
specify the plot times.  It is recommended not to plot more than 
approximately 24 hours of data at a time.  An example is:
%
\idlinput{ploty, '8-may-92 15:00', '8-may-92 18:40'} \index{PLOTY}
%
If you have identified a instrument file for which you want to see the light
curve for all of the other instruments, you can use the following command
(it assumes that the other instrument data files exist on the same 
directory as the input file):
%
\idlinput{ploty, infil='/yd5/flares/spr911115.2141'}
%
You can read the observing log data, and the use PLOTY with a command
like:
%
\idlinput{rd\_obs, '8-may-92', '8-may-92 12:00', bcs, sxtf, sxtp, w\_h}\vspace{-0.6in}
\idlinput{ploty, bcs, w\_h, sxtp, w\_h}\vspace{-0.35in}
%
\subsection{TPROFILES}
TPROFILES will plot the lightcurve for any pixel in a
data cube (data(x,y,t)). To use it just type:
%
\idlinput{tprofiles,data} \index{TPROFILES}
%
The program is mouse driven and will issue instructions for you.

\subsection{BCS\_24HR\_PLOT}

If  you  interested  only  whether  the  BCS   has   seen   anything,   use
BCS\_24HR\_PLOT.  This works using the only roadmap data and allows intervals
to de selected by date (all files covering this data are  then  used).   By
default,  channel  3  (Ca XIX) is plotted.  Note:  YODAT does NOT need to
have been run before BCS\_24HR\_PLOT.  Samples are:
%
\idlinput{bcs\_24hr\_plot, '15-nov-91'}\vspace{-0.6in}\index{BCS\_24HR\_PLOT}
\idlinput{bcs\_24hr\_plot, '15-nov-91', chan=4}\vspace{-0.35in}
%
\subsection{PLOTT\_BDA (BCS)}

This routine will make a light curve plot using either the index or
roadmap.  The second `T' signifies that it is a time plotting routine.
Four plots are made on the page, one for each channel.  Some sample calls are:
%
\idlinput{plott\_bda, index}\vspace{-0.6in}\index{PLOTT\_BDA}
\idlinput{plott\_bda, roadmap}\vspace{-0.6in}
\idlinput{plott\_bda, roadmap(100:200), psym=10}\vspace{-0.35in}
%
\subsection{LCBDA (BCS) [*]}

This routine will make a light curve plot using either the index or
roadmap.  It is almost identical to PLOTT\_BDA except that you can
specify a channel and only get that channel plotted.  Some sample calls are:
%
\idlinput{lcbda, index}\vspace{-0.6in}\index{LCBDA}
\idlinput{lcbda, roadmap, chan=1}\vspace{-0.35in}
%
\subsection{PLOTT\_HDA (HXT)}

This routine will make a light curve plot of all four channels using either the index or
roadmap.  The second `T' signifies that it is a time plotting routine.
Four plots are made on the page, one for each channel.  Some sample calls are:
%
\idlinput{plott\_hda, index}\vspace{-0.6in}\index{PLOTT\_HDA}
\idlinput{plott\_hda, roadmap}\vspace{-0.6in}
\idlinput{plott\_hda, roadmap(100:200), psym=10}\vspace{-0.35in}
%
\subsection{PLOTT\_WDA (WBS)}

This routine will make a light curve plot for all channels using either the index or
roadmap.  The second `T' signifies that it is a time plotting routine.
Seven plots are made, one for each channel.  Some sample calls are:
%
\idlinput{plott\_wda, index}\vspace{-0.6in}\index{PLOTT\_WDA}
\idlinput{plott\_wda, roadmap}\vspace{-0.6in}
\idlinput{plott\_wda, roadmap(100:200), psym=10}\vspace{-0.35in}
%
\subsection{BOX\_LC [*]}

Plot time series for an interactively determined box
of pixels within a given data cube. Calls STEPPER to present
an image to interact with. Does EXP\_NORM. Plots the results.
A sample call is:
%
\idlinput{box\_lc, data, index, timeseries, boxout}\index{BOX\_LC}\vspace{-0.6in}
\idlinput{box\_lc, data, index, timeseries, boxout, /ave}
%
where {\it data} and {\it index} are input (from an SPR file). {\it timeseries} is 
the output in DN/sec, and {\it boxout} are the coordinates selected.  If
{\it /ave} is used then the time series is in DN/sec/pixel (the box average).

\newpage %------------------------------------------------------------------------
\section{Spectral Plotting/Display Routines}

\subsection{PLOTS\_BDA (BCS)}

This routine allows for the spectra for all four channels to be plotted 
to one page.  A sample calling sequence is:
%
\idlinput{plots\_bda, index, data}\index{PLOTS\_BDA}\vspace{-0.35in}
%
\subsection{PLOTBDA (BCS)}

The light-curve and spectra from the BDA file may be plotted using PLOTBDA.
Thus is an interactive program and it will read its own data.
%
\idlinput{.run plotbda}\index{PLOTBDA}\vspace{-0.35in}
%
\subsection{BCS\_MULTI (BCS)}

Many spectra may be plotted on a page with BCS\_MULTI.
%
\idlinput{bcs\_multi, index, data}\vspace{-0.6in}\index{BCS\_MULTI}
\idlinput{bcs\_multi, index, data, chan=1}\vspace{-0.35in}
%
\subsection{BCS\_CONT (BCS)}

The evolution of  spectra  against  time  can  be  displayed  using
a contour using the routine BCS\_CONT.  Note:  The time axis of BCS\_CONT is uniform, but
that of DISP\_BDA and GS are not.
%
\idlinput{bcs\_cont, index, data}\vspace{-0.6in}\index{BCS\_CONT}
\idlinput{bcs\_cont, index, data, chan=1}\vspace{-0.35in}
%
\subsection{DISP\_BDA (BCS)}

The evolution of  spectra  against  time  can  be  displayed  as a pseudo-image 
using the routine DISP\_BDA.  Note:  The time axis of DISP\_BDA is not uniform.
%
\idlinput{disp\_bda, index, data}\index{DISP\_BDA}\vspace{-0.35in}
%
\subsection{DISP\_HDA (HXT)}

The evolution of  sensor intensity against  time  can  be  displayed as a pseudo-image
using the routine DISP\_HDA.  Note:  The time axis of DISP\_HDA is not uniform.
%
\idlinput{disp\_hda, index, data}\index{DISP\_HDA}\vspace{-0.35in}
%
\subsection{DISP\_WDA (WBS)}

The evolution of  all of the WBS spectra  against  time  can  be  displayed as a pseudo-image
using the routine DISP\_WDA.  Note:  The time axis of DISP\_WDA is not uniform.
%
\idlinput{disp\_wda, index, data}\index{DISP\_WDA}\vspace{-0.35in}
%
\subsection{BCS\_SPMOVIE (BCS)}

After selecting a time interval, a movie of  the  changing  spectra  for  a
given  channel  may  be  displayed by BCS\_SPMOVIE.  Note:  This program
will only run on an X-windows workstation.
%
\idlinput{bcs\_spmovie, index, data}\vspace{-0.6in}\index{BCS\_SPMOVIE}
\idlinput{bcs\_spmovie, index, data, chan=1}\vspace{-0.35in}
%
\subsection{GS (BCS) [*]}

If you are interested in more detail of what spectra the BCS has  observed,
use  GS  -  this  routine  must be run after the data has been read in with
YODAT.  There is an upper limit of how much data can be handled at  a  time 
(about 900 spectra), and some selection of the required time interval may be
needed using the methods described above, but for the per-orbit files, this
limit may not be a problem.  The advantage of GS is that you can get a good
idea of what has been seen in the spectra - a particularly useful  tool  if
you are trawling for data.
Warning:  The time axis on the greyscale plot is not uniform!
%
\idlinput{.run gs}\index{GS}
%
All the routines that run from GS require that spectra  be  selected  first
using the cursor routine.
%
\idlinput{.run gs\_cur}\index{GS\_CUR}
%

\newpage %------------------------------------------------------------------------
\section{Image Display and Enhancement Routines}

\subsection{STEPPER}

STEPPER takes a data cube ({\it data}) and information array ({\it info\_array}) from
the output of YODAT and will animate it.  Some sample calls are:
%
\idlinput{stepper, data} \index{STEPPER}\vspace{-0.6in}
\idlinput{stepper, data, info=info\_array}\vspace{-0.6in}
\idlinput{stepper, data, info=info\_array, xs=512}
%
where {\it info} and {\it xs} are optional parameters. {\it xs} indicates
the size of the displayed image you want (must be an
integer multiple of the the original array). It is a
window driven program.

\subsection{XSTEPPER}

XSTEPPER is like stepper but is a widget based program, to run it type:
%
\idlinput{xstepper, data, info\_array} \index{XSTEPPER}
%
It is a widget driven program with self explanatory instructions.  Some
options include the ability to zoom in on a particular region and the
ability to call XLOADCT from within XSTEPPER.

\subsection{OCONTOUR}

OCONTOUR allows you to plot a contour on top of an image
in the same way as you use CONTOUR.
%
\idlinput{ocontour,image}\index{OCONTOUR}\vspace{-0.35in}
%
\subsection{XY\_RASTER (SXT)}

Makes a mosaic of several images and prints the times in the corner 
of each by typing:
%
\idlinput{xy\_raster, data, index, factor} \index{XY\_RASTER}
%
where {\it factor} is the rebin factor (a value of 1 will perform no
rebinning)

\subsection{UP2, UP4, UP8}

To re-bin and display an image, you can use the UPn routines.  UP2
will rebin the image to be twice as big and then call TVSCL.  UP4
and UP8 increase the size of the image 4 and 8 times respectively.
A sample call would be:
%
\idlinput{up8, data(*,*,200)} \index{UP8}\index{UP4}\index{UP6}\vspace{-0.35in}
%
\subsection{UNSHARP\_MASK}

This is a basic enhancement routine with a calling sequence:
%
\idlinput{dataout=unsharp\_mask(index, data)} \index{UNSHARP\_MASK}
%
where {\it data} and {\it dataout} are 2D arrays, and {\it index} is the index
entry that corresponds to {\it data}.  If no keywords are given the
default is used.  This routine was originally called ENHANCER. \index{ENHANCER}

Optional Keyword Parameters:

\vspace{0.2in}\begin{tabular}{lp{15.0cm}}
{\tt smooth  } & {\raggedright Size of smoothing box, integer.}\\
{\tt lowdelt}  & {\raggedright Lower $\delta$ cutoff, a percentage
of minimum, decimal 0.xx.}\\
{\tt updelt  } & {\raggedright Upper $\delta$ cutoff,
a percentage of maximum, decimal 0.xx.}\\
{\tt lowint }  & {\raggedright Saturation cutoff,
don't add back when signal is BELOW\\
a given percentage of the saturation value, decimal 0.xx.}\\
{\tt upint }   & {\raggedright Saturation cutoff,
don't add back when signal is ABOVE\\
a given percentage of the saturation value, decimal 0.xx.}\\
{\tt deltcoef} & {\raggedright Multiplier for $\delta$ field,  float x.x.}
\end{tabular}\vspace{0.2in}

The keyword parameters allow you to customize the enhancer, though they
are all assigned default values if left out of the invocation. These
defaults depend on the images resolution, and may be changed as we gain 
experience.


\subsection{SXT\_GRID (SXT)}

Draws heliocentric grid over an image.  It reads the PNT file to get
information on the spacecraft pointing, and also calls GET\_RB0P to get
the solar radius.  A sample call could be:
%
\idlinput{tvscl, data(*,*,0)}\vspace{-0.6in}\index{SXT\_GRID}
\idlinput{sxt\_grid, index(0)}\vspace{-0.35in}
%
\subsection{Standard IDL Routines}

\subsubsection{TV [IDL]}

The command TV takes a 2-dimensional variable and displays it directly to
the display (you must have x-windows or a image display device).  There is
no scaling performed on the data.  If the data is not byte type, and there
are values over 255, then wrap-around will occur.  It is probably best to
use TVSCL for these datasets.  To display the first image in the variable
{\it data}, type:
%
\idlinput{tv, data(*,*,0)} \index{TV}
%
To display the ``i''th dataset, type
%
\idlinput{tv, data(*,*,i)}\vspace{-0.35in}
%
\subsubsection{TVSCL [IDL]}

TVSCL will first perform a linear byte scaling, making the smallest value 0
intensity and the largest value 255.  To display image number 11 in the
variable {\it data}, type:
%
\idlinput{tvscl, data(*,*,11)} \index{TVSCL}\vspace{-0.35in}
%
\subsubsection{CONTOUR [IDL]}

You can contour any given image by typing:
%
\idlinput{contour,image}\vspace{-0.6in}\index{CONTOUR}
\idlinput{contour, data(*,*,0)}\vspace{-0.6in}
\idlinput{contour, image, levels=[l1,l2,l3,...,ln]}
%
where levels defines the contour levels you want to plot.
{\it levels} is an optional parameter which if omitted IDL will
choose them for you. You can overplot a contour on an
image by using OCONTOUR in the same way.

\subsubsection{XLOADCT [IDL-LIB]}

XLOADCT is a widget driven IDL facility that allows you to change colour
tables and manipulate them.  To run it type
%
\idlinput{xloadct} \index{XLOADCT} \index{color tables}\vspace{-0.35in}
%
\subsubsection{LOADCT [IDL-LIB]}

LOADCT will load one of the 16 standard IDL colour tables.  To load the
red color table, type:
%
\idlinput{loadct, 3} \index{LOADCT} \index{color tables}\vspace{-0.35in}
%
\subsubsection{TVLCT [IDL]}

TVLCT allows a user to load a color table which he has defined alread.
After defining the red, green, and blue intensity profiles, type:
%
\idlinput{tvlct, red, green, blue} \index{TVLCT} \index{color tables}
%
to load the color table.  If you wish to read the color table which is
currently loaded, type:
%
\idlinput{tvlct, red, green, blue, /get}\vspace{-0.35in}
%
\subsubsection{MOVIE [IDL-YO]}

The MOVIE routine is an IDL routine that displays animates a image data
cube (x,y,t).  The data should be byte type.  It is run by typing:
%
\idlinput{movie,data} \index{MOVIE}
%
You can vary the speed of the movie.  No information is printed with the
image, for that see STEPPER and XSTEPPER.  The standard IDL routine was
modified to make !ORDER default to zero which is the proper orientation
for Yohkoh images.

\subsubsection{PALETTE [IDL-LIB]}

PALETTE is an IDL facility that allows you to create a
new colour table. To run it just type:
%
\idlinput{palette} \index{PALETTE}
%
To save the colour table use TVLCT by typing
%
\idlinput{tvlct,r,g,b,/get} \index{TVLCT}
%
This will save the red, green, and blue vectors in {\it r}, {\it g}, and {\it b}.  To
re-load this color table, type:
%
\idlinput{tvlct,r,g,b}\vspace{-0.35in}
%
\subsubsection{PROFILES [IDL]}
PROFILES enables you to obtain a plot of a row or column
of a two dimensional image by typing
%
\idlinput{profile,image} \index{PROFILE}
%
you should have image in the format (size and normalization) that you
wish first.  It is a mouse driven program. 

\subsubsection{ZOOM [IDL-LIB]}

This routine takes an image that is already being displayed and displays
the zoomed region in a new window.  The user uses the cursor and clicks
with the left button to chose the center of the region to zoom (the
selected region is displayed each time the left button is clicked).  The
middle button allows the zoom factor to be selected using a menu.  The
right button exits the zoom option (the zoom window is deleted upon
exiting ZOOM).  An example would be:
%
\idlinput{tvscl, data(*,*,5)}\vspace{-0.6in}\index{ZOOM}
\idlinput{zoom}
%

\newpage %------------------------------------------------------------------------
\section{Information Extraction Routines}

\subsection{Data Extraction}

\subsubsection{MK\_MOSAIC (SXT)}

Since the SXT Automatic ROI Selection (ARS) software might change the
pointing as the active region is tracked, it is necessary to have a
routine which will take a set of images and re-register them to the
same location.  MK\_MOSAIC will do that.  In addition, if a routine
like GET\_PNT has been run and the offset due to S/C pointing drift
is known as an offset relative to a given time, that correction can
also be made.  Sample calling sequences are:
%
\idlinput{data\_out = mk\_mosaic(data, index)}\vspace{-0.6in}\index{MK\_MOSAIC}
\idlinput{data\_out = mk\_mosaic(data, index, offset=offset)}\vspace{-0.35in}
%
\subsubsection{EXT\_SUBSET (SXT)}
EXT\_SUBSET extracts a subset (in x and y) of a data cube
and creates a new data and index array ({\it data\_out} and
{\it index\_out}) by typing:
%
\idlinput{ext\_data,index\_in,data\_in,index\_out,data\_out} \index{EXT\_DATA}
%
It is a mouse driven program.

\subsubsection{EXT\_BCSCHAN (BCS)}

The spectra for a single channel may be extracted with EXT\_BCSCHAN
%
\idlinput{data\_out = ext\_bcschan(index, data, chan)}\index{EXT\_BCSCHAN}\vspace{-0.35in}
%
\subsubsection{CONROI [*]}

Define a contoured region-of-interest of an image using the image
display system and the cursor/mouse.  This function returns a vector
containing the subscripts of pixels inside the CONTOURED region.  Note
that these are `linear' subscripts, not `X, Y' pairs. 
%
\idlinput{result = conroi( data(*,*,n) )}\vspace{-0.6in}\index{CONROI}
\idlinput{result = conroi( data(*,*,n), zoom=4)}\vspace{-0.35in}
%
\subsubsection{PR\_IMAGE}

PR\_IMAGE is used to get a print out and/or the average
count rate in a given area on an image ({\it data(*,*,n)}) by
typing:
%
\idlinput{pr\_image, data(*,*,n)}\vspace{-0.6in}\index{PR\_IMAGE}
\idlinput{pr\_image, data(*,*,n), size}
%
where {\it size} is the size of the box to be considered
(default is 9x9).  It is a mouse driven program.

\subsection{The Concept Behind the GT Routines}

A series of GT routines was created so that a single piece of information
can be extracted from a structure, whether the structure was a `roadmap'
or an `index' (the data is saved in a different location).  The routines
also allow for conversions to a string mnemonic or to physical units.  
It is possible to get a list of what the different values by typing a
command like:
%
\idlinput{print, gt\_filta()}
%
It is also possible to convert the output value to the string mnemonic by using the
{\it /STRING} switch.  For example:
%
\idlinput{print, gt\_filta(roadmap, /string)}
%
This command only works for the routines which are returning a coded value.
A list of all of the GT routines currently available are:

% LIST_GT.TXT input

\vspace{0.2in}\begin{tabular}{|l|l|l|l|l|} \hline
{\sl GEN} & {\sl BCS} & {\sl HXT} & {\sl SXT} & {\sl WBS}  \\ \hline
{gt\_day} & {gt\_blockid} & {gt\_sum\_h} & {gt\_comp} & {gt\_grs1}  \\
{gt\_dp\_mode} & {gt\_total\_cnts} & {gt\_sum\_l} & {gt\_dpe} & {gt\_grs2}  \\
{gt\_hxa} & {~} & {gt\_sum\_m1} & {gt\_entry} & {gt\_hxs}  \\
{gt\_iru} & {~} & {gt\_sum\_m2} & {gt\_expdur} & {gt\_rbmsc}  \\
{gt\_tfss} & {~} & {~} & {gt\_expmode} & {gt\_rbmsd}  \\
{gt\_conv2str} & {~} & {~} & {gt\_filta} & {gt\_sxs1}  \\
{gt\_day} & {~} & {~} & {gt\_filtb} & {gt\_sxs2}  \\
{gt\_dp\_mode} & {~} & {~} & {gt\_fov\_center} & {~}  \\
{gt\_dp\_rate} & {~} & {~} & {gt\_mbe} & {~}  \\
{gt\_time} & {~} & {~} & {gt\_obsregion} & {~}  \\
{~} & {~} & {~} & {gt\_or\_expnum} & {~}  \\
{~} & {~} & {~} & {gt\_pfi\_ffi} & {~}  \\
{~} & {~} & {~} & {gt\_res} & {~}  \\
{~} & {~} & {~} & {gt\_seq\_num} & {~}  \\
{~} & {~} & {~} & {gt\_seq\_tab} & {~}  \\
{~} & {~} & {~} & {gt\_shape\_cmd} & {~}  \\
{~} & {~} & {~} & {gt\_ssl\_explab} & {~}  \\
{~} & {~} & {~} & {gt\_temp\_ccd} & {~}  \\
{~} & {~} & {~} & {gt\_temp\_hk} & {~}  \\
{~} & {~} & {~} & {gt\_pix\_size} & {~}  \\ \hline
\end{tabular}


\subsection{General}

\subsubsection{GT\_DP\_RATE}

This routine will extract the information on the DP telemetry rate.
The values are shown below.  

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
       1 & {Low  ( 1 Kbits/sec)} \\
       2 & {Med  ( 4 Kbits/sec)} \\
       4 & {High (32 Kbits/sec)} \\ \hline
\end{tabular}\vspace{0.2in}
~\\
%
\idlinput{dprate = gt\_dp\_rate(index)}\vspace{-0.6in}\index{GT\_DP\_RATE}
\idlinput{dprate = gt\_dp\_rate(roadmap, /string)}\vspace{-0.35in}
%
\subsubsection{DPRATE2SEC}

This routine will take a structure (or an integer value 1, 2 or 4 for
low, medium, or high) and return the number of seconds that passes for
a major frame at that telemetry rate.

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
       1 & {  64 sec (Low)} \\
       2 & {  16 sec (Med)} \\
       4 & {   2 sec (High)} \\ \hline
\end{tabular}\vspace{0.2in}
%
\idlinput{nsec  = dprate2sec(index)}\index{DPRATE2SEC}\vspace{-0.35in}
%
\subsubsection{GT\_DP\_MODE}

This routine will extract the information on the DP mode.  There are 
several modes, but the most common are:

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
        9 & {  Flare  } \\
       11 & {  BCS-OUT} \\ 
       12 & {  Night  } \\
       13 & {  Quiet  } \\ \hline
\end{tabular}\vspace{0.2in}
~\\
%
\idlinput{dpmode = gt\_dp\_mode(index)}\vspace{-0.6in}\index{GT\_DP\_MODE}
\idlinput{dpmode = gt\_dp\_mode(roadmap, /string)}\vspace{-0.35in}
%
\subsection{BCS}

\subsubsection{LIST\_BDA}

If you are interested in what modes the BCS  was  executing,  or  what  the
countrate  in  a particular channel has observed at a particular time, this
can be determined by using LIST\_BDA.  By default the count rate for  channel
3 (Ca XIX) is given in the listing.  Sample calls are:
%
\idlinput{list\_bda, roadmap, start, nrec}\index{LIST\_BDA}\vspace{-0.6in}
\idlinput{list\_bda, roadmap, start, nrec, chan=4}
%
where {\it roadmap} is the input.

\subsubsection{GT\_TOTAL\_CNTS}

This routine extracts the information from the TOTAL\_CNTS field which took
the actual spectra and totaled the number of counts.  The routine also
normalizes so that it returns counts/sec.  In the first example below, all
four channels are returned, so the output is 4xN.  In the second example,
only channel 1 is extracted.  It is possible to get a string defining the
channel selected by using the {\it title} keyword option.
%
\idlinput{x = gt\_total\_cnts(roadmap)}\vspace{-0.6in}\index{GT\_TOTAL\_CNTS}
\idlinput{x = gt\_total\_cnts(roadmap,1)}\vspace{-0.6in}
\idlinput{x = gt\_total\_cnts(index,2,title=title)}\vspace{-0.35in}
%
\subsubsection{GT\_BLOCKID}

This routine returns information on how the BCS data was blocked.
%
\idlinput{x = gt\_blockid(roadmap)}\index{GT\_BLOCKID}
%

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
        0 & { Normal Queue Data Block } \\
        1 & { Fast Queue Data Block } \\
        2 & { Micro Dump Block (fixed extraction) } \\
        3 & { Cal Data Block (fixed extraction) } \\
        4 & { Queue data where the modeID in the header is not recognized } \\
        5 & { Normal or fast queue data which have fill data (garabage)  } \\ \hline
\end{tabular}

\subsection{HXT}

\subsubsection{GT\_SUM\_L, GT\_SUM\_M1, GT\_SUM\_M2, GT\_SUM\_H}

These routines will extract the average counts/sec of all 64 sensors.  
The input can be roadmap, index, or observing log and it will
get the proper structure tag and decompress it properly to 
return counts/sec/sensor.
It is possible to get a string defining the
channel selected by using the {\it title} keyword option.
%
\idlinput{y = gt\_sum\_l(roadmap)}\vspace{-0.6in}\index{GT\_SUM\_L}\index{GT\_SUM\_M1}\index{GT\_SUM\_M2}\index{GT\_SUM\_H}
\idlinput{y = gt\_sum\_l(w\_h, title=title)}\vspace{-0.35in}
%
\subsubsection{still need a GET\_INFO type routine}

\subsection{SXT}

\subsubsection{GET\_INFO2 [*]}

GET\_INFO2 will take the roadmap or index structure and return a
string describing the main observing mode parameters for each 
dataset.
%
\idlinput{info\_array = get\_info2(roadmap)} \index{GET\_INFO2}\vspace{-0.35in}
%
\subsubsection{GT\_FILTA}
GT\_FILTA enables you to find from an index or roadmap
structure  what the setting of the A filter was by simply
typing:
%
\idlinput{a = gt\_filta(index)} \index{GT\_FILTA}
%
The filter setting will be returned as an integer (1-6) where

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
        1 & { Open (Op) } \\
        2 & { Optical - narrow band (NaBan) } \\
        3 & { Quartz defocusing lens (Quart) } \\
        4 & { Diffuser (Diffu) } \\
        5 & { Optical - Wide band (WdBan) } \\
        6 & { 8\% neutral density X-ray filter (NuDen) } \\ \hline
\end{tabular}\vspace{0.2in}

It is possible to get a string type description of the filters used by
typing:
%
\idlinput{b = gt\_filtb(roadmap, /string)} \index{GT\_FILTB}
%
You can get a listing of these at anytime by typing the following:
%
\idlinput{print,gt\_filta()}\vspace{-0.35in}
%
\subsubsection{GT\_FILTB}

Exactly like GT\_FILTA but works for the X-ray filters

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
        1 & { Open (Op) } \\
        2 & { Thin Aluminum (Al.1) } \\
        3 & { Dagwood Sandwich (AlMg) } \\
        4 & { Berilium (Be119) } \\
        5 & { Thick Aluminum (Al12) } \\
        6 & { (Mg3) } \\ \hline
\end{tabular}

\subsubsection{GT\_RES}
Extracts what resolution each SXT image was taken at by typing:
%
\idlinput{res = gt\_res(roadmap)} \index{GT\_RES}
%
It outputs the resolution as a integer where:

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
        0 & { full resolution } \\
        1 & { half resolution } \\
        2 & { quarter resolution } \\ \hline
\end{tabular}\vspace{0.2in}
%
It is possible to get a string type description of the resolution by
typing:
%
\idlinput{res = gt\_res(roadmap, /string)}\vspace{-0.35in}
%
\subsubsection{GT\_COMP}
Extracts what compression was used for each SXT image was taken at by typing:
%
\idlinput{comp = gt\_comp(roadmap)} \index{GT\_COMP}
%
It outputs the compression as a integer where:

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
        0 & { Compressed (see routine SXT\_DECOMP) } \\
        1 & { Low 8 bits (of 12 bits) } \\
        2 & { High 8 bits (of 12 bits) } \\ \hline
\end{tabular}

\subsubsection{GT\_DPE}
Extracts what DP exposure (DPE) level was used.  The DPE is a function
of the shutter expsoure level (MBE) and the neutral density filter use.
Please see the `Red Book` for a full description of the DPE table.
It is possible to effective exposure duration in milliseconds by using the {\it /CONV}
switch).
%
\idlinput{dpe = gt\_dpe(index)}\vspace{-0.6in}\index{GT\_DPE}
\idlinput{msec = gt\_dpe(roadmap, /conv)}\vspace{-0.35in}
%
\subsubsection{GT\_MPE}
Extracts what mail box exposure (MBE) level was used.  This is the
actual shutter exposure level commanded.  It is possible to convert
to commanded shutter duration in milliseconds by using the /CONV
switch).
%
\idlinput{mbe = gt\_mbe(index)}\vspace{-0.6in}\index{GT\_MBE}
\idlinput{shutdur = gt\_mbe(roadmap, /conv)}\vspace{-0.35in}
%
\subsubsection{GT\_EXPDUR}
GT\_EXPDUR will calculate the effective exposure duration
not the commanded DPE)  of a series of images given an
index structure to work with.  You can get  an array of
exposures (exps) in msec by typing one of the following.  In
the second example, it returns the shutter duration (which is
also the CCD integration period).
%
\idlinput{expos = gt\_expdur(index)}\vspace{-0.6in}\index{GT\_EXPDUR}
\idlinput{expos = gt\_expdur(index, /shut\_dur)}\vspace{-0.35in}
%
\subsubsection{GT\_EXPMODE}
This routine returns the exposure mode.  The values it can return are:

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
        0 & { Normal shuttered exposure } \\
        1 & { Dark image (shutter stays closed) } \\
        2 & { Calibration image (shutter open during readout) } \\ \hline
\end{tabular}\vspace{0.2in}
~\\
%
\idlinput{expmode = gt\_expmode(index)}\index{GT\_EXPMODE}\vspace{-0.35in}
%
\subsubsection{GT\_FOV\_CENTER}

The output from this routine is arcminutes from a fixed location on
the CCD.  The fixed location is column 512, line 638. 
The results for GT\_FOV\_CENTER are currently not begin corrected
for changes in S/C pointing.
%
\idlinput{fov\_center = gt\_fov\_center(index)}\index{GT\_FOV\_CENTER}
%
where {\it fov\_center(0,*)} is arcminutes east/west with east being 
negative and {\it fov\_center(1,*)} is acrminutes north/south with
north being positive.  The routine will be upgraded shortly to use
S/C pointing history to get a true location on the sun.

\subsubsection{GT\_TEMP\_CCD}
This routine returns the temperature of the CCD in degrees celsius.
%
\idlinput{temp = gt\_temp\_ccd(index)}\index{GT\_TEMP\_CCD}\vspace{-0.35in}
%
\subsubsection{GT\_TEMP\_HK (SXT)}
This routine returns the temperature measured by the platinum resistance
thermometer (PRT) on the spacecraft and SXT instrument.  There are
16 temperatures saved in the SXT index.
%
\idlinput{temp = gt\_temp\_hk(index, 0, title=title)}\index{GT\_TEMP\_HK}\vspace{-0.35in}
%
\subsubsection{GET\_PIX\_COOR}

This routine returns the coordinate from the bottom left
of a full-frame image given an index structure by typing:
%
\idlinput{coor = get\_pix\_coor(index(0), offset=b)} \index{GET\_PIX\_COOR}
%
where b is the offest and coor is the pixel location.

\subsection{WBS}

\subsubsection{GT\_SXS1, GT\_SXS2, GT\_HXS, GT\_GRS1, GT\_GRS2, GT\_RBMSD, GT\_RBMSC}

These routines will extract the average counts/sec for the selected channel.

\vspace{0.2in}
\begin{tabular}{|l|l|l|} \hline
SXS1  & { Only SXS\_PC21 }          & { 3-15 keV} \\
SXS2  & { Only SXS\_PC22 }          & { 15-40 keV} \\
HXS   & { HXS\_PC1 plus HXS\_PC2 }  & { 20-600 keV} \\
GRS1  & { GRS\_PC11 plus GRS\_PC21} & {  0.2-0.7 MeV } \\
GRS2  & { GRS\_PC12 plus GRS\_PC22} & {  0.7-4 MeV } \\
RBMSD & {  PC1 plus PC2 }           & { 5-300 keV  } \\
RBMSC & { Only RMSSC}               & {  20 keV } \\ \hline
\end{tabular}
\vspace{0.2in}
%
The input can be roadmap, index, or observing log and it will
get the proper structure tag and decompress it properly to 
return counts/sec/sensor.
It is possible to get a string defining the
channel selected by using the {\it title} keyword option.
%
\idlinput{y = gt\_sxs1(roadmap)}\vspace{-0.6in}\index{GT\_SXS1}\index{GT\_SXS2}\index{GT\_HXS}\index{GT\_GRS1}
\idlinput{y = gt\_hxs(w\_h, title=title)}\index{GT\_GRS2}\index{GT\_RBMSD}\index{GT\_RBMSC}\vspace{-0.35in}
%
\subsubsection{still need a GET\_INFO type routine}


~\\
\newpage %------------------------------------------------------------------------
\section{Calibration and Analysis Routines}

\subsection{General}

\subsubsection{RM\_DARKLIMB [*]}

In order to subtract the limb darkening from H$\alpha$ 
or white light pictures you can call:
%
\idlinput{img\_out = rm\_darklimb(Haimage)} \index{RM\_DARKLIMB}
%
where {\it Haimage} is the name of the H$\alpha$ image with limb
darkening and {\it img\_out} is the new H$\alpha$ image with limb darkening
removed.  This routine
does not work if the image is oblate.  The image should then be viewed
with TVSCL (not TV). 

\subsection{BCS}

\subsubsection{BCS\_DECOMP}

The BCS data is normally compressed from a 12-bit? word to an 8-bit word.
BCS\_DECOMP takes the compressed data array ({\it data}) and creat an integer 
array ({\it ndat}) of the decompressed numbers by typing:
%
\idlinput{ndat = bcs\_decomp(data)} \index{BCS\_DECOMP}\vspace{-0.35in}
%
\subsubsection{BCS\_NORM}

This routine normalizes data recorded by the BCS for time, and extract the
Fast Queue data if present.  A sample call is:
%
\idlinput{dspec = bcs\_norm(index, data)}\index{BCS\_NORM}\vspace{-0.35in}
%
\subsubsection{SUM\_BDA}

A number of spectra may be summed with SUM\_BDA
%
\idlinput{data\_out = sum\_bda(index, data, modeid, nsum)}\index{SUM\_BDA}\vspace{-0.35in}
%
\subsubsection{PLOT\_REF [*]}

Overplot several spectra to show evolution of blue wing and line width.
%
\idlinput{plot\_ref, index, data, channel, dset\_arr} \index{PLOT\_REF}\vspace{-0.35in}
%
\subsubsection{MKBSD and BSDCAL}

There are three programs that have been written in standard Fortran-77 to
reduce the BCS data to fitted spectral parameters.  These are MKBSD, BSDCAL
and BSDFIT.

  MKBSD extracts the spectra, applies instrument corrections and  writes  a
      new file, the BSD file.

  BSDCAL fits selected lines in the spectra of  the  BSD  file  with  Voigt
      profiles to produce a calibrated wavelength scale and writes this fit
      information to a BPC file.

  BSDFIT fits a full theory spectra to the  calibrated  BSD  data  to  give
      electron  temperature, emission measure and plasma velocity.  The fit
      parameters are written to a BFT file.  The output theory spectra  are
      written to the BTH file.

These routines are being re-written into IDL so they will not be discussed
at this time.

\subsection{HXT}

\subsubsection{HXT\_IMG [*]} \index{HXT\_INDEX}

Jim McTiernan took the FORTRAN program which was running on the mainframes
at ISAS and converted the program to IDL.  The results have not been 
completely verified and the user interface might change.  It takes
very long to create a single image (between 1 and 30 minutes depending on
the intensity) so we recommend running in batch mode when creating more
than a couple of images.

\begin{enumerate}
\item The HDA data must be read into the variables {\it data} and {\it index}.
     A common way to do this is to use YODAT.
\item Now start running HXT\_IMG by typing 
%
\idlinput{.run hxt\_img}\vspace{-0.35in}
%
\item Answer `No' to the first question (``Have the image synthesis parameters 
been loaded and modulation patterns been calculated?'')
\item Now comes the hard part.  It is necessary to know the coordinates of
   the flare in HXA units (128 arcsec units).  Please see the routine HEL2HXA to see how to 
   convert from heliocentric coordinates to HXA coordinates.  For the
   15-Nov-91 flare the coordinates were (-2.1, -4.8)
\item Answer `Yes' to the next two questions (use the default parameter files)
\item Select the channel you wish to have an image synthesized for
\item Answer `YES' for background subtracted
\item Locate a portion of the light curve where the signal is low (just background)
    Click with the left button on the plot at the start time, click with
    the right button at the end time, click the middle button to select the
    portion you have marked.
\item Locate a portion of the light curve where the signal is high where you
    want to have the HXT image synthesized.  
    Click with the left button on the plot at the start time, click with
    the right button at the end time, click the middle button to select the
    portion you have marked.
\item The generation of that image will begin
\item You will be asked if you want to save the results in an output file.
    That output HXI file can be read with YODAT or directly with RD\_HXI.
\item When it is finished, the variables {\it index\_out} and {\it data\_out}
    will hold the results.
\end{enumerate}

\subsubsection{AUTO\_HXI [*]}

A driver for HXT\_IMG was written which will automatically figure out
how to integrate the HXT signal for each of the channels to accumulate
2000 counts.  The routine is very sensitive to the location of the
flare and will not converge if the location is not correct.
The flare is specified by selecting a time range and this means
that the data files have to be in the directories that are returned by the
DATA\_PATHS routine (it figures out which files to use from the
input times).

It figures out the location of the flare by (1) reading
the GOES event log for the flare and converting the heliocentric
coordinates, (2) converting the location of the SXT partial-frame
images into HXA coordinates, or
(3) to pass the location of the flare in the call to AUTO\_HXI.
The default is to do all channels, to use
the GOES event location, to not subtract background, and to use a variable integration time to
achieve 2000 counts. 

Some sample calls are:
%
\idlinput{auto\_hxi, sttim, entim}\vspace{-0.6in}\index{AUTO\_HXI}
\idlinput{auto\_hxi, sttim, entim, chan=0}\vspace{-0.6in}
\idlinput{auto\_hxi, sttim, entim, chan=0, /sxt\_pfi}\vspace{-0.6in}
\idlinput{auto\_hxi, sttim, entim, acc\_cnts=[1000,2000,3000,2000]}\vspace{-0.6in}
\idlinput{auto\_hxi, sttim, entim, loc=[-2.1,-4.8]}\vspace{-0.6in}
\idlinput{auto\_hxi, sttim, entim, outdir='/yd8/scratch/morrison'}
%
where {\it sttim} is the start date/time in any of the three
standard formats, and {\it entim} is the end time.

\subsection{SXT}

\subsubsection{SXT\_DECOMP}

The SXT data is normally compressed from a 12-bit word to an 8-bit word
via a pseudo-square-root compression algorithm.  SXT\_DECOMP takes the
compressed data array ({\it data}) and creat a integer array ({\it ndat}) of the
decompressed numbers by typing:
%
\idlinput{ndat = sxt\_decomp(data)} \index{SXT\_DECOMP}
%

% TODO ???... give the compression and decompression algorithms...

\subsubsection{SFD\_DECOMP}

The SFD (SXT Full-frame Desaturated) images use a logrithmic compression
in order to save the data as byte type.  The decompression algorithm
is `data\_out = $10.^{(data\_in/255.*6)}$'.  The routine SFD\_DECOMP will
do this decompression for you.  Beware: the output is floating numbers to it
is four times larger.
%
\idlinput{data\_out = sfd\_decomp(data\_in)} \index{SFD\_DECOMP}\vspace{-0.35in}
%
\subsubsection{EXP\_NORM} 

EXP\_NORM takes a data array and produces an exposure and summation mode
normalized floating point array.  Note the floating array takes four times
more room so don't use too big an array to start with.  You need to give
it an index array - make sure that the two correspond exactly or else
the results will be meaningless.  To run it, type:
%
\idlinput{ndat = exp\_norm(data,index)} \index{EXP\_NORM}
%
To do this it follows the following steps:
\begin{itemize}
\item decompresses the data array
\item subtracts background
\item divides by the exposure time
\item divides by the number of pixels binned
\end{itemize}

\subsubsection{MK\_SFD}

MK\_SFD enables you to create a desaturated set of images
from a series of long and short exposures by typing:
%
\idlinput{mk\_sfd,infil,outfil,filpref} \index{MK\_SFD}
%
where infil is a string array of one or more SFR filenames (and
locations), outfil is the string array containing the name of directory
where you want the file to be created, and filpref is a string array
which contains the 3-letter file prefix name (usually SFD).  The
desaturated image is compressed such that:

\begin{verbatim}
                      0 =         1 dn/sec/5 arcsec pixel
                    255 = 1,000,000 dn/sec/5 arcsec pixel
\end{verbatim}
Use the routine SFD\_DECOMP to restore the data from compressed bytes
to real numbers.

\subsubsection{DARK\_SUB}

It is possible to have the dark current removed from PFI and FFI images
by using the following command:
%
\idlinput{data\_out = dark\_sub(index, data)} \index{DARK\_SUB}
%
It will call the routine GET\_DC\_IMAGE to get the proper image and
take the subsection for the PFI cases.

\subsubsection{GET\_DC\_IMAGE and GET\_DC\_WARM}

These routines get an appropriate dark frame ({\it dcdata}) and its index
({\it dcindex}) to match the images you are working with.  Currently the routines
find the full-frame dark image that is closest in time and exposure level.
In the future, the routine will interpolate between two reference images
to simulate the input exposure duration.  It can be called
with the index for a single image by typing:
%
\idlinput{get\_dc\_image, index(3), dcindex, dcdata} \index{GET\_DC\_IMAGE}
%
where {\it index(3)} is the index of the image you are working with, or you can
pass a list array of indicies by typing:
%
\idlinput{get\_dc\_image, index, dcindex, dcdata, imap}
%
For this case, {\it imap} is the same length as {\it index} and tells you which
image to use in {\it dcdata} for the corresponding index.  For example,
if {\it index} is 10 elements long, and {\it imap(8)=3}, then you should use
{\it dcdata(*,*,3)} for the image that goes with {\it index(8)}.

It is possible to extract the dark frames manually using a command similar
to the following example:
%
\idlinput{get\_dc\_image, xxx, dc\_index, dc\_data, times='1-sep-92 1:00', res=0, dpe=15}
%
GET\_DC\_WARM works exactly like GET\_DC\_IMAGE but finds a
suitable dark frame when the TEC is off, i.e., the
detector is warm by typing:
%
\idlinput{get\_dc\_warm, index, dcindex, dcdata} \index{GET\_DC\_WARM}\vspace{-0.35in}
%
\subsubsection{INTERP\_IMG}

To linearly interpolate two images to a specified time type:
%
\idlinput{interp\_img, index1, img1, index2, data2, time, index\_out, img\_out}\vspace{-0.6in}\index{INTERP\_IMG}
\idlinput{interp\_img, idx(10),img(*,*,10),idx(12),img(*,*,12), time, nidx, nimg}
%
where the two input images to be interpolated are specified by the paired
variables {\it index} and {\it img}.  The input
interpolation variable {\it time} can be in any Yohkoh standard time format.
The returned parameters {\it index\_out} and {\it img\_out}
refer to the interpolated {\it index} information and the interpolated image
{\it data} respectively.

\subsection{SXT - Filter Responses}

In order to read the SXT filter responses you have to do
the following:
%
\idlinput{filen='\$DIR\_SXT\_SENSITIVE/et\_910709.genx'}\vspace{-0.6in}
\idlinput{restgen,file=filen,db,text=text,header=header}
%
where {\it filen} is the file name of the data file containing
the SXT filter responses, RESTGEN is a generic file
reading program. and the response data is put into the {\it db}
variable array which has the dimension (7,26) where

\vspace{0.2in}\begin{tabular}{|l|l|} \hline
0 & { log T(e) array (5.5-8.0) } \\
1 & { Open/Open or Noback case } \\
2 & { Al 1400 A } \\
3 & { Dagwood sandwich } \\
4 & { Be } \\
5 & { AL 12m } \\
6 & { Magnesium } \\ \hline
\end{tabular}

\subsection{SXT - Temperature and Emission Measure Determination}

\subsubsection{SXT\_TE}

This routine enables you to derive a
temperature map (te) from two filters taken of the same region by
typing:
%
\idlinput{te = sxt\_te(index1, img1, index2, img2, em=em, /getem)} \index{SXT\_TE}
%
where {\it img1} and {\it img2} are the two images in the two filters, \mbox{\it index1} and
\mbox{\it index2} are their respective index structures, and the {\it /getem} switch
(optional) provided an emission measure map ({\it em}). 

\subsubsection{LWA\_TE [*]}

LWA\_TE used SXT\_TE as a starting point, but has fallen behind in some of the
corrections made to SXT\_TE.  This routine will be removed shortly.  The
parameters are the same as SXT\_TE, but the order is different.
%
\idlinput{te = lwa\_te(img1, img2, index1, index2, em=em, /getem)} \index{LWA\_TE}\vspace{-0.35in}
%
\subsubsection{HARAT [*]}

HARAT will derive the temperature ({\it temp}) and emission measure ({\it em})
arrays for a 64 x 64 filter image pair ({\it img1, img2}) by typing:
%
\idlinput{harat, img1, img2, f1, f2, thold, temp, em} \index{HARAT}
%
where {\it f1} and {\it f2} are the numbers of the filters used, {\it thold} is the
threshold for filter 2.  Note that there must be nomalized images. 

\subsubsection{T6\_MAIN [*]}

This routine was written by Jim McTiernan at University of Berkeley.  The
capabilities and options found in this routine are being incorporated
into SXT\_TE, so this routine will probably not be on-line much longer.

\subsection{PLOT\_SOT}

PLOT\_SOT will plot out the aspect sensor degradation as a
function of time by typing:
%
\idlinput{.run plot\_sot} \index{PLOT\_SOT}
%
It will produce plots for both the narrow-band and wide-band filters.

\subsection{PLOT\_TEMPS2 [*]}

This routine plots the SXT instrument temperatures.
This program can only be run after the variable {\it index} exists which
came from an SXT file.  A common practice is to run PLOT\_SOT which gets 
images over the whole mission.
%
\idlinput {.run plot\_temps2} \index{PLOT\_TEMPS2}
%
A mosaic of time histories of the various instrument temperatures will
be plotted. 

\newpage %------------------------------------------------------------------------
\section{Spacecraft Attitude and Solar Ephemeris Routines}

\subsection{HXA\_SUNCENTER [*]}

Calculate the suncenter position (in SXT pixel coordinates) from
the HXA info in the PNT files.  Tries to reconstruct hidden limbs.
%
\idlinput{sunc = hxa\_suncenter(pnt)}\vspace{-0.6in}\index{HXA\_SUNCENTER}
\idlinput{sunc = hxa\_suncenter(index=index)}
%
If the input {\it pnt} or {\it index} have N elements, then the
result will be a floating array of 4xN elements.  {\it sunc(0,*)}
is the SXT column number in `IDL coordinates', {\it sunc(1,*)} 
is the SXT line number, {\it sunc(2,*)}
is the milliseconds of day for the input time, and {\it sunc(3,*)}
is the days since 1-Jan-79 number for the input time.

\subsection{HEL2PIX [*]}

This routine takes heliocentric coordinates on the sun and converts
to SXT pixel coordinates (with 2.46 arcsec units).
This routine does not take changes in S/C pointing into consideration.
North is positive and west is negative (NOTE: this will be changed
shortly to west being positive)
For a case where PR\_GEV returns S13W19, it should be entered
%
\idlinput{xy = hel2pix(-13, -19)}\index{HEL2PIX}\vspace{-0.6in}
\idlinput{xy = hel2pix(nn, ee)}
%
and the results {\it xy(0)} is the SXT column number (E/W) in
`IDL coordinates', and 
{\it xy(1)} is the SXT line number (N/S).

\subsection{HEL2HXA [*]}

This routine takes heliocentric coordinates on the sun and converts
to HXA coordinates (which have 128(?) arcsec units).
This routine does not take changes in S/C pointing into consideration.
North is positive and west is negative (NOTE: this will be changed
shortly to west being positive)
For a case where PR\_GEV returns S13W19, it should be entered
%
\idlinput{xy = hel2hxa(-13, -19)}\index{HEL2HXA}\vspace{-0.6in}
\idlinput{xy = hel2hxa(nn, ee)}
%
and the results {\it xy(0)} is the E/W HXA address, and 
{\it xy(1)} is the N/S HXA address.

\subsection{PIX2HEL}

Under development.            %???

\subsection{GET\_RB0P}

For a given date and time, return the
solar radius, b0 angle, and p angle for that time.
This routine used to be called PB0R, but GET\_RB0P can handle
any of the three standard time formats. \index{PB0R}
%
\idlinput{rb0p = get\_rb0p('15-nov-91')}\vspace{-0.6in}\index{GET\_RB0P}
\idlinput{rb0p = get\_rb0p(index)}
%
If N input times are passed in, then the output is 3xN where
{\it rb0p(0)} is (R) solar radius in arcseconds measured outside earth's atmosphere, 
{\it rb0p(1)} is (B0) heliographic latitude of the central point of the
solar disk, and
{\it rb0p(3)} is (P) position angle of the northern extremity of the axis
of the sun's rotation, measured eastward from the
geographic north point of the solar disk,
 
\subsection{RD\_PNT}

This routine allows a user to read the S/C pointing information.  The
PNT files have the IRU, HXA, TFSS, and ADS information for every major
frame.  A sample call would be:
%
\idlinput{rd\_pnt, sttim, entim, pnt}\vspace{-0.6in}\index{RD\_PNT}
\idlinput{rd\_pnt, '1-nov-91', '3-nov-91', pnt}\vspace{-0.35in}
%
\subsection{GET\_PNT}

For a given set of input times, this routine will read the proper
PNT records (if 100 input times are passed in, then 100 PNT records
are returned).  This routine is useful when trying to access PNT
data that covers a large range of times.
A sample call would be:
%
\idlinput{get\_pnt, index, pnt}\index{GET\_PNT}\vspace{-0.35in}
%
\subsection{GT\_HXA}

This routine will extract the HXA data from a PNT structure or
from an ADA data structure.  Some sample calls are:
%
\idlinput{hxa = gt\_hxa(pnt)}\vspace{-0.6in}\index{GT\_HXA}
\idlinput{sxtcen = gt\_hxa(pnt\_data, /sxtpix)}\vspace{-0.6in}
\idlinput{sxtcen = gt\_hxa(pnt\_data, /sxtpix, /x)}\vspace{-0.6in}
\idlinput{hxacen = gt\_hxa(pnt\_data, /hxacen)}\vspace{-0.6in}
\idlinput{hxacen = gt\_hxa(pnt\_data, /hxacen, /y)}\vspace{-0.6in}
\idlinput{x1 = gt\_hxa(pnt\_data, 0)}\vspace{-0.6in}
\idlinput{x2 = gt\_hxa(pnt\_data, 1)}\vspace{-0.6in}
\idlinput{y1 = gt\_hxa(ada\_data, 2)}
%
The {\it hxa} result would be 4xN where there are four addresses
for HXA limbs.
The {\it /x} or {\it /y} switches will result in a
single address being returned, and the {\it /sxtpix} will return
the results in SXT pixel coordinates.

\subsection{GT\_IRU}

It is possible to extract the IRU information from the PNT or ADA
structures using this routine.  The output is in arcseconds.  It
is also possible to have the drift in the IRU removed for short
time periods by using the /RESID switch (it fits a line to the drift
and subtracts that drift).  Sample calls are:
%
\idlinput{iru = gt\_iru(pnt)}\vspace{-0.6in}\index{GT\_IRU}
\idlinput{iru = gt\_iru(pnt, /resid)}\vspace{-0.6in}
\idlinput{iru = gt\_iru(ada)}\vspace{-0.6in}
\idlinput{iru = gt\_iru(ada, index, /resid)}
%

\newpage %------------------------------------------------------------------------
\section{Alignment Routines}

The alignment of SXT X-ray and white-light images can be done directly
provided that you take out the effects of spacecraft pointing shifts
between images.  This is important for:

\begin{itemize}
\item desaturation of images (combining images to remove saturation)
\item summation or differencing of images
\item making temperature or EM diagnostics
\item comparing with HXT or ground-based observations
\end{itemize}

Generally you align the X-ray images to the nearest white-light 
image then use the white-light to compare to other
data. BUT remember there is a systematic offset between
them, it is:

\begin{itemize}
\item x-axis (EW): the X-ray image is WEST of the optical
image by \mbox{$0.36 \pm .177$} pixels
\item y-axis (NS): the X-ray image is SOUTH of the optical
image by \mbox{$1.47 \pm .283$} pixels
\end{itemize}
where the pixels are full resolution SXT pixels (2.46 arcsec) and the
parenthetical numbers represent uncertainties on those quantities. 

\subsection{Finding the Center of the Image}

\subsubsection{DSK\_LOCB [*]}

DISK\_LOCB a simple locator created by Keith Strong and Alan McAllister. 
Currently works on white light, H$\alpha$, and magnetogram images. 
Anything with a clearly defined edge.  The images are all treated using
the basic histogram technique.  (There is an old routine called DSK\_LOC
that uses a using a derivative technique for white light etc., as they
have a high and bouncy background).  DSK\_LOC will find the center
coordinates, disk radius of an optical solar image by typing:
%
\idlinput{dsk\_loc, image, horzcnt=x0, vertcnt=y0, horzrad=rx, vertrad=ry} \index{DSK\_LOC}
%
where the keywords return the values of the radius and disk center. 

A complete list of the optional keywords follows:

\vspace{0.2in}\begin{tabular}{ll}
{\tt horzcnt } & {\raggedright horizontal center, floating point}\\
{\tt vertcnt}  & {\raggedright vertical center, floating point}\\
{\tt horzrad}  & {\raggedright horizontal diameter, floating point}\\
{\tt vertrad}  & {\raggedright vertical diameter, floating point}\\
{\tt eastlimb} & {\raggedright east limb, in pixels}\\
{\tt westlimb} & {\raggedright west limb, in pixels}\\
{\tt npole } &   {\raggedright north pole, in pixels}\\
{\tt spole} &    {\raggedright south pole, in pixels}
\end{tabular}

\subsubsection{GEN\_LOCB [*]}

A general limb finder. [Use doc\_library on it]

\subsubsection{FIND\_LIMB}

FIND\_LIMB also finds the location of the center of the sun and it's
radius.  A sample calling sequence is:
%
\idlinput{find\_limb, img, x0, y0, r0} \index{FIND\_LIMB}
%
where {\it img} contains the input image and {\it x0,y0,r0 }
receive the output center
location and diameter of the disk.

\subsubsection{OCENTER}

\subsection{Co-Alignment Routines}

\subsubsection{RD\_AR [*]}

RD\_AR takes  a file name (or list of file names - infil)
and a list of subscripts (ss) like that produced by
SSWHERE and produces a data and index array that is
corrected for:

\begin{itemize}
\item SXT PFI repoints
\item S/C Jitter
\item FOV changes
\item pixel resolution changes
\end{itemize}

To run it you type:
%
\idlinput{rd\_ar, infil, ss, index, data, missing=0} \index{RD\_AR}
%
where {\it infil} and {\it ss} are the input, and {\it index} and {\it data} are the
output.  The value passed by keyword {\it missing} is the DN value that
should be inserted into the array where there is no data (since
the output array could be something like 78x83xN when the input
array is 64x64xN)

\subsubsection{SXT\_CENTER [*]}

SXT\_CENTER calculates the row ({\it x}) and column ({\it y}) of the
center of the solar disk and the radius ({\it r}) of the Sun
given a data cube ({\it data}) and the index structure ({\it index})  by
entering:
%
\idlinput{sxt\_center,data,index,x,y,r} \index{SXT\_CENTER}
%
There are many options that are possible to use, please
check them with DOC\_LIBRARY.

\subsubsection{ALIGN\_CUBE (SXT) [*]}

ALIGN\_CUBE is a routine to co-align full-frame SXT images. 
The calling sequence is:
%
\idlinput{outcube=align\_cube(incube, index, i)} \index{ALIGN\_CUBE}
%
where {\it incube} is the input data, {\it index} is the respective index
entries, and {\it i} indicates which frame to use for the alignment.  N.B. 
Be careful to ensure that the image size matches the index entry
otherwise image co-alignement won't work properly. 

\subsubsection{GBO\_SCALE2 [*]}

GBO\_SCALE2 can be used for aligning SXT images with each other or with 
other images.  This routine takes two images, resizes them and lays them
on top of one another by typing:
%
\idlinput{outimg=GBO\_SCALE2(trgimg, gboimg)}\vspace{-0.6in}\index{GBO\_SCALE2}
\idlinput{outimg=GBO\_SCALE2(sxtimg, gboimg, index1, sxt=1)}\vspace{-0.6in}
\idlinput{outimg=GBO\_SCALE2(sxtimg1, sxtimg2, index1, index2, sxt=2, /mktv)}
%
which will scale the input image {\it gboimg} and center it to
match a target image {\it trgimg}.  If either of these is an SXT image then
it needs to have its index passed as well, and the SXT keyword should be
set to 1 or 2 appropriately, (i.e., for one or two SXT images). 

This routine corrects for different vertical and horizontal diameters. 
The MKTV keyword allows you to plot the result directly.
This should work with general sized images. 

\subsubsection{COMPST [*]}

There is a routine called COMPST that interleaves two images and scales
them to each use half the color table. It does no alignment and requires 
that you have or develop appropriate color tables. The calling sequence is 
%
\idlinput{imageout= compst(image1, image2)} \index{COMPST}
%
It is currently set up to work with 512x512 images.  It is recommended
that the images are massaged so that they emphasize the intensity ranges
of interest, e.g., for low-end stuff a decompressed image gives poor
results.  Creative color tables may also be useful. 

Check the rescaling and positioning of the images in each half of the color
table. 

\newpage %------------------------------------------------------------------------
\section{Directly Reading Yohkoh Reformatted Data}

\subsection{RD\_BDA, RD\_HDA, RD\_SDA, RD\_WDA, RD\_XDA} 
\index{RD\_BDA}
\index{RD\_HDA}
\index{RD\_SDA}
\index{RD\_WDA}
\index{RD\_XDA}

The RD\_xxx routines allow you to read the reformatted data files.  Each
routine has the same calling sequence, and there is a generic reading routine
called RD\_XDA which will read any of the instruments.  After you have
established the input file name(s) ({\it infil}), and which data sets to 
extract ({\it dset\_arr}), you can read the data by a command like:
%
\idlinput{rd\_sda, infil, dset\_arr, index, data}\vspace{-0.6in}
\idlinput{rd\_sda, infil, dset\_arr, index, data, roadmap} \index{RD\_SDA}
%
{\it index} is a structure which describes the data.  There is one index structure
for each dataset.  The roadmap is for all datasets in the files (not just
the selected datasets).

\subsection{RD\_ROADMAP}

RD\_ROADMAP will read the roadmap from a file (or list of files) by typing:
%
\idlinput{rd\_roadmap,infil,roadmap,ndset} \index{RD\_ROADMAP}
%
where {\it infil} is a string array of file names.  The roadmap
variable is the same as you get from YODAT

\subsection{RD\_QS} \index{RD\_QS}

%?? TODO

\subsection{Concatenation of Datasets}

\subsubsection{STR\_CONCAT}

It is possible to concatenate two structures of same or similar type
by using STR\_CONCAT.  For example, if you wanted to concatenate
the variable {\it index1} and {\it index2}, the command would be:
%
\idlinput{index\_out = str\_concat(index1, index2)} \index{STR\_CONCAT}\vspace{-0.35in}
%
\subsubsection{Concatenating Data Arrays}

A sample command for concatenating two 3-D arrays is:
%
\idlinput{out = [[[in1]],[[in2]]]}
%
If {\it in1} was 100x200x3 and {\it in2} was 100x200x3, then {\it out} would be 100x200x7.
The first two dimensions of {\it in1} and {\it in2} must be identical.  It is possible
to have {\it in2} be 100x200, in which case {\it out} would be 100x200x4.

A sample command for concatenating two 2-D arrays is:
%
\idlinput{out = [[in1],[in2]]}
%
If {\it in1} was 100x10 and {\it in2} was 100x20, then {\it out} would be 100x30.  In this
case, the first dimension of {\it in1} and {\it in2} must match.

\newpage %------------------------------------------------------------------------
\section{Saving Yohkoh Data}

\subsection{SAVEGEN} \index{SAVEGEN}

SAVEGEN is a routine available to save variables of any type (including structures).
Some sample calls are shown below.  If no file name is specified, it will use
`save.genx'.
%
\idlinput{savegen, var1, var2}\vspace{-0.6in}
\idlinput{savegen, var1, var2, var3, var4, var5, file='flare27oct92'}
%
Use RESTGEN to restore the data.  NOTE: It is recommended to use 
SAV\_SDA and SAV\_BDA whenever possible for standard
SXT and BCS data sets.  

\subsection{SAV\_SDA}

SDA\_SDA will store an index and data array in an SDA format file.  The
data array can be byte, integer*2, integer*4 or real*4.  The dimensions of
the image does not have to be the original dimensions.  A sample is:
%
\idlinput{sav\_sda, outfil, index, data}\vspace{-0.6in}\index{SAV\_SDA}
\idlinput{sav\_sda, outfil, index, data, qs}
%
where {\it outfil} is the name of the file you wish to store the data in.  If you
wish to append to an existing file, then you can use the /APPEND switch. For
example:
%
\idlinput{sav\_sda, outfil, index, data, /append}
%
Use RD\_SDA to restore the data.

\subsection{SAV\_BDA}

SAV\_BDA works in the same manner as SAV\_SDA.  A sample call would be:
%
\idlinput{sav\_bda, outfil, index, data, qs, dp\_sync} \index{SAV\_BDA}\vspace{-0.35in}
%

\subsection{SAV\_HXI}

SAV\_HXI allows you to save HXT synthesized images.  A sample call would be:
%
\idlinput{sav\_hxi, outfil, index, data} \index{SAV\_HXI}\vspace{-0.35in}
%
\subsection{SAVE [IDL]}

SAVE is an IDL facility that will save variables, etc.  into a file of
your choice.  To save a variables {\it a}, {\it b}, and {\it c} to the default file 
`idlsave.dat', type:
%
\idlinput{save, a, b, c} \index{SAVE}
%
To save to the file `junk.save', type:
%
\idlinput{save, a, b, c, filename='junk.save'}
%
To save all variables, type:
%
\idlinput{save, /all, filename='junk.save'}
%
CAUTION: When restoring the data, the variable names are restored exactly
as they were saved, so if you saved {\it a, b and c}, then when you restore that
save set, any existing variables {\it a, b and c} are deleted and when the
restore occurs.  A sample command to restore data is:
%
\idlinput{restore, 'junk.save} \index{RESTORE}\vspace{-0.35in}
%
\subsection{TIFF\_WRITE [IDL-LIB]}

To write some image data ({\it image}) to a file ({\it outfile}) in TIFF format all
you have to do is type the following for grey scale:
%
\idlinput{tiff\_write, outfil, image} \index{TIFF\_WRITE}
%
For 256 element (pseudo) color, use:
%
\idlinput{tiff\_write, outfil, image, red=r, green=g, blue=b} \index{TIFF\_WRITE}
%
where the optional parameters red, green and blue are used to save the
colour table characterized by the byte arrays (r, g, b - see TVLCT for
details about obtaining them). 

To make full (24 bit) color TIFF format files see the documentation
for tiff\_write (i.e. use the Doc\_library utility on tiff\_write).

\subsection{MK\_TIFFB}

To make full (24 bit) color TIFF format files to be read on Macintosh
computers use:
%
\idlinput{mk\_tiffb, outfile, image, r, g, b} \index{MK\_TIFFB}
%
where the required color table is specified by 256 element byte arrays
{\it r, g, b}.  The output TIFF file contains the specified image which has been
flipped vertically for direct display on (most) tiff-readers on the Macintosh
and has a resolution of 100 pixels per inch.  The default output file size
is 774 Kbytes which results from rebining into image to 508x508 and fits on
the standard double sided Mac floppies (779 Kbytes capacity).  For more
options (such as changing image size which is 508x508 by default, noflip, etc.)
or information on MK\_TIFFB use the Doc\_library utility.

\subsection{WRT\_FITS [*]}

WRT\_FITS creates a FITS file from an image ({\it data}) by typing: \index{FITS files}
%
\idlinput{wrt\_fits, outfil, header, data(*,*,n)} \index{WRT\_FITS}
%
where {\it outfil} is the string containing the filename.  {\it header} is optional
input which is the FITS string array ASCII header.  If it is undefined, then
WRT\_FITS will build the minimal header.  The routine RFITS should be used
to read it.

\subsection{SXT2FITS}

It is possible to take an SXT data file or an index and data that has
already been read in, and write a single FITS file for each image.  The
FITS header has all of the information on the date and time, the filters
used, the exposure duration, the resolution, and the DP mode and rate.  The
following command will create a file for each image in the {\it data} array: \index{FITS files}
%
\idlinput{sxt2fits, index, data} \index{SXT2FITS}
%
The default file names are `SF\_FITSyymmdd.hhmmss' for FFI images and 
`SP\_FITSyymmdd.hhmmss' for PFI images.  If a single output file name was passed
to the SXT2FITS routine, but there are several images to save, then it will
append an image number to the end of the file name.  In the following example,
the input array is 512x512x3, so it will create the files `flare.0001', `flare.0002'
and `flare.0003'.
%
\idlinput{sxt2fits, index, data, outfil='flare'}
%
It is possible to specify an input file name in which case all images in that
file will have FITS files created.  It is also possible to specify a list
of the images to be saved.  Some examples of these calls are:
%
\idlinput{sxt2fits, index, data, ss=ss}\vspace{-0.6in}
\idlinput{sxt2fits, infil=infil}\vspace{-0.6in}
\idlinput{sxt2fits, infil=infil, ss=ss}
%

\newpage %------------------------------------------------------------------------
\section{Accessing Yohkoh Database}

\subsection{SXT Tables}

\subsubsection{GTAB\_COMM, GTAB\_ENTRY, GTAB\_ROI}

It is possible to get information on what was used in a SXT table by
using one of these routines.  GTAB\_COMM returns information on the
common table, GTAB\_ENTRY returns information on the entry tables,
and GTAB\_ROI returns information on the ROI location and image
shape tables.  Some sample calls:
%
\idlinput{print, gtab\_comm(index)}\vspace{-0.6in}\index{GTAB\_COMM}\index{GTAB\_ENTRY}\index{GTAB\_ROI}
\idlinput{print, gtab\_comm('15-nov-91')}\vspace{-0.35in}
%
\subsubsection{GTAB\_PFI and GTAB\_FFI}

These routines allow a user to print information on the partial-frame
and full-frame observing sequence being used.  There are four possible
sequences for PFI and four more for FFI.  Which sequence is used is
determined by the DP mode and telemetry rate.  If the SXT index for
an image is passed, then it will figure out which of the four was
running at that time.  
%
\idlinput{print, gtab\_ffi(index)}\vspace{-0.6in}\index{GTAB\_FFI}\index{GTAB\_PFI}
\idlinput{print, gtab\_pfi('15-nov-91', 2)}
%
If a time is passed, it will default to show
sequence number 0.  It is possible to speicify which sequence table by passing
it as a second parameter.

\subsection{Printing out Summaries}

\subsubsection{CONTACTS}

This routine will give information on when the ground station contacts are 
for a given day.  The output from the commmand:
%
\idlinput{contacts,'2-jun-92'}\index{CONTACTS}
%
would be
\begin{verbatim}
             Kagoshima Space Center Contacts           Minutes of
                  Starts                   Ends       Day  Ngt  Tot
         JST              (UT)             JST
 2-JUN-92 02:56:14 ( 1-JUN-92 17:56:14)   03:07:14    3.5  7.5 11.0
 2-JUN-92 04:39:59 ( 1-JUN-92 19:39:59)   04:48:59    7.8  1.2  9.0

 2-JUN-92 20:27:14 ( 2-JUN-92 11:27:14)   20:37:14    4.0  6.0 10.0
 2-JUN-92 22:09:14 ( 2-JUN-92 13:09:14)   22:21:14    0.0 12.0 12.0
 2-JUN-92 23:52:29 ( 2-JUN-92 14:52:29)   00:04:14    0.0 11.8 11.8
\end{verbatim}
A blank line is inserted to show that the second set of contacts
is for a different series of contacts (they come in clusters of
five or six per day).  It is possible to get the station contacts times
for DSN stations by using the {\it /CANBERRA, /GOLDSTONE} or {\it
/MADRID} switches.  It is possible to specify an end time and output
files in the following example:
%
\idlinput{contacts, '1-jun-92', '10-jun-92', outfil='contacts.txt'}\vspace{-0.35in}
%
\subsubsection{PR\_FEM}
PR\_FEM will print out Yohkoh's day and night events by typing:
%
\idlinput{pr\_fem, '1-jan'} \index{PR\_FEM}
%
\subsubsection{PR\_EVN}

PR\_EVN helps you find when there is Yohkoh data available.  An event is driven
by a change between QUIET and FLARE mode, or when there is a data gap of more 
than 60 seconds.  By typing:
%
\idlinput{pr\_evn, '23-jun-92'} \index{PR\_EVN}
%
a list of the times that Yohkoh data is available and the number of datasets
available for each instrument is listed for 24 hours starting at 23-jun-92 00:00.
By typing:
%
\idlinput{pr\_evn, '15-nov-91 20:00', '17-nov-91 15:00', /flare}
%
all times that Yohkoh was in FLARE mode between those times is listed.  By typing:
%
\idlinput{pr\_evn, '1-jan-92', '1-jan-93', /flare, /counts, outfil='pr\_evn.results'}
%
the FLARE modes for 1992, and since the /COUNTS option was used, the maximum 
counting rate for certain WBS, HXT, and BCS channels is printed instead of the
number of datasets available.  It also prints the GOES classification when
it is available.

\subsubsection{PR\_GEV}

The GOES event log files are available with the Yohkoh database.  To get a
printout of the x-ray events for a given day, use something like:
%
\idlinput{pr\_gev,'2-nov-92}\index{PR\_GEV}
%
The following would be displayed:

\begin{verbatim}
PR_GEV.PRO Run on:  6-Nov-1992 14:41:55.00

   Date       Time (UT)      X-Ray Opt Loca- NOAA      Peak Radio    Reports
           Begin  Max   End  Class Imp tion  Region

 2-NOV-92  00:40 00:57 01:09  C1.4
 2-NOV-92  02:31 03:08 03:28  X9.0                  5000 17000-22536 II,III,IV,C,L
 2-NOV-92  07:48 07:48 08:04       SF N15W19 7324
 2-NOV-92  09:09 09:10 09:31       SF N16W21 7324
 2-NOV-92  09:40 09:57 10:02       SF S16W46 7323
 2-NOV-92  12:26 12:27 13:25       SF S16W49 7323
 2-NOV-92  12:26 13:22 13:39       SF S06E61 7330                    III
 2-NOV-92  17:30 17:39 17:48       SF S08E60 7330
\end{verbatim}

\subsection{Plotting Summaries}

\subsubsection{PLOTY}

Please see the section described in the chapter on `Time Plotting Routines'.

\subsubsection{PLOT\_GOES}

This routine will plot the GOES one minute light curve data.  The 
following are a few examples:
%
\idlinput{plot\_goes, '2-nov-92'}\vspace{-0.6in}\index{PLOT\_GOES}
\idlinput{plot\_goes, '2-nov-92', '4-nov-92'}
%
The default is to plot 24 hours of data.

\subsubsection{PLOT\_EVN}

This routine will plot a very basic time line showing when the
station contacts are available, when the SAA passages are, when
the S/C day and nights are, and the periods when there is 
Yohkoh data available.  It shows when there is FLARE and QUIET
data.

\subsection{Reading and Using the Database}

\subsubsection{RD\_FEM, RD\_EVN, RD\_GEV, RD\_GXT and RD\_NAR}

To read the FEM, EVN ,GEV or NAR structures, use a command similar to:
%
\idlinput{rd\_fem, sttim, entim, fem}\vspace{-0.6in}\index{RD\_FEM}
\idlinput{rd\_evn, index(0), index(n-1), evn}\vspace{-0.6in}\index{RD\_EVN}
\idlinput{rd\_nar, '1-nov-91', '2-nov-91', evn}\index{RD\_NAR}\index{RD\_GEV}\index{RD\_GXT}
%
Look at the File Control Document for a description of the strutures
which are returned.

\subsubsection{RD\_OBS}

A sample standard calling sequence for reading the observing log data files
is:
%
\idlinput{rd\_obs, '8-may-92', '8-may-92 12:00', bcs, sxtf, sxtp, w\_h, fid}\index{RD\_OBS}
%
It is possible to only read SXT full-frame data by using the one of the 
following command:
%
\idlinput{rd\_obs, '8-may-92', '8-may-92 12:00', bcs, sxtf, sxtp, w\_h, fid, /sxtf}\vspace{-0.6in}
\idlinput{rd\_obs, '8-may-92', '8-may-92 12:00', bcs, sxtf, /sxtf}
%

\newpage %------------------------------------------------------------------------
\section{Accessing Ground Based FITS Images}

All Ground Based images that are stored in the Yohkoh database use the
FITS file format. \index{FITS files}

\subsection{Directory and File Organization}

The ground based data is stored in the following directories:

\begin{verbatim}
       $DIR_GBO_BBSO         holds the Big Bear Data
       $DIR_GBO_KP           holds the Kitt Peak Data
       $DIR_GBO_SELSISI      holds data from many observatories.  
                             These images are copied daily from 
                             the SELSIS VAX.
\end{verbatim}

The Yohkoh file naming convention for ground based data is very similar
to that used by Yohkoh data.  There is a 3 letter prefix followed by the
normal file ID portion (YYMMDD.HHMM) (see the section defining the
Yohkoh FileID).  The first letter of the three letter prefix is always
`g' to signify ground based data.  The second letter is the institute
where the data was taken.  The letters assigned to the institutes are:
\begin{verbatim}
          b               Big Bear Observatory
          C               Boulder, Colorado
          g               GSFC
          h               Holloman
          k               Kitt Peak
          l               Leamonth, Australia
\end{verbatim}

\noindent The last letter is the type of data that is in the file.  The letters
assigned to the types of images are:
\begin{verbatim}
          h               H-alpha
          i               HeI 10830
          m               Magnetogram
          s               Spectrohelioscope
          w               White light
          x               X-Ray
\end{verbatim}

A sample file name with the directory path would be \$DIR\_GBO\_KP/gkm920907.1442
for a Unix machine.

\subsection{RFITS}

RFITS reads a standard format FITS file by typing: \index{FITS files}
%
\idlinput{img = rfits(infil, header=header)} \index{RFITS}
%
where {\it img} is the image, {\it infil} is the input file name, and header is
the string array with the data header in it.  It is possible to use
the /SCALE option to convert the data into some physical units.  For
example, the magnetogram data would be converted to gauss.
%
\idlinput{img = rfits('\$DIR\_GBO\_KP/gkm920907.1442', head=head, /scale)}
%

\newpage %------------------------------------------------------------------------
\section{Time Routines}

\subsection{Time Conventions}

There are three time conventions used in the Yohkoh database.

\subsubsection{Internal Representation}

The internal representation uses two variables to define the date and
time of an event.  One variable (integer*2) is the days since 1-Jan-79 (DS79) and
the other (integer*4) is the milliseconds of the event within that day (MSOD). 
Almost all data is saved using this internal representation which uses
a total of 6 bytes. 

\subsubsection{External Representation}

The external representation uses a 7 element integer array to define the 
time of an event.  This representation uses 14 bytes.

\begin{verbatim}
             (0) = hour 
             (1) = minute
             (2) = second
             (3) = millisec
             (4) = date
             (5) = month
             (6) = year
\end{verbatim}

\subsubsection{String Representation}

The time of an event can be represented with a string.  The general rules
are:

\begin{itemize}
\item The month uses the first three letters of the month (Jan, Feb, Mar...)
\item The date and year are separated from the month using `-'
\item The year can come before or after the month (7-Jan-92 or 92-Jan-7)
\item The hour, minutes and seconds is separated by `:'
\item The milliseconds is entered as a fraction of seconds.  For example,
\mbox{`16-Dec-91  02:29:40.819'}
\item There is a space between the date and the time
\end{itemize}

\subsection{FMT\_TIM}

The routine FMT\_TIM will take a structure and return a string with the
date and time.  For example, the command:
%
\idlinput{a = fmt\_tim(roadmap(0))} \index{FMT\_TIM} \index{time}
%
\noindent will return put the string `16-DEC-91  02:29:40'.  It is
possible to use the /MSEC keyword and get \mbox{`16-DEC-91  02:29:40.819'}
instead.

\subsection{ANYTIM2INTS}

This routine takes any of the three representations and returns a 
structure with the internal representation.  The structure has a 
.TIME and a .DAY field.  An example is:
%
\idlinput{a = anytim2ints('23-jun-92 3:00')} \index{ANYTIM2INTS} \index{time}
%
This routine has an optional keyword input to allow the user to offset
the input time by some number of seconds.  If the input is an array
of times, then the offset can be a scalar value or it can be an array
of offsets which is the same length as the input.  For example,
%
\idlinput{a = anytim2ints(roadmap, off=60)}\vspace{-0.6in}
\idlinput{a = anytim2ints(roadmap, off=off)}\vspace{-0.35in}
%
\subsection{ANYTIM2EX}

This routine takes any of the three representations and returns an
array with the external representation.  If the input is only
one time, then the output is a 7 element array.  If it is an array
of `N' elements, then the output is a 7xN array.
%
\idlinput{b = anytim2ex(roadmap)} \index{ANYTIM2EX} \index{time}\vspace{-0.35in}
%
\subsection{GT\_DAY}
GT\_DAY is  a function routine that returns the date from
the index or roadmap structure in a string variable
other options available) by typing:
%
\idlinput{date = gt\_day(index,/string)} \index{GT\_DAY} \index{time}\vspace{-0.35in}
%
\subsection{GT\_TIME}
GT\_TIME is a function routine that returns the UT time from
the index or roadmap structure in a string variable
other options available) by typing:
%
\idlinput{time = gt\_time(index,/string)} \index{GT\_TIME} \index{time}\vspace{-0.35in}
%
\subsection{INT2SECARR}
INT2SECARR takes a structure (e.g., roadmap or index)
containing time and will create an array of times (t) in
seconds from some given reference.  If the second parameter is not passed,
then the first time in the input array is used
%
\idlinput{t = int2secarr(roadmap)} \index{INT2SECARR} \index{time}
%
This will produce an array of times with respect to the
first time.
%
\idlinput{t = int2secarr(roadmap, ref\_time)}\vspace{-0.6in}
\idlinput{t = int2secarr(roadmap, '1-sep-91')}\vspace{-0.35in}
%

\subsection{ANYTIM2DOY}

This routine takes any of the three representations and returns the
day of year number.
%
\idlinput{b = anytim2doy(roadmap)} \index{ANYTIM2DOY} \index{time}\vspace{-0.35in}
%

\subsection{EX2DOW}
This routine will take the external representation and return the
day of the week number, 0 for sunday, 1 for monday, ...
%
\idlinput{dow = ex2dow(tarr)}\index{EX2DOW}\vspace{-0.35in}
%

\subsection{EX2FID}

EX2FID will take the external representation data and return a string
with the fileID.
%
\idlinput{fid = ex2fid(input)} \index{EX2FID}\vspace{-0.35in}
%
\subsection{TIM2ORBIT}

This routine will take a set of input times and will determine which orbit
and which week the data falls in.  It can also return the number of minutes
into the orbit for an input time.  A sample interactive use of the routine
would be:
%
\idlinput{tim2orbit,'23-jun-92 6:00',/print} \index{TIM2ORBIT}
%
The item returned for this would be:

\begin{verbatim}
     Input               S/C Day     Night in   FileID    WeekID  D/N    SAA?
   Date     Time        Time  Min Ago  (min)
23-JUN-92  06:00:00   05:13:14 46.77   14.98  920623.0513  92_26  Day
\end{verbatim}

The S/C day started 46.77 minutes ago, and night will occur in 14.98 minutes
(it is S/C day mode).  The FileID for this time is 920623.0513 and the WeekID
is 92\_26.

Optional Keyword Output Parameters (the number of output elements is the same 
as the input):

\vspace{0.2in}\begin{tabular}{lp{15.0cm}}
{\tt FEM  } & {\raggedright the FEM structure}\\
{\tt FID  } & {\raggedright the FileID for each input time}\\
{\tt WID  } & {\raggedright the WeekID for each input time}\\
{\tt SAA  } & {\raggedright a boolean array, TRUE if in SAA}\\
{\tt SCDAY  } & {\raggedright a boolean array, TRUE if in S/C Day}\\
{\tt TIM2FMS  } & {\raggedright the number of minutes since sunrise}\\
{\tt TIM2NIGHT  } & {\raggedright the number of minutes before sunset}\\
\end{tabular}

\subsection{SEL\_TIMRANGE}
Given an array of times, this routine will return the subscripts of the
elements which fall between a set of input times.  
%
\idlinput{ss = sel\_timrange(roadmap, st\_tim, en\_tim)}\vspace{-0.6in}\index{SEL\_TIMRANGE}
\idlinput{ss = sel\_timrange(orbit\_arr, '1-jul-92', '22-jul-92')}
%
\newpage %------------------------------------------------------------------------
\section{Windows and Output Devices}

\subsection{WDEF}

WDEF creates a window of a set size.  The first example will make a 512x512 window in the
top right hand corner of your screen.  The second example makes a 128x128 window,
and the last example makes a 900x512.
%
\idlinput{wdef,0}\vspace{-0.6in}
\idlinput{wdef,0,128}\vspace{-0.6in}
\idlinput{wdef,0,900,512} \index{WDEF}
%
Window 1 is in the lower right, 2 is in the upper left, and 3 is in the
lower left (even windows on top, window modulo 4 equaling 0 or 1 is on the
right)

\subsection{WSHOW [IDL]}

WSHOW pushes a covered IDL image window to the forground while
keeping the text window active. Just type
%
\idlinput{wshow} \index{WSHOW}\vspace{-0.35in}
%
\subsection{HARDCOPY}

Dumps the contents of a 'X' screen to a laser printer with either b/w or
colour options by simply typing:
%
\idlinput{hardcopy}\vspace{-0.6in}
\idlinput{hardcopy, /black} \index{HARDCOPY}
%
It is recommended to only use this routine to get hardcopies for images.
If you want to get a hardcopy of a line plot, then first change the output
device to a postscript file, re-run the plotting program or plotting 
commands, and then issue the print command.  An example would be:
%
\idlinput{set\_plot, 'ps} \index{SET\_PLOT}\vspace{-0.6in}
\idlinput{.run plot\_sot}\vspace{-0.6in}
\idlinput{pprint} \index{PPRINT}\vspace{-0.6in}
\idlinput{set\_plot, 'x}\vspace{-0.35in}
%

\subsection{LPRINT/PPRINT}

LPRINT outputs a hardcopy of an idl.ps file.  An example of how to
use it would be
%
\idlinput{set\_plot,'ps}\vspace{-0.6in}
\idlinput{device, /land          ;optionally use landscape orientation}\vspace{-0.6in}
\idlinput{.... (your plot commands)}\vspace{-0.6in}
\idlinput{lprint} \index{LPRINT}\vspace{-0.6in}
\idlinput{set\_plot,'x}
%
This will output the plot on the laser printer.

\newpage %------------------------------------------------------------------------
\section{Low Level Routines}

\subsection{Plotting Routines}

\subsubsection{PLOT\_LCUR}

PLOT\_LCUR is a low level generic plotting routine used by several other routines.
The routine returns the list of subscripts which are between the times selected
by the user.  The user clicks on the plot with the left button to define a new start time,
the right button to define an end time, and the middle button to exit.  The user can
expand a time range after marking the start/stop times by clicking with the left
button on the box in the lower right corner.  Some of the more simple calls are:
%
\idlinput{ss = plot\_lcur(roadmap, gt\_sxs1(roadmap))}\vspace{-0.6in}\index{PLOT\_LCUR}
\idlinput{ss = plot\_lcur(index, gt\_sum\_l(index), plotr=a, title=title)}\vspace{-0.6in}
\idlinput{ss = plot\_lcur(index, gt\_sum\_l(index), /nohard)}\vspace{-0.35in}
%

\subsubsection{CLEARPLOT}

This routine will reset the IDL plotting variables. \index{CLEARPLOT}

\subsubsection{CLEAR\_UTPLOT}

This routine will reset the UTPLOT plotting variables.\index{CLEAR\_UTPLOT}

\subsection{File and Directory Routines}

\subsubsection{CONCAT\_DIR}

This routine is fundamental in allowing for software to be transported
between Unix and VMS systems.  Given a directory logical name (or
environment variable) it will figure out whether to put a `/' between
the directory and the file name (for Unix systems), or to use
a `:' (for VMS systems).  A restriction is that the directory must
be a logical or environment variable.  Some sample calls are:
%
\idlinput{outfil = concat\_dir(dir, filnam)}\vspace{-0.6in}\index{CONCAT\_DIR}
\idlinput{outfil = concat\_dir('\$DIR\_GEN\_OBS', 'obs92\_23a.01')}\vspace{-0.35in}
%

\subsubsection{FILE\_LIST}

FILE\_LIST enables you to get a string array {\it infil} with all the files
that fulfill a set of specificatios by typing:
%
\idlinput{infil = file\_list(dir,filen)} \index{FILE\_LIST}
%
where {\it dir} is a string array of directory name(s) and {\it filen} is a string
with the file disgnation (wild cards are ok - eg sfd* or bda920101.*)

\subsubsection{FILE\_MENU}

FILE\_MENU works very much like FILE\_LIST but is menu driven.  It only
gets you a single file (infil) by typing:
%
\idlinput{infil = file\_menu(dir,filen)} \index{FILE\_MENU}\vspace{-0.35in}
%
\subsubsection{DATA\_PATHS}

This routine is fundamental to several routines including YODAT.  The
routine should return a string array with all of the directories where
there is Yohkoh reformatted data.  The routine is site specific since
each institute organizes the data slightly differently.  A common practice
is to use DATA\_PATHS2 to get the standard data directories, and 
the append the specialized data directories.  See the sample 
program in the `site' branch of the Yohkoh software.
\index{DATA\_PATHS}

\subsubsection{DATA\_PATHS2}

This routine searches all `/yd' directories for directories with 
YY\_WW names (for example, `/yd1/92\_36a' or `/yd10/91\_35a').  Since the
generation of the data directory list is done automatically, it is not
necessary for a programmer to edit DATA\_PATHS every time a new week
of data is placed on-line.
\index{DATA\_PATHS2}

\subsubsection{GBO\_PATHS}

GBO\_PATHS is similar to DATA\_PATHS, but it looks for the
environment variables beginning with `DIR\_GBO' and creates a list.
This routine is used by YODAT to find where the ground based FITS
files are located.
\index{GBO\_PATHS}

\subsubsection{GET\_SUBDIRS}

This routine will return all of the subdirectories under a given
directory.  An example:
%
\idlinput{dirs = get\_subdirs('/ys')}\index{GET\_SUBDIRS}\vspace{-0.35in}
%

\subsubsection{PR\_PATH}

This routine will display all of the directories that are in the
IDL variable !path.

\subsubsection{PATH\_LIB}

PATH\_LIB will search directories in the IDL !path variable in the
order of the list to find a given IDL program.  The default is to
only give the first instance that the file is found, but it is possible to
get all locations by using the {\it /multi} switch.  A wild card (`*')
effectively sets the {\it /multi} switch).  Same examples are:
%
\idlinput{path = path\_lib()}\vspace{-0.6in}\index{PATH\_LIB}
\idlinput{path = path\_lib('add*')}\vspace{-0.6in}
\idlinput{path = path\_lib('yodat', /multi)}\vspace{-0.35in}
%

\subsubsection{FILES\_SEARCH}

This routine will search all files in sub-directories from a given directory
for a given string.  In the following example, all .PRO files under the
/ys tree are searched to find the string `HEL2PIX'.
%
\idlinput{files\_search, '/ys', 'hel2pix'} \index{FILES\_SEARCH}\vspace{-0.35in}
%
\subsection{Miscellaneous}

\subsubsection{ADD\_PRO}

This routine will allow a user to copy an IDL routine onto the YS
software tree.  The routine will check that the routine has a 
minimal documentation header.  ADD\_PRO is not available at this time
but will be shortly. 
\index{ADD\_PRO}

\subsubsection{STR2ARR}

Given a string, this routine will separate the items into an array
using a `,' as the delimiter by default.  Some examples are:
%
\idlinput{arr = str2arr('a,b,c,d,e,f,ggg,hh')}\vspace{-0.6in}\index{STR2ARR}
\idlinput{arr = str2arr(!path, delim=':')}\vspace{-0.35in}
%

\subsubsection{ARR2STR}

Given an array, convert it to a string.  The items will be separated by
a comma by default.
%
\idlinput{str = arr2str(indgen(10)}\index{ARR2STR}\vspace{-0.35in}
%

\subsubsection{REBIN [IDL]}

REBIN is an IDL routine that enables you to make a 2
dimension array larger or smaller (it also works on
multidimensional arrays). To use it to create a new
512X512 image (ndat) from a 64x64 image (data) type:
%
\idlinput{ndat=rebin(data,512,512,/sample)} \index{REBIN}
%
Note that the new x and y dimensions must be an integral
multiple (or divisor) of the original array dimensions.

\subsubsection{PLOT\_TRAV}

It is possible to plot a time line showing when the SXT and BCS team members 
will be on travel to Japan by using PLOT\_TRAV.  The plot separates the
people by institution.  Some examples are:
%
\idlinput{plot\_trav}
\idlinput{plot\_trav, /lparl}
\idlinput{plot\_trav, /bcs}
%
The default is to plot SXT personnel.  To show BCS personnel use the {\it /bcs}
switch.  The {\it /lparl} switch will only plot
the key Lockheed SXT personnel.

\newpage %------------------------------------------------------------------------
\section{Getting Help on Software and Data}

\subsection{DOC\_LIBRARY [IDL-LIB]}

IDL has a facility called DOC\_LIBRARY which you can use to get the
details of any procedure that you know the name of by typing:
%
\idlinput{doc\_library,'yodat'} \index{DOC\_LIBRARY}
%
This will obtain a listing of the header information of
the program YODAT (any comments put in at the beginning
of the code between `;+' and `;-') provided it is in your
path. Wild cards are allowable, e.g.,
%
\idlinput{doc\_library,'test*'}
%
DOC\_LIBRARY is a script driven program (i.e., it will work on ordinary
terminals as well as x-terminals or workstations.   Do not include the
`.PRO' in the call to DOC\_LIBRARY.

\subsection{XDL [IDL-LIB]} 

This is a widget driven version of DOC\_LIBRARY and will
present you with a complete list of all the IDL software in your path. 
You can search using the mouse and slider on the screen.  It is run by
typing:
%
\idlinput{xdl} \index{XDL}\vspace{-0.35in}
%
\subsection{PRO\_LIST}

To return a list of the IDL programs, functions, and procedures (.PRO files)
that are in the IDL path (!path).
%
\idlinput{pro\_list}\vspace{-0.6in}\index{PRO\_INDEX}
\idlinput{pro\_list, outfil='pro\_list.txt'}\vspace{-0.35in}
%

\subsection{CATALOG\_LIST}

This routine is under development and will be released shortly.			%????

\subsection{HELP [IDL]}

The IDL command HELP is available to get information on all of the
variables, procedure and functions currently in IDL's memory.  By typing:
%
\idlinput{help} \index{HELP}\vspace{-0.6in}
\idlinput{help, data}
%
you get a list of all of the variables that are defined within the current
IDL session.  If you want information the definition of a structure, you
can use the /STRUCTURE option.  Some examples are:
%
\idlinput{help, /st, roadmap}\vspace{-0.6in}
\idlinput{help, /st, index.gen}
%
It is possible to get information on the calling parameters of procedures and
functions that have already been compiled by typing:
%
\idlinput{help, /routine}
%
The procedure and function name is listed first.  The positional parameters are
listed in lower case and the keyword parameters are in upper case.

\newpage %------------------------------------------------------------------------
\section{Yohkoh Distribution and Archive Tapes}

Please see Volume 2 of the Yohkoh User Guide for more information on
the archive tapes.

\subsection{GO\_RDTAP}

There is one archive tape for each week of data.  The first step to
accessing archive data is to determine which tape it is on.  Use the
WeekID table shown earlier in this document to figure out what tape you
need.  For example, if you wish to look at data on 27-Mar-92 you first
determine that it is week 13 in 1992, so the weekID is 92\_13.  Put that
tape into the exabyte tape drive.

You need to move to the directory where you want the data to be written.

GO\_RDTAP is a menu driven program to retrieve data from the exabyte
archive tapes via a menu driven program.  The ISAS and LPARL machines
have a copy of the directory listing for each tape saved on the
disk.  This means that you can simply type:
%
\idlinput{go\_rdtap} \index{GO\_RDTAP} \index{tape}
%
and it will list all of the tapes that have been made.  You need to select
the tape that you are reading.  If your system does not have the XBD files
on-line, then type:
%
\idlinput{go\_rdtap, /tape}
%
after you have loaded the tape, and the program will read the directory
listing from the tape.

A menu will appear a series of weekly log files.  If you do not need any of
the weekly files, then just select QUIT/EXIT.  The next menu will be the
file prefixes that are available.  Click on each file prefix that you wish
to read down to the disk.  When you have selected all of the prefixes you 
need, click on QUIT/EXIT.  The final menu is the FileIDs that are on the
tape.  Select the fileIDs you need, and then click on QUIT/EXIT.  You will
be asked a couple of more questions about whether you are ready to read
the tape.  GO\_RDTAP will also display the number of kilobytes that you
have selected to read, so check the available space on the disk selected
before continuing.

%\addcontentsline{toc}{section}{\newpage}
%\addtocontents{toc}{\newpage}
\appendix
\newpage %------------------------------------------------------------------------
\section{Using the Yohkoh Package from a Remote Node}

\subsection{Logging in from a remote node}

There are several ways to log into a remote node.  Here are a few of 
them:

From Unix or DEC-Ultrix:
%
\ultrixinput{telnet node\_name}\vspace{-0.6in}
\ultrixinput{telnet isass0}\vspace{-0.6in}
\ultrixinput{telnet node\_nuber}\vspace{-0.6in}
\ultrixinput{telnet 192.68.162.109}\vspace{-0.6in}
\ultrixinput{rlogin node}\vspace{-0.6in}
\ultrixinput{rlogin isass2}\vspace{-0.6in}
\ultrixinput{rlogin node -l username}\vspace{-0.6in}
\ultrixinput{rlogin isass2 -l morrison}
%
From DEC-Ultrix:
\ultrixinput{dlogin node}\vspace{-0.6in}
\ultrixinput{dlogin 24707::}\vspace{-0.6in}
\ultrixinput{dlogin 24.131}
%
From VMS:
\vmsinput{set host node}\vspace{-0.6in}
\vmsinput{set host sag}\vspace{-0.6in}
\vmsinput{set host 24707}
%
When using TELNET, DLOGIN, and SET HOST you will be prompted for the
username and password of the account you want to log into.  For RLOGIN,
it will check the file .rhosts to see if the account and machine that 
you are logging in from should automatically log you into the remote
account.  A sample .rhost line is:

\begin{verbatim}
sxt1.space.lockheed.com         morrison        #  DECstation 5000
\end{verbatim}

\subsection{Redirecting X-Window Outputs}

If you have logged into a remote computer from a workstation, it is 
possible to redefine the machine that will display X-window output.  The
default for IDL is to make X-windows for plots and image displays.  Two
things have to be done before you can redirect the X-windows output: first
the output device needs to be defined to be the local node, and second
the security for the local node needs to be modified to give permission
for the remote node to create the window.

\subsubsection{Defining X-Window Output Node}

For Unix and DEC-Ultrix machines, a sample command would be:
%
\ultrixinput{setenv DISPLAY sxt2:0}\vspace{-0.6in}
\ultrixinput{setenv DISPLAY 192.68.162.109:0}
%
For DEC-Ultrix machines, it is possible to use DECNET protocal to create
the local X-window.  This is not recommeded since it is slow, but if it
is necessary, a sample command is:
%
\ultrixinput{setenv DISPLAY sag::0}\vspace{-0.6in}
\ultrixinput{setenv DISPLAY 24707::0}
%
For VMS machines, a sample command would be:
%
\vmsinput{set/display/create/super/node=sxt2}\vspace{-0.35in}
%
\subsubsection{Modifying Security to Accept Remote X-Windows}

For the DEC-Ultrix machines using DEC Windows, the following steps are required:

\begin{itemize}
\item Find the `Session Manager' window and make that the current window
\item Click and hold on the `Customize' item
\item Drag and select the `Security' item (by releasing the button)
\item Enter the remote host name.  An example would be `sxt2' (without
      the quotes) if sxt2 was defined in the /etc/hosts file.  If not,
      you would enter the full name `sxt2.spac.lockheed.com'
\item Click on `Add' and then `OK' to exit
\end{itemize}

For Sun machines... (necessary to have node name in the /etc/hosts file?)	%???

For VMS machines...								%???

\subsection{Basics for Using FTP}

\begin{itemize}
\item [binary]  use binary file type for transfer
\item [prompt]  toggle between interactive and non-interactive prompting
                (it is important to be non-interactive when using `mget')
\item [cd]      change default directory on the remote machine
\item [lcd]     change default directory on the local machine
\item [get]     copy one file from remote to local
\item [mget]    copy several files from remote to local
\item [put]     copy one file from local to remote
\end{itemize}

A sample session might look like:
%
\ultrixinput{ftp 133.74.8.100}\vspace{-0.6in}
\promptinput{username:}{guest}\vspace{-0.6in}
\promptinput{passwd:}{fuchinobe}\vspace{-0.6in}
\ftpinput{binary}\vspace{-0.6in}
\ftpinput{cd /ys/sxt/doc}\vspace{-0.6in}
\ftpinput{get travel\_sxt.txt}\vspace{-0.6in}
\ftpinput{cd /ys/gen/doc}\vspace{-0.6in}
\ftpinput{prompt}\vspace{-0.6in}
\ftpinput{mget papers.*}\vspace{-0.6in}
\ftpinput{quit}\vspace{-0.6in}
\ultrixinput{~}
%

\subsection{List of Institutes with the Yohkoh Package}

\begin{itemize}
\item Institute of Space and Astronautical Sciences (ISAS) [isass0 thru isass4,
flare1 thru flare12, isasxa thru isasxc]
\item Lockheed Palo Alto Research Laboratory (LPARL) [sxt0 thru sxt4, sag]
\item University of Hawaii [koa?, mamane?]
\item University of California, Berkeley [sunspot]
\item Stanford University [flare]
\item Solar Physics Research Corporation (SPRC) [NOAO?]
\item Goddard Space Flight Center/NSSDC (GSFC) [umbra]
\item National Astronautical Observatory of Japan (NAOJ) [??]
\item Mullard Space Science Laborartory (MSSL) [??]
\item Rutherford Appleton Laboratory (RAL) [??]
\item Navel Research Laboratory (NRL) [aspen,ssd0?]
\item University of Tokyo [??]
\item Kyoto University [??]
\item CRL - Morabashi? [??]
\item CRL - Akioka? [??]
\item Nagoya ? [??]
\item Nobayama ? [??]
\end{itemize}

\subsection{List of Node Names and Numbers}

\begin{verbatim}
           DECNET             Internet                          Machine

SAG        24.131   192.68.162.134 (sag.space.lockheed.com)   DEC-VMS
SXT        24.134   192.68.162.107 (sxt.space.lockheed.com)   SGI-Unix
SXT1       24.362   192.68.162.100 (sxt1.space.lockheed.com)  DEC-Ultrix
SXT2       24.365   192.68.162.109 (sxt2.space.lockheed.com)  DEC-Ultrix
SXT3       24.366   192.68.162.110 (sxt3.space.lockheed.com)  DEC-Ultrix
SXT4       24.369   192.68.162.137 (sxt4.space.lockheed.com)  DEC-Ultrix

spot                133.40.2.120                              SUN?

ISASS0     40.932   133.74.8.100 (isass0.solar.isas.ac.jp)    DEC-Ultrix
ISASS1     40.933   133.74.8.101 (isass1.solar.isas.ac.jp)    DEC-Ultrix
ISASS2     40.934   133.74.8.102 (isass2.solar.isas.ac.jp)    DEC-Ultrix
ISASS3     40.935   133.74.8.103 (isass3.solar.isas.ac.jp)    DEC-Ultrix
ISASS4     40.936   133.74.8.104 (isass4.solar.isas.ac.jp)    DEC-Ultrix

ISASXA     40.927   133.74.8.110 (isasxa.solar.isas.ac.jp)    DEC-VMS
ISASXB     40.928                                             DEC-VMS
ISASXC     40.929                                             DEC-VMS

FLARE1              133.74.8.1   (flare1.solar.isas.ac.jp)    SUN
FLARE2              133.74.8.7   (flare2.solar.isas.ac.jp)    SUN
FLARE3              133.74.8.3   (flare3.solar.isas.ac.jp)    SUN
FLARE4              133.74.8.4   (flare4.solar.isas.ac.jp)    SUN
FLARE5              133.74.8.5   (flare5.solar.isas.ac.jp)    SUN
FLARE6              133.74.8.6   (flare6.solar.isas.ac.jp)    SUN
FLARE7              133.74.8.87  (flare7.solar.isas.ac.jp)    MIPS
FLARE8              133.74.8.88  (flare8.solar.isas.ac.jp)    MIPS
FLARE9              133.74.8.89  (flare9.solar.isas.ac.jp)    MIPS
FLARE10             133.74.8.90  (flare10.solar.isas.ac.jp)   MIPS
FLARE11             133.74.8.91  (flare11.solar.isas.ac.jp)   MIPS
FLARE12             133.74.8.92  (flare12.solar.isas.ac.jp)   MIPS


MSSL       19.253                                             DEC-VMS

ssd0                128.60.8.1    (ssd0.nrl.navy.mil)         SUN?
aspen               128.60.8.72   (aspen.nrl.navy.mil)        SUN
koa                 128.171.167.1 (koa.ifa.hawaii.edu)        SUN?
mamane                            (mamane.ifa.hawaii.edu)     SUN?
sunspot                           (sunspot.ssl.berkeley.edu)  SUN?
star                36.10.0.5     (star.stanford.edu)         ???
flare                             (flare.stanford.edu)        DEC-Ultrix?
panache                           (panache.stanford.edu)      DEC-Ultrix?

umbra               128.183.57.24 (UMBRA.gsfc.nasa.gov)       DEC-VMS?

NOTE: To go from DECNET xx.yyy convention to the single node number
notation, take the xx portion, multiply by 1024, and add `yyy'.  
So SAG becomes 24*1024 + 131 = 24707:: 
\end{verbatim}

\newpage %------------------------------------------------------------------------
\section{Accessing the University of Hawaii SPAM Database}

\begin{center}
SPAM:  A Canned Internet-Accessible Database \\
of Interest to Solar Flare Researchers\\
R. C. Canfield, H. S. Hudson, E. Kiernan, T. R. Metcalf, J.-P. Wuelser \\
University of Hawaii, Institute for Astronomy \\
\end{center}

The University of Hawaii has established a searchable database, called SPAM (Spectroscopy and
Polarimetry at Mees), which contains logs of observations made at Mees
Solar Observatory (Haleakala, Maui).  Of more general interest, the
database also includes the Events List and Region Report from the Space
Environment Laboratory (Boulder).  Logs from YOHKOH are currently being
added.  Hence, SPAM can be used to determine, for example, whether Mees
has vector magnetograms of a certain NOAA AR or whether YOHKOH has certain
types of observations in specified time ranges.  As well, it can be used
to search the SEL database for flares with selected attributes.

Included logs (and searchable attributes, in addition to date, day of
year, and time) are:  Mees Solar Observatory Log (instrument, NOAA AR,
data type, observing setup), SEL Event List (NOAA AR, X-ray Class), SEL
Region Report (NOAA AR), YOHKOH Orbit Summary, YOHKOH SXT Quiet Mode PFI
Observations (latitude, longitude, X-ray and optical image size), YOHKOH
Flare Observations (latitude, longitude, specific channel counts or
ratios).

SPAM runs on a Sun workstation at Mees Solar Observatory, and is available
over Internet.  Simply access (e.g., telnet) koa.ifa.hawaii.edu
128.171.167.1) from any vt100, Sun, or xterm emulator.  Log on as spam
lower case); there is no password.  New users are asked to read release
notes and hints.

\subsection{Procedure for SPAM Access}

\begin{enumerate}
\item telnet to koa.ifa.hawaii.edu (128.171.167.1)
\item login name spam
\item no password
\item enter terminal type (vt100, xterm, etc - it prompts)
\item read 'help for new users' as offered if it's the first time you've
		used it.
\end{enumerate}

\subsection{MGRAMS}

The files in this directory contain data from the Mees Solar
Observatory Stokes Polarimeter (Mickey, 1985, Solar Physics, 97, 223).
Please feel free to use these data; if you do so, please send a one or
two sentence mail message describing how you use them to the Mees Data
Use Coordinator, Dr. Richard C. Canfield, canfield@mamane.ifa.hawaii.edu.  
In publications please acknowledge that they were obtained at Mees Solar 
Observatory, and were supported by NASA grant NAGW 1542 to the University of
Hawaii.  Please send a copy of your paper to the Data Use Coordinator
at Institute for Astronomy, 2680 Woodlawn Drive, Honolulu, HI 96822, USA.

The data files are kept in this directory for about a month. If you 
need earlier data, please contact poldata@koa.ifa.hawaii.edu.

The data are reduced using the method of Ronan, Mickey and Orrall
(1987), Solar Physics 113, 353.  This method is known to introduce
certain systematic errors, and these data should not be used for
quantitative analyses.  If you wish data for such analyses, please
contact the Mees Data Use Coordinator.

These data are in the FITS format.  Be sure to use binary ftp format \index{FITS files}
when transferring files.  The file name convention is as follows:

\begin{verbatim}
 IYYMMDD.hhmmss

where

 I = Data code:   B = Vector Magnetic Field
                  P = Raw polarimeter data
 
 YY = Year of observation (2 digit)
 MM = Month of observation (2 digit)
 DD = Day of observation (2 digit)
 hh = hour of start of observation
 mm = minute of start of observation
 ss = second of start of observation (optional)

To read and display the FITS file in IDL, the following routines in this 
directory should be used:

 bfits.pro     Reads the FITS file
 Bvector.pro   Displays a vector magnetogram

The following are called by bfits.pro or Bvector.pro

 rfits.pro
 rkey.pro
 trmvect.pro
 specialct.pro
 tag_index.pro
\end{verbatim}

An example is:
%
\idlinput{mag = bfits('B910419.1234') ; Read the FITS file}\vspace{-0.6in}
\idlinput{Bvector,mag                 ; Display magnetogram on screen}\vspace{-0.6in}
\idlinput{Bvector,mag,/incolor        ; Display magnetogram on color screen}\vspace{-0.6in}
\idlinput{Bvector,mag,out='print'     ; Generate post-script file idl.ps}
%

\newpage %------------------------------------------------------------------------
\section{Accessing the NAOJ H-Alpha Data}

The following is the procedure to access NAOJ H-Alpha images.
%
\ultrixinput{telnet spot}\vspace{-0.6in}
\promptinput{username:}{guest}\vspace{-0.6in}
\promptinput{passwd:}{ [clue: where is NAOJ?]}\vspace{-0.6in}
\ultrixinput{show}
%
After this it is straightforward as pop-up menus appear to guide you.

To copy across the data rather than just simply viewing the images
or dumping the images to the color printer you should do the following:

\noindent FTP to spot (133.40.2.120):
%
\ultrixinput{ftp spot}\vspace{-0.6in}
\promptinput{username:}{guest}\vspace{-0.6in}
\promptinput{passwd:}{ [clue: where is NAOJ?]}\vspace{-0.6in}
\ftpinput{cd /solar/monocro}\vspace{-0.6in}
\ftpinput{binary}
%
\noindent List the files in the diretory by typing the usual Unix `ls'
command, e.g.,
%
\ftpinput{ls ha920503$\ast$}
%
\noindent Then copy the file(s) you want using {\tt mget}, e.g.,
%
\ftpinput{mget ha920503$\ast$}
%
\newpage %------------------------------------------------------------------------
\section{Making Laser Disk and VCR Movies}

\subsection{NVS-Sony Laser System at ISAS}

\subsubsection{Hardware: Positioning the Sony Laser Disk}

\begin{enumerate}
\item Check that the green light on the NVS is on.  Power cycle if necessary.
\item Check that the RS-232 cable is connected from the NVS to the Sony LVR-5000.
\item Make sure the correct optical disk is inserted (check side A or B).
\item Put the `LOCAL/REMOTE' switch in the local position.
\item Depress the `REC STANDBY' button to initiate blank frame check.
This will find positions of all blank areas on the disk.  
When completed, the disk will be positioned to the last recorded
frame before the nearest (not necessary the first) blank frame.
\item Use the record `SKIP' buttons to position the laser disk to the last 
recorded frame before the desired starting frame number (consult the
Sony Laser disk log book).  On the display, Cont. Rec = is the last
recorded frame before the blank frame; DUR = number of blank frames.
\item Toggle the format of the numbers displayed to show the time-format.  
Record numbers in the log book.   To start over, press the `CLEAR' button.
\item Set the left console switch to `remote'.
\end{enumerate}

\subsubsection{Software}

\begin{enumerate}
\item Login onto a non-isass0 machine (isass1-4).  

\item Enter IDL.  Make sure no other IDL window jobs are running on the same
workstation.  If there are two jobs, the color table could be corrupted.

\item Then enter one of the following:
\end{enumerate}
~\\
%
\idlinput{go\_nvs5,/sfd           ; Standard weekly movie making}\vspace{-0.6in}\index{GO\_NVS5}
\idlinput{go\_nvs5,/help          ; For on-line documentation}\vspace{-0.6in}
\idlinput{go\_nvs5,increm=5,/sfd  ; Less of an impact on workstation}
%					
The temporary NVS files will be written to your home directory.
Use the nvsdirfn='/1p/user/nvs0' switch to redirect to another location.

The default increment is 10.  This is good if no one else is using the
workstation at the same time.

If the  /sfd switch is given, go\_nvs5 will read the files from /yd1/sfd.
It will run the program with the usual default answers.  These are:

\begin{verbatim}
* Use default sfd files for input data?     [Default: Y ]	; Y for /yd1/sfd
* Display a 2nd image set?                  [Default: Y ]	; use default
* Decompress the 2nd image?                 [Default: Y ]	; use default
* Hist_scale type scaling on 2nd image?     [Default: Y ]	; use default
* Enter first comment line (10 char max)    [Default: SXT Movie ]   ;use default
* Enter second comment line (15 char max)   [Default: sfd92_34a.03 ];use default
* Enter a color table value:                [Default: 3 ]	; use default
* Enter a color gama  value:                [Default: 1.00000 ]	; use default
* Enter color table for 2nd image display:  [Default: 0 ]	; use default
* Enter the first image to process          [Default: 0 ]	; use default
* Enter the last  image to process          [Default: xxx ]	; use default
   Next you will get a message about the current frame number.  Verify that
   it is the desired frame number of time.  Then, ...
* Enter C to continue or anything to quit   [Default: C ]	; use default
\end{verbatim}


\subsubsection{Adding Another Movie}

The above procedure is for starting from scratch.  If you have just completed
a run and the Sony frame number has not been changed, then just type:
%
\idlinput{go\_nvs5 [,/sfd]}
%
to make the next movie, answering the questions as before.

\subsubsection{Problems}

\begin{enumerate}
\item Invalid Num -- If the message `Invalid Num' appears on the display
monitor, the nvs box is not in sync with the Sony laser disk.  To
correct this situation begin with a blank frame check (see
above hardware procedure) and follow that with software procedure 
section II).

\item One common problem is to forget to attach the RS-232 cable.  This is
sometimes switched to ISASS3 to control the recorder during playback 
to record with the VCR).

\item How to toggle the format frame/time format:  depress the frame/time 
button located on the lower-left side of the console number keypad--where 
frame \# is a simple number and time has the format of mm:ss:ff.
\end{enumerate}

\subsection{Peritek-Panasonic Laser System at LPARL}

\subsection{Making VCR Movies from the ISAS Sony System} \index{MK\_VCR} \index{video}

MK\_VCR is an IDL procedure which can be used to control the Sony Laserdisk
recorder.  In this way sequences can be displayed easily in order to make
VCR video recordings.

The MK\_VCR procedure reads an ascii file (described) below and then calls 
sonyloop to actually control the laser disk player. 

\subsubsection{Initial setup}

\begin{itemize}
\item First, make sure the RS-232 cable from isass3 is connected to the back
of the Sony recorder (it requires an adapter connector).  

\item Switch the local/remote switch to remote.

\item Log on to isass3 and enter IDL.  
\end{itemize}

\subsubsection{Short test of hardware communications.}

You can preform a simple test to see if things are working correctly
by typing:
%
\idlinput{sonyloop,6000		; Position laser disk to frame number 6000}\vspace{-0.6in}
\idlinput{sonyloop,6000,6200	; Play from 6000 to 6200 at normal speed}\vspace{-0.6in}
\idlinput{sonyloop,6000,6200,sec=2 ; Play a factor of 2 slower}
%

\subsubsection{Running MK\_VCR}

If things look like they are working correctly, you can then try mk\_vcr.
To get a template of the file the mk\_vcr will read, execute the following
unix command to copy the example file to your own directory:
%
\ultrixinput{cp /ys/gen/soft/atest/movie/mk\_vcr\_example.txt .}
%
After you copy the example file, do the following.  Insert Side B of the 
laser optical disk. Then,
%
\idlinput{mk\_vcr,'mk\_vcr\_example.txt',1,3}
%
which execute lines 1 to 3 of the file.  (Line 0 puts up a blank frame).
If you type 
%
\idlinput{mk\_vcr,'mk\_vcr\_example.txt}
%
the routine will inform you of the number of lines in the file and
ask you to enter the start and stop line numbers.

If you want to make a movie, you could try the following IDL program:

\begin{verbatim}
   sonyloop,8000                   		 ;Get it to a blank frame
   for i=0,2 do mk_vcr,'mk_vcr_example.txt',0,23 ;There are 24 lines in the file
   sonyloop,8000                   		 ;End on a blank frame
   end 
\end{verbatim}

As you can see, the sequence in the `for loop' will execute 3 times.  Each
time through takes about 7 minutes, so the whole movie will be just over
20 minutes in length.

\subsubsection{How to create/modify the file that MK\_VCR uses}

The file has some descriptions about how to change it.  Basically,
the lines in the file look like the following:

\begin{verbatim}
 8000				; Position to a blank frame (provide leader)
 6077, 6077,    4,    0, [ -1  0  0  0] "Movie Title Page"
 6078, 6078,    2,    1, [ -1  0  0  0] "Nov 1991 Movie - Title"
 5048, 5225,    2,    1, [  1  2  1 -1] "Nov 1991 Movie"
; c0    c1      c2    c3       [c4]         "  c5   "
\end{verbatim}

The above sequence will display the Nov 91 press release sequence if Side B
is inserted.  Some notes about the format:

\begin{itemize}
\item Text following a `:' is considered to be a comment.
\item Only the first column is required.  All subsequent columns are optional.
\item c0 is starting frame number.
\item c1 is the ending frame number.
\item c2 is the wait (in sec) after displaying the first frame
\item c3 is the wait (in sec) after displaying the last frame
\item c4: The number in the boxes are the speeds that are used by sonyloop.
Up to four different speeds can be specified. 
\end{itemize}
\begin{verbatim}
      0 is no operation
      1 is normal speed
      2 is twice slower
      3 is 3x slower, etc
      -2 is 3x faster.
\end{verbatim}

If a fifth parameter is specified in the brackets, it is a repeat number.
If this number is negative, sonyloop will play the sequence forward
and backward.  For example,

\begin{verbatim}
 5048, 5225, 2,  1, [  1  0  0  0  1] "Nov 1991 Movie" ;1 time forward
 5048, 5225, 2,  1, [  1  0  0  0 -1] "Nov 1991 Movie" ;1 time forward/backward
 5048, 5225, 2,  1, [  1  0  0  0 -3] "Nov 1991 Movie" ;3 times forward/backward
\end{verbatim}

SPECIAL NOTES:
\begin{itemize}
\item Sonyloop doesn't send the correct commands to the Sony Laser Recorder
        to go backwards.  Thus, no matter what speed you specify, it always
        goes at normal speed in reverse.  (Maybe a Japanese reader can study
        the manual and fix this problem).

\item Sonyloop tries to compute the time it will take the laser disk recorder
        to play the specified sequence.  Because the timings in IDL can be
        off by a certain amount (less than or equal to about 1sec), it is
        wise to make one of the wait parameters (c2 or c3) equal to at least
        1.  If they are set to 0, IDL will sometimes send the next sequence
        before the previous sequence has had a chance to complete.
\end{itemize}

\newpage %------------------------------------------------------------------------
\section{Using the Exabyte Drives}

\subsection{Drives At ISAS}

There are exabyte drives on isass0, flare3, and flare4.

\newpage %------------------------------------------------------------------------
\section{Using Magneto-Optical (MO) Disks at ISAS}

For data on MO you must first put the disk with the data into one of
the MO readers on FLARE3 or FLARE4.  There are two drives on FLARE3 and one
drive on FLARE4.  The directory names are:
\begin{verbatim}
              /flare3.mo0
              /flare3.mo1
              /flare4.mo0
\end{verbatim}
%
If there is another MO in the reader 
already you must first type one of the following (depending on the drive)
before removing one MO and inserting the new one:
%
\ultrixinput{mo\_umount30}\vspace{-0.6in}
\ultrixinput{mo\_umount31}\vspace{-0.6in}
\ultrixinput{mo\_umount40}
%
You may now physically swap the MO disks. Then type one of the following:
%
\ultrixinput{mo\_mount30}\vspace{-0.6in}
\ultrixinput{mo\_mount31}\vspace{-0.6in}
\ultrixinput{mo\_mount40}
%
\noindent followed by 
%
\ultrixinput{exportfs -a}
%
Then type one of the following:
%
\ultrixinput{umount /flare3.m0}\vspace{-0.6in}
\ultrixinput{umount /flare3.m1}\vspace{-0.6in}
\ultrixinput{umount /flare4.m0}
%
and then finally, type one of the following:
\noindent (possibly not necessary, but if mounting alone doesn't work 
then try it) then type:
%
\ultrixinput{umount /flare3.m0}\vspace{-0.6in}
\ultrixinput{umount /flare3.m1}\vspace{-0.6in}
\ultrixinput{umount /flare4.m0}
%
Also note that it is necessary to unprotect the MO disk drives
before they will mount. 

\newpage %------------------------------------------------------------------------
\section{Guidelines for Writing Distributed Software}

\subsection{Names of Routines}

The first concern is not to use a name that is already being used.
To check if the name exists on the /ys tree on a Unix machine, you can
use the symbol `chk\_name'.  Here is an example (note that the .PRO
portion is required):
%
\ultrixinput{chk\_name yodat.pro}
%
On a VMS machine, the following command should work:
%
\vmsinput{dir ys:[...]yodat.pro}
%
It is possible to do the search from within IDL on any of the 
machines using a command like:
%
\idlinput{print, path\_lib('yodat')}\vspace{-0.6in}\index{PATH\_LIB}
\idlinput{print, path\_lib('yo*')  ;for all routines beginning with `yo'}
%
The second concern is use care when chosing the name.  It should not be
general enough to cause conflicts or confusion between all of the other
intstrument teams.  For example, the original name of SXT\_DECOMP was
DECOMP.  Every instrument has a decompression routine, so the name of
the instrument needs to be incorporated in the name of the routine for
general routines.  The name of the routine should not be shorter than
four letters, and underscores are acceptable.

\subsection{Standard Headers}

The following standard IDL should be included at the top of each routine.

\begin{verbatim}
;+
; NAME:
; PURPOSE:
; CATEGORY:
; CALLING SEQUENCE:
; INPUTS:
; OPTIONAL INPUT PARAMETERS:
; OUTPUTS:
; OPTIONAL OUTPUT PARAMETERS:
; COMMON BLOCKS:
; SIDE EFFECTS:
; RESTRICTIONS:
; PROCEDURE:
; MODIFICATION HISTORY:
;-
\end{verbatim}

\subsection{Categories}

In the near future we will supply a list of categories.  Each routine
will require at least one category, but can have several categories listed.

\subsection{Modularize}
Instead of making large main programs, try to break the program up into
smaller general purpose procedures or functions.  This will allow users to
take advantage of the smaller building blocks to make different programs
and to avoid duplication of code.  It will also allow for a single point of
maintenance.

\subsection{Portability}
It is important to have all software be portable between different computers
and different operating systems.  One of the biggest mistakes is to put 
full file names with directories.  Since the software needs to be able to
be used on VMS and UNIX machines, we make use of the routine CONCAT\_DIR.
This routine takes a logical directory name and the file name, and puts them
together correctly depending on the system.  For example, the command
%
\idlinput{outfil = concat\_dir('\$DIR\_GEN\_OBS', 'obs92\_40a.01')} \index{CONCAT\_DIR}
%
will return `\$DIR\_GEN\_OBS/obs92\_40a.01' when being run on a UNIX machine,
and will return \mbox{`\$DIR\_GEN\_OBS:obs92\_40a.01'} when being run on a VMS machine.
Always use logicals pointing to files in the YS directory area - do not 
write software that points to personal files since those will not be 
available at other locations.

\subsection{Don't Hardwire to Fixed Units}
Use /GET\_LUN on the open statements, and /FREE on the window commands

GOOD EXAMPLE:
%
\idlinput{openr, lun, filename, /get\_lun}
%
BAD EXAMPLE:
%
\idlinput{openr, 1, filename}
%
\newpage %------------------------------------------------------------------------
\section{Listing of All Routines by Category}

\newpage %------------------------------------------------------------------------
\twocolumn

% MK_INDEX.TXT input

\begin{theindex}
 
\item ADD\_PRO 15, 90
\item ALIGN\_CUBE 65
\item ANYTIM2DOY 83
\item ANYTIM2EX 82
\item ANYTIM2INTS 81
\item ARR2STR 90
\item AUTO\_HXI 53
\indexspace
\item BCS\_24HR\_PLOT 27
\item BCS\_CONT 30
\item BCS\_DECOMP 50
\item BCS\_MULTI 30
\item BCS\_NORM 50
\item BCS\_SPMOVIE 31
\item BOX\_LC 29
\indexspace
\item CLEARPLOT 87
\item CLEAR\_UTPLOT 87
\item color tables 36
\item COMPST 66
\item CONCAT\_DIR 115, 88
\item CONROI 40
\item CONTACTS 74
\item CONTOUR 36
\indexspace
\item DARK\_SUB 55
\item DATA\_PATHS2 88
\item DATA\_PATHS 88
\item DELVAR 13
\item DISP\_BDA 31
\item DISP\_HDA 31
\item DISP\_WDA 31
\item DOC\_LIBRARY 92
\item DPRATE2SEC 42
\item DSK\_LOC 64
\indexspace
\item ENHANCER 34
\item EX2DOW 83
\item EX2FID 83
\item EXP\_NORM 54
\item EXT\_BCSCHAN 39
\item EXT\_DATA 39
\indexspace
\item FILES\_SEARCH 90
\item FILE\_LIST 88
\item FILE\_MENU 88
\item FINDFILE 13
\item FIND\_LIMB 64
\item FITS files 102, 17, 71, 72, 78, 79, 7
\item FMT\_TIM 81
\indexspace
\item GBO\_PATHS 89
\item GBO\_SCALE2 66
\item GET\_DC\_IMAGE 55
\item GET\_DC\_WARM 56
\item GET\_INFO2 44
\item GET\_PIX\_COOR 48
\item GET\_PNT 61
\item GET\_RB0P 60
\item GET\_SUBDIRS 89
\item GO\_NVS5 106
\item GO\_RDTAP 94
\item GS\_CUR 32
\item GS 32
\item GTAB\_COMM 73
\item GTAB\_ENTRY 73
\item GTAB\_FFI 73
\item GTAB\_PFI 73
\item GTAB\_ROI 73
\item GT\_BLOCKID 43
\item GT\_COMP 46
\item GT\_DAY 82
\item GT\_DPE 46
\item GT\_DP\_MODE 42
\item GT\_DP\_RATE 41
\item GT\_EXPDUR 47
\item GT\_EXPMODE 47
\item GT\_FILTA 44
\item GT\_FILTB 45
\item GT\_FOV\_CENTER 47
\item GT\_GRS1 49
\item GT\_GRS2 49
\item GT\_HXA 61
\item GT\_HXS 49
\item GT\_IRU 62
\item GT\_MBE 47
\item GT\_RBMSC 49
\item GT\_RBMSD 49
\item GT\_RES 45
\item GT\_SUM\_H 44
\item GT\_SUM\_L 44
\item GT\_SUM\_M1 44
\item GT\_SUM\_M2 44
\item GT\_SXS1 49
\item GT\_SXS2 49
\item GT\_TEMP\_CCD 48
\item GT\_TEMP\_HK 48
\item GT\_TIME 82
\item GT\_TOTAL\_CNTS 43
\indexspace
\item HARAT 58
\item HARDCOPY 85
\item HEL2HXA 60
\item HEL2PIX 59
\item HELP 93
\item HXA\_SUNCENTER 59
\item HXT\_INDEX 51
\indexspace
\item INT2SECARR 82
\item INTERP\_IMG 56
\indexspace
\item LCBDA 28
\item LIST\_BDA 24, 43
\item LOADCT 36
\item LPRINT 86
\item LWA\_TE 57
\indexspace
\item MK\_MOSAIC 39
\item MK\_SFD 55
\item MK\_TIFFB 71
\item MK\_VCR 107
\item MOVIE 37
\indexspace
\item OCONTOUR 33
\item OUTPLOT 26
\indexspace
\item PALETTE 37
\item PATH\_LIB 114, 89
\item PB0R 60
\item PLOTBDA 30
\item PLOTS\_BDA 30
\item PLOTT\_BDA 20, 28
\item PLOTT\_HDA 20, 28
\item PLOTT\_WDA 21, 28
\item PLOTY 26
\item PLOT\_GOES 76
\item PLOT\_LCUR 87
\item PLOT\_REF 51
\item PLOT\_SOT 58
\item PLOT\_TEMPS2 58
\item PPRINT 86
\item PROFILE 37
\item PRO\_INDEX 92
\item PR\_EVN 74
\item PR\_FEM 74
\item PR\_GEV 75
\item PR\_IMAGE 40
\indexspace
\item RD\_AR 65
\item RD\_BDA 67
\item RD\_EVN 76
\item RD\_FEM 76
\item RD\_GEV 76
\item RD\_GXT 76
\item RD\_HDA 67
\item RD\_NAR 76
\item RD\_OBS 77
\item RD\_PNT 60
\item RD\_QS 67
\item RD\_ROADMAP 67
\item RD\_SDA 67
\item RD\_WDA 67
\item RD\_XDA 67
\item REBIN 90
\item RESTORE 70
\item RFITS 79
\item RM\_DARKLIMB 50
\indexspace
\item SAVEGEN 69
\item SAVE 70
\item SAV\_BDA 70
\item SAV\_HXI 70
\item SAV\_SDA 69
\item SEL\_BDA 25
\item SEL\_TIMRANGE 84
\item SET\_PLOT 86
\item SFD\_DECOMP 54
\item SHOW\_OBS3 21, 23
\item SHOW\_OBS4 23
\item SSWHERE 22
\item STEPPER 21, 33
\item STR2ARR 90
\item STR\_CONCAT 68
\item SUM\_BDA 51
\item SXT2FITS 72
\item SXT\_CENTER 65
\item SXT\_DECOMP 54
\item SXT\_GRID 35
\item SXT\_TE 57
\indexspace
\item tape 94
\item TEST\_RD 17
\item TIFF\_WRITE 71
\item TIM2DSET 22
\item TIM2ORBIT 83
\item time 81, 82, 83
\item TPROFILES 27
\item TVLCT 36, 37
\item TVSCL 35
\item TV 35
\indexspace
\item UNSHARP\_MASK 34
\item UP4 34
\item UP6 34
\item UP8 34
\item UTPLOT 26
\indexspace
\item video 107
\indexspace
\item WDEF 85
\item WMENU\_SEL 25
\item WRT\_FITS 71
\item WSHOW 85
\indexspace
\item XDL 92
\item XLOADCT 36
\item XSTEPPER 33
\item XY\_RASTER 34
\indexspace
\item YODAT 17
\indexspace
\end{theindex}

\end{document}
