\section{Wide Band Spectrometer (WBS)}

\begin{sloppy}
\subsection{Routines for Making Time Plots}

\subsubsection{PLOTT\_WDA  }
\index{light curves, WBS}

PLOTT\_WDA 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:
%
\idlinputa{plott\_wda, index}	\index{PLOTT\_WDA}
\idlinputb{plott\_wda, roadmap}	
\idlinputc{plott\_wda, roadmap(100:200), psym=10} 
%
\subsection{Routines for Making Spectral Plots}

\subsubsection{PLOTS\_WDA}

PLOTS\_WDA is a very rudimentary plotting routine that will display the spectra for any of the
WBS sub-instruments.  It is interactive and will prompt the user for
which sub-instrument to display, and which datasets.  A sample call is:
%
\idlinputd{plots\_wda, index, data}\index{PLOTS\_WDA}

\subsection{Routines for 2-D Spectral Display}

\subsubsection{DISP\_WDA  }

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.
%
\idlinputd{disp\_wda, index, data}\index{DISP\_WDA} 
%

\subsubsection{SXSPC}

SXSPC makes the time profiles of SXS-PC11, PC12, PC-21, and 
PC22 with various options\footnote{If this code is used as a template, we recommend
that the calling sequence be {\it index,data} for all routines}.
%
\idlinputa{pc\_data= sxscv(data, index)}
\idlinputc{sxspc,pc\_data,index}\index{SXSPC}

\subsubsection{WBSPC}

WBSPC makes four counting rate time profiles of SXS-PC11(21), 
SXS-PC12(22), HXS-PC1 and HXS-PC2. 
%
\idlinputd{wbspc,data,index}\index{WBSPC}

\subsubsection{PLOT\_HXSPC}

PLOT\_HXSPC makes a counting rate time profile of HXS-PC1, HXS-PC2 
or HXS-PC1 + PC2 with \mbox{UTPLOT}. 
%
\idlinputd{plot\_hxspc,index,data,pc}\index{PLOT\_HXSPC}
 
\subsubsection{PLOT\_HXSPH}

PLOT\_HXSPH makes a counting rate time profile of HXS-PH with
\mbox{UTPLOT}. You choose the energy or channel range.
%
\idlinputa{plot\_hxsph,index,data,range=range}
\idlinputc{plot\_hxsph,index,data,channel=channel}\index{PLOT\_HXSPH}

\subsubsection{PLOT\_GRSPCL}

PLOT\_GRSPCL makes a counting rate time profile of GRS-PC11, PC12, 
PC21 or PC22 with \mbox{UTPLOT}. 
%
\idlinputd{plot\_grspcl,index,data,pc}\index{PLOT\_GRSPCL}

\subsubsection{PLOT\_GRSPCH}

PLOT\_GRSPCH makes a counting rate time profile of GRS-PC13, PC14, 
PC15, PC16, PC23, PC24, PC25 or PC26 with \mbox{UTPLOT}.
%
\idlinputd{plot\_grspch,index,data,pc}\index{PLOT\_GRSPCH}

\subsubsection{PLOT\_GRSPHL}

PLOT\_GRSPHL makes a counting rate time profile of GRS-PHL1 or GRS-PHL2 with \mbox{UTPLOT}. 
You choose the energy or channel range. 
%
\idlinputa{plot\_grsphl,index,data,ph=1,range=range,channel=channel}\index{PLOT\_GRSPHL}

\subsubsection{PLOT\_GRSPHH}

PLOT\_GRSPHH makes a counting rate time profile of GRS-PHH1 or GRS-PHH2 with \mbox{UTPLOT}. 
You choose the energy or channel range. 
%
\idlinputd{plot\_grsphh,index,data,ph=1,range=range,channel=channel}\index{PLOT\_GRSPHH}

\subsubsection{Light Curve of RBM-PC }

See the description in the User's Guide.

\subsection{Routines for Data and Information Extraction}

\subsubsection{GT\_ Routines}

The routines GT\_SXS1, GT\_SXS2, GT\_HXS, GT\_GRS1, GT\_GRS2, GT\_RBMSD, and GT\_RBMSC
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-657 keV} \\
GRS1  & { GRS\_PC11 plus GRS\_PC21} & {  0.3-1.2 MeV } \\
GRS2  & { GRS\_PC12 plus GRS\_PC22} & {  1.2-5.6 MeV } \\
RBMSD & {  PC1 plus PC2 }           & { 5-300 keV  } \\
RBMSC & { Only RMSSC}               & {  $>$20 keV } \\ \hline
\end{tabular}\vspace{0.1in}

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.
%
\idlinputa{y = gt\_sxs1(roadmap)}	\index{GT\_SXS1}\index{GT\_SXS2}\index{GT\_HXS}\index{GT\_GRS1}
\idlinputc{y = gt\_hxs(w\_h, title=title)}\index{GT\_GRS2}\index{GT\_RBMSD}\index{GT\_RBMSC} 
%
\subsubsection{GET\_INFO}

