FAST Spectrograph TDC home page

FAST Spectrograph

Processing Spectra
Jessica Mink, 2023-March-7

FAST Spectrum
[TDC Home]  [TDC Search] [OIR Home]

FAST Data Directories

All FAST data since January 5, 2005 has been reduce more or less this way

Task

Commands to Reduce a Night of FAST Data

1. Catalog FAST raw data archive

Unless otherwise noted, commands can be run from any directory.
Create a local log file for one night in the raw directory, and display the PDF file, camblog.pdf to the screen. If no date is given, last night's data is assumed. If the log file exists, it is not re-created. The PDF file of the log is displayed, if possible.

Each observation is in a separate 2-dimensional FITS file with a reduced file number (RFN=[nnnn]) assigned from 0001 for each night. Postscript (camblog.ps) and PDF (camblog.pdf log files are created from the FITS headers. Entries are added to the FAST raw database and FAST raw object file database, which can be searched using the -r option of fastsearch.

Start in FAST home directory.

> cd /home/fast
> pwd
/home/fast

> flog 2023.0122
Logging FAST data for night of 2023.0122
FASTLOG: arguments read, camblog, 2, no
islog=1 remake=no
redo=no

2. Transfer raw data to reduction/working directory

Raw data is copied from the raw directory to the appropriate reduction directories /home/fast/ared/[year]/[yyyy.mmdd]/[configuration=B[bin]D[disperse]T[tilt]A[aperture]. BIAS and DARK images for the night are copied to every configuration with the same binning, and the DISPERSE, TILTPOS, and APERTURE keywords of those images are reset to agree with the directory. Use fasthead to make sure that configuration parameters are identical, and remove any FITS files which are known to be bad.
If BIAS file DISPERSE, TILTPOS, or APERTURE numbers don't match object, COMP, and FLAT, change them using
sethead -x 0 *BIAS.fits aperture=[aperture]
Start in FAST home directory
 
> cd /home/fast
> pwd
/home/fast
Sort raw data into configuration directories in working directory /home/fast/ared/[yyyy]/[yyyy.mmdd.
 
> fsort 2023.0122
List working directory for specific date.
 
> fwll 2023.0122
Files in /home/fast/ared/2023/2023.0122:
drwxrwsr-x 3 fast fastgrp   8192 Jan 23 17:22 B2D300T600A1.5
drwxrwsr-x 3 fast fastgrp  12288 Jan 23 17:31 B2D300T600A3
drwxrwsr-x 3 fast fastgrp   8192 Jan 23 18:40 B2D600T752A2
drwxrwsr-x 3 fast fastgrp   8192 Jan 23 17:39 B2D600T752A2.0
-rw-rw-r-- 1 fast fastgrp  44486 Jan 23 17:11 camblog.pdf
-rw-rw-r-- 1 fast fastgrp 242896 Jan 23 17:11 camblog.ps
-rw-r----- 1 fast fastgrp  12983 Jan 23 05:19 fastlog.lis
-rw-rw-r-- 1 fast fastgrp  92674 Jan 23 17:13 fastlog.pdf
-rw-r----- 1 fast fastgrp 440459 Jan 23 04:57 fastlog.ps
Go to configuration directory and list configuration information for data.
 
> cd /home/fast/ared/2023/2023.0122/B2D600T752A2.0
> fasthead 
FILENAME                                PROGRAM,1       P.I.    DISPERSE        TILTPOS NAXIS2	APERTURE   IMAGETYP
---------------------------------       ---------       -----   --------        ------- ------	--------   --------
0025.BIAS.fits                                  0       staff        600            752    161	2.0        ZERO    
0026.BIAS.fits                                  0       staff        600            752    161  2.0        ZERO    
0027.BIAS.fits                                  0       staff        600            752    161  2.0        ZERO    
...
0141.COMP.fits                                  0       staff        600            752    161  2.0        COMP    
0142.TIC87496804.fits                         236       Pass         600            752    161  2.0        OBJECT  
0142.TIC87496804.ms.fits                      236       Pass         600            752      1  2.0        OBJECT  
0142.TIC87496804TF.fits                       236       Pass         600            752    161  2.0        OBJECT  
...
0161.FLAT.fits                                  0       staff        600            752    161  2.0        FLAT    
0162.FLAT.fits                                  0       staff        600            752    161  2.0        FLAT    

3. Align spectra for one configuration

In each reduction/working configuration directory for the date, extract and align 2-D spectra using fastpack.roadrunner in IRAF. When IRAF starts, it automatically moves to the FAST IRAF home directory, /home/fast/IRAF2.17. The FAST working directory, ared is linked from that directory, too, so you can use the same paths inside and outside of IRAF.

Sometimes it's worthwhile to run IRAF imstat on COMP, FLAT, or BIAS files to make sure that no files are way off statistically.

Operations are logged in the file road.log. To follow the log, run the shell script wroadlog in a different window but the same directory to follow the log.

Start IRAF.

> ecl
  IRAF2.17 with SAO packages 
  Maintained by Jessica Mink, jmink@cfa.harvard.edu
  January 17, 2023
  . . .
Go to each configuration directory for the night of the data being processed.

ecl> cd ared/2023/2023.0122/B2D600T752A2.0
ecl> pwd
/data/mc4/fast/reductions/2023/2023.0122/B2D600T752A2.0
Run roadrunner and pipe log to file road.log

ecl> roadrunner >& road.log
In another window, display the progress in real time after cd'ing to the same directory and running wroadlog.

> cd /home/fast/ared/2023/2023.0122/B2D600T752A2.0
> pwd
/data/mc4/fast/reductions/2023/2023.0122/B2D600T752A2.0
> wroadlog
42  data images
Gain Report: BinBy = 2 Disp = 600 Tilt = 752. Aper = 2.
. . .
Comp            MinL    MaxL    AvShift Smin    Smax    AvRMS   RMSmin  RMSmax
---------       ----    ----    ------- -----   -----   ------  ------  ------
0141.COMP         18      19      -6.22 -6.37   -6.06   0.0482   0.031   0.056

4. Extract, Cross-correlate and Check spectra

In the reduction/working configuration directory for the date, extract 1-D spectra, cross-correlate, and check them using the IRAF tasks fastpack.beepbeep for varied spectra or fastpack.beepstar for stellar spectra. Once beepbeep or beepstar has been run, rvall or rvstar can be used to re-correlate all of the spectra in the directory with the other set of templates. These scripts all create new summary files, such as zout and restock the arch/[yyyy]/[yyyy.mmdd./[config] directory.
In IRAF and the appropriate configuration directory

 
ecl> beepbeep
. . .

ecl> beepstar
. . .

Or for specific spectra:

> beepbeep 21-06-01
. . .

5. Make sure that files are archived appropriately

Check to make sure that the spectra got archived OK by listing the appropriate directory with fall
 
> fbll 2023.0122
/home/fast/arch/2023/2023.0122/B2D300T600A1.5/0047.dah2332p26.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0050.EGAnd.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0051.EGAnd.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0052.EGAnd.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0054.HD19445.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0056.G191B2B.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0106.TXCVn.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0108.TXCVn.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0110.TXCVn.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0112.TXCVn.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0114.TXCVn.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0115.TXCVn.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0117.SS129.ms.fits
/home/fast/arch/2023/2023.0122/B2D300T600A3/0119.SS129.ms.fits
/home/fast/arch/2023/2023.0122/B2D600T752A2.0/0142.TIC87496804.ms.fits
/home/fast/arch/2023/2023.0122/B2D600T752A2/0078.TIC299625554.ms.fits
/home/fast/arch/2023/2023.0122/B2D600T752A2/0101.HD84937.ms.fits
>

6. Distribute FAST data from one night

 
> cd /home/fast/ared
> fastdist 2023.0122
FASTDIST: Distributing data from 2023.0122 by program
FASTDIST1: Reading 1-D reduced data from /home/fast/arch/2023/2023.0122
FASTDIST1: 17 archived spectrum files in /home/fast/arch/2023/2023.0122
FASTDIST1: Ready to list 17 1-D spectra from /home/fast/arch/2023/2023.0122
230 /home/fast/arch/2023/2023.0122/0047.dah2332p26.ms.fits
12 /home/fast/arch/2023/2023.0122/0050.EGAnd.ms.fits
12 /home/fast/arch/2023/2023.0122/0051.EGAnd.ms.fits
. . .

FASTDIST: distributing data from programs 230,012,056,236
inform -1 -p230,012,056,236 2023.0122
inform -2 -p230,012,056,236 2023.0122
Send data to these PI's (y or n)?