\documentstyle[12pt]{article}
\begin{document}
\begin{center}
{\huge Data Reduction Using the HEASARC Archive and Ftools}
\end{center}
{\large
\begin{itemize}
\item
Open Netscape
\item
Go to HEASARC web page by typing $\ $
{\tt http://heasarc.gsfc.nasa.gov}
\item 
W3Browse

On the bottom of the page there are two rows of six locations within
HEASARC to which you can go.  The top left option is the {\it
W3Browse} location where you can search for observations of various
objects.

\begin {itemize}
\item
Click on it.
\item
Select the {\it Basic} option.
\end{itemize}

\item 
Search for a specific object

\begin {itemize}
\item
From the {\it Past Mission Archives} section select {\it EXOSAT} by
clicking on the gray button to its left.
\item
In the box at the top labeled {\it Object Name or Coordinates} enter
{\tt GK PER}.
\item
Click on {\it Submit Query}.
\end{itemize}

\item
Selecting an observation

\begin{itemize}
\item
You will receive many results for this search.  Each line in the chart
for each section reperesents a separate observation made with the {\it
EXOASAT} satellite.

Scroll down the page to the section entitled {\it EXOSAT ME Spectra
and Lightcurves (HEASARC$\_$ME)} and click on the gray button to the left
of the line of the observation with a quality flag ({\it qflag$\_$me}) of
4.  

The quality flag number corresponds to how good each observation is.
0 is unusable, 1 is very poor, 2 is poor, 3 is acceptable, 4 is very
good and 5 is excellent. 

\item
Slightly below the table of observations there is a box, entitled 
{\it Categories of data products}, containing different types of data
collected in each observation.  In the box, click on the second line:

{\it EXOSAT ME Broadband Lightcurves (BROADLC)}.

\item
Click on {\it Submit}.  You may receive a security warning message
from Netscape, to continue just click on {\it Continue Submission}.

\item
This page shows all the possible data that can be examined from the
observation you chose.  At the end of each line the filename of the
data you wish to retrieve is printed in the form of {\it file.Z}.
Select the lines, toward the bottom, with attached filenames {\it 
d05853.lc.Z d05865.lc.Z} by clicking on the gray button to the left of
the corresponding line.  

\item
Scroll down the page and click on {\it Retrieve Data Products}
\end{itemize}

\item
Downloading TAR files

\begin{itemize}
\item
The screen that appears should list the two files you chose.  Click on
{\it Download TAR file} which appears right below.

\item
The window that appears contains four sections: {\it Filter,
Directories, Files, Selection}.  Make sure that {\bf your} directory apears
in the {\it Selection} box.  If it does not then you must enter the
{\tt /temp} directory you created to store your files.  

If you had to re-enter your directory then when you finished typing
click on {\it Cancel}, then Click on {\it Download TAR file} again.
This time the correct directory should appear in the {\it Selection} box. 

\item
Click on {\it OK}

Netscape will copy the files you have selected into your directory in
the form of a {\it w3browse-$\#$.tar} file.  It is a compressed file
and cannot be used until it is opened up properly.

\item
Un-tar your {\it w3browse-$\#$.tar} by typing:

{\tt tar -vxf} {\it w3browse-$\#$.tar}

This command produced a subdirectory chain in your directory called {\it
me/rates/d/} where youre files are
located.
\end{itemize}

\item
Organizing and uncompressing the files in your directory

\begin{itemize}
\item
You will find the files you downloaded from HEASARC in their new 
subdirectory by typing:

{\tt cd} {\it me/rates/d/}

\item
Then type {\tt ls} to list the files. 

{\it d05853.lc.Z   d05865.lc.Z} should appear.

Notice the files end with {\it .Z}$\ $.  This means they are comrpessed
further and still cannot be used.  

\item
Uncompress the files by typing:

{\tt uncompress *.Z} 

The * is a wildcard character so that your command above says
``uncompress {\bf anything} in this directory that ends with {\it .Z}''.

Then type {\tt ls}.  The {\it .Z} should have disappeared from the
filenames making the files usable.

\item
Remove the {\it w3browse-$\#$.tar} file now that you have what you
need.  Type:

{\tt rm ../../../{\it w3browse-$\#$.tar}}
\end{itemize}

\item
To see the important information about this observation open up one of
the files in the emacs editor.  Type:

{\tt emacs d05853.lc $\&$ }

The file that comes up contains information such as the date and time
of this observation, the telescope and instrument that collected the
data, the location of the object as well as its name.  

Close emacs.

\item
Examining lightcurves

\begin{itemize}
\item
To create a lightcurve for each dataset you will use the {\it lcurve}
routine.

{\tt type: lcurve < Enter >}

Then enter {\tt 1} when asked for the number of time series.

\item
You will then be queried for the filename you wish to examine. Type:
{\tt d05853.lc <enter>}

\item
You will be asked for the 'window file'.  This is a mask that allows
you to choose various subsets of the data.  Choose  {\tt -  (dash) <enter>}
for the default.

\item
Now you can bin the data in whatever intervals you wish.  For the best
time resolution choose the minimum time.  In this case, it is:{\tt 30
<enter>}

\item
At this point, you can choose how many intervals you want to look at
for this data.  Usually, it is most convenient to to have 1 interval
(i.e. look at the complete observation as one graph).  So choose:
{\tt 464 <enter>}, which will put 464 ``newbins'' of 30 sec. each on the
graph.  This is the entire observation.

\item
You will now be asked to name the output file.  To avoid confusion, I
usually
choose the same prefix as the input file, and just append a .flc to
distinguish it from the original.  So type:  {\tt d05853.flc <enter>}

\item
Type: {\tt yes <enter>} when queried about whether you want a plot.

Type: {\tt /XW <enter>} for the plot device  (this is your screen name).

The lightcurve will now be displayed!  To proceed further, you need to
move the plot off of the xterm window so you can enter more commands.
So drag the graph by the header to a convenient place on the screen.

\item
At the pgplot prompt, type: {\tt q <enter>} to write the file and exit
the lcurve routine.


\end{itemize}

\item
Power Spectra!
\begin{itemize}

\item
To see the periodicities (if any) in the data, you can perform a power
spectrum (like a Fourier analysis) on the data.  This will tell you
the frequencies that contribute to the data you just plotted. So type:
{\tt powspec <enter>} to begin this analysis.

\item
For the filename, you enter the {\it output file} from lcurve. I.e.
type: {\tt d05853.flc <enter>}

\item
Use the default window file, i.e. type: {\tt - <enter>}
Use the minimum Newbin Time for the best power resolution, i.e. in
this case, type: {\tt 30. <enter>}

\item
When asked for the Newbins per interval, choose the
Maximum
Newbin No. shown, i.e. type: {\tt 463 <enter>}.  This will allow you
to look at the entire observation at once.

\item
The next parameter asks you about ``frames''.  This allows you to look
at
segments of several different data sets.  For all our analyses, we
will always choose 1 interval/frame.  So, type {\tt 1 <enter>}

\item
Next, choose 0 (zero) so that you do not rebin the results into
different time segments.

\item 
Choose a name for your output file, so you can look at it afterwards.
Try (for example):  {\tt d05853.pow <enter>}



\item
Choose yes, to plot the results, and enter /XW for your device name.
AND THERE IT IS!  Notice the ``spikes'' that indicate periodic data.
You may want to rescale the x-axis to see the plot in better detail.
Move the plot off the terminal window and type ``rescale  x xmin xmax''.
So in this particular plot, where you are interested in the exact
position of the big peak, you would type: {\tt rescale x 2e-3 3e-3
<enter>}.  Incidentally, if you forget any of this, you can type: {\tt
help <enter>} to get information about the current routine (in this
case,
PGPLOT).   Type: {\tt q <enter>} to quit pgplot.

\item
To examine a hardcopy of the output (to see, say, the exact frequency
of the peak) you can run FDUMP.  So type: {\tt fdump <enter>} and
enter the filename (d05853.pow, for example).  If you want to display
to the screen, make your output file STDOUT.  When you are queried for
columns to display, type: {\tt FREQUENCY POWER <enter>}.  (If you have 
another file to examine, you need to find out what those columns are
labelled as, so you can do a ``more filename'' command to examine the
header record of the fits file that contains this information.)
Now, you can see the results of the graph.  Note that the maximum of
the power spectrum is at: 2.865 e-3 Hz = 349 seconds, the period of GK
Per. 

\end{itemize}

\item
CONCATENATION OF FILES

\begin{itemize}

\item
After you do the separate analysis of the entire observation,
consisting of 05853 and 05865 segments, you will want to put them
together. This you do by entering a file list, in place of the
individua filenames in {it lcurve}.  So you would create a file, say,
{it list.con} and it would just two lines in it:

d05853.flc

d05865.flc


Note that the INPUT files to {\it list.con} are the .flc files!!
Now, when you run {\it lcurve} you enter @list.con in place of the
filename you used previously.  Your other parameters will also change,
because you are now dealing with 900+ bins instead of 400+.  Then, 
you can executeb {\it powspec} on the summed data.

\end{itemize}

\end{itemize}
}


\end{document} 