Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.naic.edu/alfa/galfa/docs/gsrinit_whitebelt.ps.gz
Дата изменения: Sat May 6 03:46:42 2006
Дата индексирования: Sat Dec 22 16:39:21 2007
Кодировка:

Поисковые слова: jet
HOW TO GENERATE MH AND LSFS FILES
Carl Heiles (October 25, 2005)
1. INTRODUCTION
This is basically a cookbook that tells how to perform the rst two stages of GALFA data
reduction. If you are intererested in details, see the document entitled \MH AND LSFS: BLACK-
BELT DETAILS".
The GALFA spectrometer data are taken every second and are written in ts les; each ts
le usually has 600 seconds worth of data, with 14 receivers. We have lots of channels so the les
are large,  280 Mbytes. For further data processing we need to generate additional les, all of
which are much smaller.
One of these is the mh le, of which there is one for every ts le. The mh le contains two
structures called mh and mx. The structure mh contains accurate times, positions, and Doppler
velocities; the structure mx contains statistsical information that can be used to examine whether
the hardware is broken.
Another is the lsfs le, which contains the reduced SMARTF reductions. The term SMARTF
refers to the term used in the observing GUI to perform Least Squares Frequency Switching (LSFS),
so SMARTF and LSFS are one and the same. There is one lsfs le for each SMARTF calibration,
and there are usually one or two of these for each day of observing.
One important thing: It is crucial 1 that you start IDL using the correct startup le. At the very
moment (25oct2005), the proper way to do this is to de ne the environment variable IDL_STARTUP
by typing from the unix/linux prompt
setenv IDL_STARTUP ~heiles/gsr/start_ao.idl
soon we will put the proper le in the /share/galfa area. Also, you should use a fast computer
such as AOLC1, AOLC2, AOLC3, AOLC4.
2. GENERATING THE mh FILES
These are used by all analysis routines including the SMARTF calibration, so these must be
generated rst. To accomplish this perform the following steps.
1 Why is it crucial? Well, partly because it de nes the proper paths to software. But there's more: the good folks
at Goddard changed the conventions in various routines dealing with time, such as the civil time to LST converter
ct2lst:pro, to use east longitude instead of west longitude. Thus, some of the new Goddard time routines that we use
are not backwards compatible to our software, which uses the old versions.

{ 2 {
2.1. Generate the list of ts les
The rst thing to do is generate a le containing a list of the fits les you are interested in.
You can do this at the UNIX prompt very easily. For example, suppose you want all of the fits
les for the togs project that reside in a particular subdirectory (which, at Arecibo, will probably
be /share/galfa/). Let's assume the name of this subdirectory is togsfilepath. These mh les
have names like galfa.20051005.togs.0043.fits.
Get into that subdirectory and type the UNIX command
ls -1 *togs*fits > togsfilelist
This will produce a le called togsfilelist, which will contain a single column and on each line
will be the name of the le (without any subdirectory pre x). From now on we will refer to this
lename containing the list of ts les as fitsfilelist.
2.2. Determine the paths for input and output
You know the path where the ts les are located; let's call this tspath. In IDL you'd de ne
this variable by
fitspath='/share/galfa/'
Also, you've generated fitsfilelist. You need to know where to write the mh les you're gener-
ating. Maybe you want to create a special directory called /share/mhname/mymhfiles/; so in IDL
de ne the path where you'll put the mh les by
mhpath='/share/mhname/mymhfiles/'
2.3. The rest is easy. . .
You've de ned the in and out paths fitspath and mhpath, and the lename containing the
list of ts les is called fitsfilelist. You generate all the mh les with
mh_wrap, fitspath, 'fitsfilelist', mhpath
There will be several lines of output for each le processed. Success is indicated by output
lines that look like this:
******************writing/share/galfa/galfa.20051005.togs.0003.mh.sav
The processing time is limited by the speed of reading the ts les, because they are so large;
mostly you'll get through one le every 3 to 5 seconds. At Arecibo, don't try save clock time by
running two copies of mhpath on the same computer: for unknown reasons the le-reading time
jumps to upwards of 20 seconds!

{ 3 {
3. GENERATING THE lsfs FILES
Again, the rst step is to generate the list of ts les. Our software automatically selects
groups of SMARTF data from a long list of ts les that can cover many days. The easiest way
to proceed is to make a list of all the ts les in your project and let the program decide what to
do. If you're clever (i.e., lazy) you'll use the same list of les you used for the mh les above|a list
containing all of the ts les for your project 2 .
One thing: every ts le in the list must have a corresponding mh le.
3.1. Generate the list of ts les
Do this in exactly the same way you did for the mh les, as described in x2.1.
The SMARTF reduction uses the mh les in addition to the ts les, but you don't need to
make a list of mh les because the program makes it automatically from your list of ts les.
3.2. Determine the paths for input and output
You need to specify the fitspath and the mhpath for the input les, and also the lsfspath
for the lsfs les that are written.
3.3. The rest is easy. . .
You've de ned the in paths fitspath and mhpath, and the output lsfs path lsfspath. You've
also de ned the lename containing the list of ts les; let's assume it's the same as for the mh les,
so it's called fitsfilelist. You generate all the lsfs les with
lsfs_wrap, fitspath, mhpath, 'fitsfilelist', lsfspath
Of course, if you're running IDL in a directory other than the one containing fitsfilelist, then
you'll need to specify the path to fitsfilelist. One more thing: the least-squares t done in the
generation of the lsfs les is a quite complicated iterative t, and you can watch it in action by us-
ing the \noquiet option: lsfs_wrap, fitspath, mhpath, 'fitsfilelist', lsfspath, /noquiet
This plots the iterative convergence and is fun to watch|for a while, anyway!
This research was supported in part by NSF grant AST 04-06987 and by the NAIC.
2 As Kevin Douglas pointed out, if you're even more clever you'll know which ts les contain the LSFS data
already, and your list will be much shorter!