See the description in the ``General Yohkoh Software'' chapter on
page~\pageref{get_info}.

\subsection{Routines for Calibration and Analysis}

\subsubsection{HXS\_FSP [*]} \index{spectral fitting}

With HXS\_FSP you interactively choose data intervals, and fit the HXS spectrum,
using the routine fsp\_11.pro. {\it index} and $data$ are the WBS index and data 
structures. $fit\_pars$ is the structure containing the results.  Optional parameters are 
-- $sc\_par$ is a structure containing spectrometer 
channel information, $ch\_dta$ is a structure containing the data for each channel, 
$outfile$ and $pfile$ are filenames for printouts and plots, respectively; 
$countfile$ is a filename, if this option is set, the count rates are printed
into that file which may be fit by the routine FSP\_PROC described above. 
%
\idlinputa{HXS\_FSP, index, data, fit\_pars}\index{HXS\_FSP}
\idlinputb{HXS\_FSP, index, data, fit\_pars, sc\_par, ch\_dta}
\idlinputb{HXS\_FSP, index, data, outfile=outfile}
\idlinputb{HXS\_FSP, index, data, pfile=pfile}
\idlinputb{HXS\_FSP, index, data, countfile=countfile}
\idlinputb{HXS\_FSP, index, data, fit\_pars, sc\_par, ch\_dta, sdel=sdel}
%

\subsubsection{HXS\_SPL}

HXS\_SPL makes a HXS spectrum fitted by single power law. You
interactively choose the background and flare time intervals for the
spectral analysis.  
%
\idlinputd{hxs\_spl,data,index}\index{HXS\_SPL}

\subsubsection{HXS\_SP2}

HXS\_SP2 makes HXS spectrum fitted by double power law in a similar way to HXS\_SP1.
%
\idlinputd{hxs\_sp2,data,index}\index{HXS\_SP2}

\subsubsection{GRS\_SPEFF}

GRS\_SPEFF makes preliminary GRS-1 and 2 spectra (0.3 -- 100 
MeV).You interactively choose the flare and background time intervals 
for the spectral analysis. The flux of each channel is calculated by 
dividing the counts by full energy absorption efficiency.  The first three 
channels data of GRS-1 and the four channels of data of GRS-2 are not plotted 
because these channel widths are not exactly determined.
%
\idlinputa{grs\_speff,data,index,ph=1,/disp}\index{GRS\_SPEFF}
\idlinputb{grs\_speff,data,index,ph=2,/disp}
\idlinputc{grs\_speff,data,index,ph=1,fltime=fltime,bgtime=bgtime}

\subsubsection{Further Analysis of HXS and GRS Data}

There are several routines for further HXS and GRS data analysis. With 
these routines you can get the following:

\IItem
\item Time profile of ratio of HXS-PC2 to HXS-PC1 counting rates       
\item Time profile of ratio of HXS-PHi-j to HXS-PHm-n counting rates
\item Time profile of ratio of GRS-PCi to GRS-PCj counting rates
\item Time profile of ratio of GRS-PHi-j to GRS-PHm-n counting rates
\item HXS spectral fitting by single power law, double power law, thermal 
     and power law plus Gaussian etc.    
\item Residuals and chi-square map for HXS spectral analysis
\item Gamma-ray spectral analysis (continuum plus lines) with the maximum 
     number of fitting parameters is 62
\item Residuals and chi-square map for GRS spectral analysis
\end{itemize}

See the detailed description in the User's Guide.

\subsection{Instrument Response Files}

The instrument response files for SXS, HXS and GRS are listed here.  These
files are ASCII files and are located in \$DIR\_WBS\_CAL.

\subsubsection{SXS}
\index{response files, WBS-SXS}

\vspace{0.2in}\begin{tabular}{|l|p{10.0cm}|}\hline
dtcorrf.dat  & {\raggedright
      Table of the deadtime correction factor vs. counting rates of
       SXS-PC11, PC12, PC21 and PC22 } \\ \hline 
\end{tabular}
 
\subsubsection{HXS}
\index{response files, WBS-HXS}

