\section{{\bf Format and Naming of Yohkoh Data Files}}

\subsection{\label{sec:yoh_file_form}Yohkoh Data File Format}
\index{data files, reformatted}
\index{reformatted data files}
\index{file format, archive data}
\index{format, archive data file}
\index{archive data, format of files}
\index{roadmap}

\begin{figure}[btp]
\begin{center}
\input rguide_file_fig.tex
\medskip
\caption{Yohkoh Data File Format}
\end{center}
\end{figure}

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

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

The program which reads the file learns 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 are 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 contains `data sets'.  A data set is a single \index{data sets}
image for SXT, single spectrum 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 the date and time that the data were taken, the
mode and position of the instrument's peripherals (e.g., filters, HV), and
information on temperature and gain information.
\index{index structure}

The Optional Data 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 are 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.
\index{roadmap structure}

\smallskip
For a full description of the Yohkoh database and all the different data
structures, see the \textbf{File Control Document}.

\newpage
\subsection{\label{sec:yoh_file_name}Yohkoh Data File Names}

\subsubsection{Yohkoh Directory Logicals/Environment Variables}
\index{directories, database}
\index{environment variables, database}
\index{database, environment variables}

\begin{sloppy}
There is a set of VMS logicals and Unix environment variables which point to
the database directories.  By using these logicals in all of the access
routines (along with the routine \mbox{CONCAT\_DIR)} it is possible for
software to be directly portable between VMS and Unix machines.
A list of the logicals that exist for the Yohkoh database is given in Table
{\thesection}.1.
\end{sloppy}

\subsubsection{Yohkoh Prefixes}
\index{YDB files}\index{Yohkoh file prefixes}\index{prefixes}
\index{file prefixes}\index{secondary database files}\index{SFD images}

Yohkoh filesnames start with a three letter prefix. A list of currently
defined prefixes is given in the Table {\thesection}.2. More information
about a prefix (\textit{``ppp''}) can be found by using the IDL command:.
%
\idlinputd{help\_prefix,'ppp',/full}

\subsubsection{Yohkoh File IDs}\index{file IDs}\index{file names, IDs}

The orbit file ID's are an 11 characters date format following the prefix
as shown below:
%
\begin{verbatim}
      pppYYMMDD.HHMM

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

\subsubsection{Yohkoh Week IDs}\index{week IDs}\index{file names, week IDs}

The Yohkoh week starts on Sunday and ends on Saturday.  CAUTION: Yohkoh
data taken at 00:01 (one minute after midnight) on Sunday morning is
most likely in a file and tape for the previous week since the orbit
started on Saturday and the first full orbit for Sunday has not started. 
Up to the first 90 minutes of data taken on Sunday could be stored in
the previous week, depending on when the spacecraft day begins. 

The weekly IDs are of the form:
%
\begin{verbatim}
      pppYY_WWa.NN

      where ppp  - Prefix of the file
            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}
%
\noindent A list of the dates covered by each of the weeks is given 
in Table {\thesection}.3.

\subsubsection{Yohkoh Carrington IDs}\index{carrington IDs}

The Carrington IDs are of the form:
%
\begin{verbatim}
      ppp_crRRRRa.NN

      where ppp  - Prefix of the file
            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 starting dates for Carrington Rotations are shown in 
Table {\thesection}.4.

% LIST_DIR.TEX input starts --------------------------
\newpage
\noindent\textbf{Table {\thesection}.1: Defined Yohkoh Enviroment Variables} \newline
\vspace*{0.2cm} \newline
\input list_dir.tex
% LIST_DIR.TEX input ends --------------------------

% MK_PREFIX_TABLE input file start ------------------------

\newpage
\noindent\textbf{Table {\thesection}.2: Defined Yohkoh Prefixes} \newline
\vspace*{0.2cm} \newline
\input mk_prefix_table.tex
 
% MK_PREFIX_TABLE input file end ------------------------

%
\newpage
\label{week_id}
\noindent\textbf{Table {\thesection}.3: Dates covered by Week IDs} 
\vspace*{0.2cm} \newline
{\footnotesize
\input mk_weekid_xxx.tex }
\normalsize

%
\newpage
%%\begin{table}[tp]
\label{carr_rot}
\noindent\textbf{Table {\thesection}.4: Start Dates of Carrington Rotations} \newline
\vspace*{0.2cm} \newline
{\small
\input mk_carr_id.tex }
\normalsize
%%\end{table}

