\documentstyle[12pt,twoside]{article}

\font\ftwo = CMB10 scaled 1440
\font\flarge = CMBX10 scaled 2074

%------------------------------------------------------------------------------
\newcommand{\stardoccategory}  {YOHKOH BCS Note}
\newcommand{\stardocinitials}  {YBN}
\newcommand{\stardocnumber}    {10.1}
\newcommand{\stardocauthors}   {C D Pike}
\newcommand{\stardocdate}      {1 March 1993}
\newcommand{\stardoctitle}     {BCS data catalogue}
%------------------------------------------------------------------------------

\newcommand{\stardocname}{\stardocinitials /\stardocnumber}
\markright{\stardocname}
\setlength{\textwidth}{160mm}
\setlength{\textheight}{240mm}
\setlength{\topmargin}{-5mm}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\setlength{\parindent}{0mm}
\setlength{\parskip}{\medskipamount}
\setlength{\unitlength}{1mm}

\renewcommand{\_}{{\tt\char'137}}     % re-centres the underscore

\begin{document}
\thispagestyle{empty}
{\ftwo Institute of Space and Astronautical Science} \hfill \stardocname\\
{\large\bf \stardoccategory\ \stardocnumber}
\begin{flushright}
\stardocauthors\\
\stardocdate
\end{flushright}
\vspace{-4mm}
\rule{\textwidth}{0.5mm}
\vspace{5mm}
\begin{center}
{\Large\bf \stardoctitle}
\end{center}

\section{Introduction}

With the advent of the atlas of BCS CaXIX light curves, BCS data users have an
easy means of perusing and checking the quality of the available data.  As an
adjunct to this I have put on line some BCS data catalogue files.  There is an
IDL procedure to read these files into an IDL structure so the data
statistics can be manipulated.  Using the catalogue it should be relatively
easy, for instance, to search for data files with count rates within certain
limits or to identify BCS data files taken at the time of various classes of
GOES events.

\section{Catalogue contents}

At present there are two catalogues for the years 1991 (from 1-Sept) and 1992.
Their contents are conveniently described by the IDL structure described below.

\begin{tabular} {llll}

{\it Tag name} & &  {\it Contents} \\

{\bf .fid} & &  data file name \\

{\bf .week} & &  week/tape identification \\

{\bf .date} & &  calendar date of data   \\

{\bf .f\_st} & &   start time of data in file  \\

{\bf .f\_end} & &   end time of data in file   \\

{\bf .day} & &   day since 1979.0   \\

{\bf .time} & &   start time of file in msecs since 00:00   \\

{\bf .fe26} & &   maximum counts in channel 1  \\

{\bf  .fe25} & &  maximum counts in channel 2  \\

{\bf  .ca19} & &   maximum counts in channel 3  \\

{\bf  .s15}  & & maximum counts in channel 4   \\

{\bf  .g\_st} & & start time of any possibly related GOES event  \\

{\bf  .g\_max} & &   max time of any ....... \\

{\bf  .g\_end} & &  end time of any .......   \\

{\bf  .g\_class}  & &  GOES classification of any ......  \\

{\bf  .g\_opt}   & & H-alpha description of any .....  \\

{\bf  .g\_lat} & &  heliographic latitude of any .... (-ve = S) \\

{\bf  .g\_long} & &  heliographic longitude of any ....(-ve = E) \\

{\bf  .g\_ar}   & & active region number of any .....                \\

\end{tabular}
 
Note that where more than one GOES event was recorded during the time interval
of the data file then a separate entry in the catalogue (and hence structure)
was created for each GOES event, so be careful when doing statistics of
observed BCS counts etc. since some data file entries are repeated (in some
cases a number of times).  It is left to the user to construct the appropriate
IDL \lq where' statement to cater for this!



\section{Accessing the catalogues}

To load the data into IDL the procedure BCS\_LOAD\_CAT  can be used.  It takes
two parameters, the name of the structure to be returned and the year for which
data are required.  For example:

\centerline{ IDL$>$ bcs\_load\_cat, bcs92, 92}

The IDL structures have also been saved on disk and it is somewhat quicker to
use the \lq restore' command.  In this case the commands are:

\smallskip
\centerline{IDL$>$ restore,'\$DIR\_BCS\_CAT:bcs91.dat'}

or

\centerline{IDL$>$ restore,'\$DIR\_BCS\_CAT:bcs92.dat'}

In these cases the data will  appear in structures called BCS91 and BCS92
respectively.



The catalogue files and the IDL save files are held in the directory
\$DIR\_BCS\_CAT in the files 

\smallskip

BCS\_CATALOGUE\_91.DAT  

BCS\_CATALOGUE\_92.DAT

BCS91.DAT  and

BCS92.DAT


\section{Manipulating the data}

Some examples will illustrate possible uses of the catalogue. 

\bigskip

{\bf a)} Now that many of the raw data files have been compressed in order to save
disc space, or indeed are only archived on tape, we may still wish to find
those files having a very low SXV count.  Although the CaXIX light curve atlas
will give a fair idea of which files might be relevant, it is easy to check
this directly using the catalogues.  For instance, to search the 1992 data for
all files with a SXV count rate of 50 c/s or less, use the following IDL
commands:

IDL$>$ restore,'\$DIR\_BCS\_CAT:bcs92

IDL$>$ s = where(bcs92.s15 gt 0 and bcs92.s15 le 50)

IDL$>$ ss = bcs92(s).s15 

IDL$>$ sfid = bcs92(s).fid

IDL$>$ low\_s15 = ss(sort(ss))

IDL$>$ low\_fid = sfid(sort(ss))

IDL$>$ for i=0,n\_elements(ss)-1 do print,low\_fid(i),' ',low\_s15(i)

\bigskip

{\bf b)} If a list of 1992 file names which may have data connected with M class
flares is required then simply:

IDL$>$ print,bcs92(where(strmid(bcs92.class,0,1) eq 'M')).fid

There is, of course, no guarantee that BCS data exist for those events - but
that is where the atlas comes in!

\bigskip

{\bf c)} The day and time tags have been added to the structure (note that they
refer to the start time of the file only) so that the time can be accessed by
routines such as UTPLOT.

Thus:

IDL$>$ ss = where(bcs92.day gt 0)

IDL$>$ utplot,bcs92(ss),bcs92(ss).s15

will plot the maximum SXV counts for 1992.

Remember also that if the Yohkoh observing log is available on line at your
institute, then you can inspect, in much greater detail, the raw observed
counts for any time period without accessing the actual data files themselves. 
To plot the total counts in the SXV channel for 20 January 1992, for instance,
all that is needed is:

IDL$>$ rd\_obs,'20-Jan-92','21-Jan-92',bcs,/nosxtf,/nosxtp,/now\_h

IDL$>$ utplot,bcs,bcs.total\_cnts(3)


\end{document}