\vspace{0.2in}\begin{tabular}{|l|p{10.0cm}|}\hline
hxs\_01.rel & {\raggedright
      Table of channel number (0 -- 31) vs. energy (keV) relation for HXS-
       PH for HXS-OS of ``01 (hex)". (1992 June 9 -- present). } \\ \hline 

hxs\_21.rel & {\raggedright
      Table of channel number vs. energy relation for HXS-PH for
       HXS-OS of ``21 (hex)". (1991 Oct. 1 -- 1992 June 9). } \\ \hline 

hxs\_01\_conv260.rel & {\raggedright
      Table of incident photon energies (keV) corresponding to the 260
       rows of the 260 x 32 response matrix for HXS-PH spectral 
       analysis for HXS-OS of ``01 (hex)". (1992 June 9 -- present). } \\ \hline 

hxs\_21\_conv260.rel & {\raggedright
      Table of incident photon energies (keV) corresponding to the 260
       rows of the 260 x 32 response matrix for HXS-PH spectral 
       analysis for HXS-OS of ``21 (hex)". (1991 Oct. 1 -- 1992 June 9). } \\ \hline 

hxs\_01\_conv260.resp & {\raggedright
       260 (row) x 32 (column) response matrix for HXS-PH spectral 
       analysis for HXS-OS of ``01 (hex)". The row and column represent 
       the incident photon energy and observed channel number, 
       respectively. The matrix elements of i-th row represent a response 
       function for incident photons of i-th energy in hxs\_conv260.rel.     } \\ \hline 

hxs\_21\_conv260.resp & {\raggedright
      260 (row) x 32 (column) response matrix for HXS-PH spectral 
      analysis for  HXS-OS of ``21 (hex)". This is similar to 
      hxs\_01\_conv260.resp. } \\ \hline 

dtcf\_pc\_hxs.pro & {\raggedright
       Deadtime correction factor for HXS-PC1 and PC2.  The correction 
       is not exact when  the deadtime-corrected count of total PC exceeds
      about 100,000 counts/sec. It is due to instrument limitation. } \\ \hline 

dtcf\_ph\_hxs.pro & {\raggedright
       Deadtime correction factor for HXS-PH. The correction is not exact
       when the deadtime-corrected count of total PH exceeds about 35,000 
       counts/sec. In addition, spectral distorsion occurs when the deadtime-corrected 
       count of total PH exceeds about 21,000 counts/sec. It is due 
       to instrument limitation. } \\ \hline 
\end{tabular}
   
\subsubsection{GRS}
\index{response files, WBS-GRS}

\vspace{0.2in}\begin{tabular}{|l|p{10.0cm}|}\hline
grs1\_40.rel & {\raggedright
     Table of channel number (0 -- 127)  vs. energy (keV) relation for GRS-
     1 for GRS1-OS of ``40 (hex)". (1991 Oct.1- present). Energy widths 
     of the first 3 channels are not exact.  } \\ \hline 

grs2\_40.rel & {\raggedright
      Table of channel number (0 -- 127)  vs. energy (keV) relation for
      GRS-2 for GRS2-OS of ``40 (hex)". (1991 Oct.1- present). 
      Energy widths of first 4 channels are not exact.  } \\ \hline 

grs1\_40\_conv260.rel  & {\raggedright
    Table of incident photon energies (keV) corresponding to the 260
     rows of the 260 (row) x 128 (column) response matrix for GRS-
     PHL1 spectral analysis. } \\ \hline 

grs1\_40\_conv260.resp & {\raggedright
     260 (row) x 128 (column) response matrix for GRS-PHL1 spectral
     analysis. The row and column represent the incident photon energies
     and observed channel number, respectively. The matrix elements 
     of i-th row represent a response function for incident photon
     of i-th energy in grs1\_conv260.rel.  } \\ \hline   

grs2\_40\_conv260.rel  & {\raggedright
     Table of incident photon energies (keV) corresponding to the 260
     rows of the 260 (row) x 128 (column)  response matrix for GRS-
     PHL2 spectral analysis. } \\ \hline 

grs2\_40\_conv260.resp & {\raggedright
      260 (row) x 128 (column) response matrix for GRS-PHL2 spectral
      analysis. This is similar to grs1\_conv260.resp.  } \\ \hline 

dtcf\_ph\_grs11.pro & {\raggedright
       Deadtime correction factor for GRS-PHL1.  } \\ \hline 

dtcf\_ph\_grs21.pro & {\raggedright
       Deadtime correction factor for GRS-PHL2.  } \\ \hline 
\end{tabular}

\end{sloppy}

