README


------------------------------------------------------------------
FMOS Data Reduction
------------------------------------------------------------------
### Download ###
wget http://www.kusastro.kyoto-u.ac.jp/~iwamuro/FMOS/REDUCTION/all.tgz
tar xvfz all.tgz
make
(cfitsio libraries are required to compile.)

This package includes followings.


### IRAF ###
mkiraf
...
emacs login.cl &
#Change default parameter
set     stdimage        = imt2048
set     imtype          = "fits"
#Add following lines before "keep" at the end of login.cl.
task imstatrej = home$imstatrej.cl
task mdisp = home$mdisp.cl
task rmstripe = home$rmstripe.cl
task rmstripe1 = home$rmstripe1.cl
task rmstripe2 = home$rmstripe2.cl
task rmstripe3 = home$rmstripe3.cl
task rmcross = home$rmcross.cl
task rmcross_ = home$rmcross_.cl
task quadlev = home$quadlev.cl
task rmchecker = home$rmchecker.cl

#!!!!!!!!!!!!!!!
#!!! Caution !!!
#!!!!!!!!!!!!!!!
# Make sure that "set -o noclobber" is disabled (or commented out) 
# in ~/.bashrc (or ~/.cshrc) to enable to overwrite temporary files 
# in the script.

### Getting sample data ###
wget http://www.kusastro.kyoto-u.ac.jp/~iwamuro/FMOS/SAMPLE/sample1.tgz
tar xvfz sample1.tgz

ds9 &
cl
cd sample1

ls -lt FMSA*
!../headerinfo ./

FMSA00004039[0] 'sample  ' 'low     ' '909.13  ' 
FMSA00004041[0] 'sample  ' 'low     ' '909.133 ' 
FMSA00004043[0] 'sample  ' 'low     ' '909.132 ' 
FMSA00004045[0] 'sample  ' 'low     ' '909.123 ' 
FMSA00004047[0] 'sample  ' 'low     ' '909.129 ' 
FMSA00004049[0] 'sample  ' 'low     ' '909.136 ' 
FMSA00004051[0] 'sample  ' 'low     ' '909.131 ' 
FMSA00004053[0] 'sample  ' 'low     ' '909.128 ' 
FMSA00004055[0] 'DOMEFLAT_OFF' 'low     ' '20      ' 
FMSA00004057[0] 'DOMEFLAT_OFF' 'low     ' '20      ' 
FMSA00004059[0] 'DOMEFLAT_OFF' 'low     ' '20      ' 
FMSA00004061[0] 'THAR    ' 'low     ' '20      ' 
FMSA00004063[0] 'DOMEFLAT_ON' 'low     ' '20      ' 
FMSA00004065[0] 'DOMEFLAT_ON' 'low     ' '20      ' 
FMSA00004067[0] 'DOMEFLAT_ON' 'low     ' '20      ' 
FMSA00004069[0] 'DOMEFLAT_ON' 'low     ' '20      ' 
FMSA00004071[0] 'DOMEFLAT_ON' 'low     ' '20      ' 
FMSA00004073[0] 'DOMEFLAT_ON' 'low     ' '20      ' 
This dataset includes 8 object frames taken with ABAB nodding pattern
(Set "a" pos.1 => Set "a" pos.2 => Set "b" pos.1 => Set "b" pos.2 => ...).
Dome flat images are taken at 2 different rotator angles to
reduce the field gradation.

To display a image,
displ FMSA00004039[0] 1

The fits file has an extension table,
[0]: Usual fits image
[1]: ASCII table extension of s2o information

### Dome Flat & CAL Lamp ###
#low resolution mode [lr]
!sed -e 's/MODE/lr/g' ../redproc_common > redproc_common
!emacs redproc_common &

#replace as follows for irs1 part
Flat_OFF1,Flat_OFF2,Flat_OFF3 => FMSA00004055[0],FMSA00004057[0],FMSA00004059[0]
CAL_ON1,CAL_ON2 => FMSA00004061[0]
Flat_ON1,Flat_ON2,Flat_ON3,Flat_ON4,Flat_ON5,Flat_ON6 => FMSA00004063[0],FMSA00004065[0],FMSA00004067[0],FMSA00004069[0],FMSA00004071[0],FMSA00004073[0] 

Go to redproc_common

### OBJECT ###
!sed -e 's/TARGET_NAME/sample1/g' ../redproc | sed -e 's/MODE/lr/g' > redproc_sample1
!emacs redproc_sample1 &

#replace as follows
/data/oXXXXX/FMSA00000000.fits => FMSA00004039.fits

!echo "a FMSA00012345 FMSA00012347" >  irs1_sample1_lr.tbl => !echo "a FMSA00004039 FMSA00004041" >  irs1_sample1_lr.tbl
!echo "b FMSA00012349 FMSA00012351" >> irs1_sample1_lr.tbl => !echo "b FMSA00004043 FMSA00004045" >> irs1_sample1_lr.tbl
!echo "c FMSA00012353 NONE"         >> irs1_sample1_lr.tbl => !echo "c FMSA00004047 FMSA00004049" >> irs1_sample1_lr.tbl
!echo "d NONE FMSA00012359"         >> irs1_sample1_lr.tbl => !echo "d FMSA00004051 FMSA00004053" >> irs1_sample1_lr.tbl

!../conv_w_fnu irs1_sample1_lrypb.fits irs1_ar_lrw.fits irs1_cont_sample1_lra.fits irs1_sample1_lrypbw.fits 15 XX
=> !../conv_w_fnu irs1_sample1_lrypb.fits irs1_ar_lrw.fits irs1_cont_sample1_lra.fits irs1_sample1_lrypbw.fits 15 163

Go to redproc_sample1

#!!!!!!!!!!!!!!!
#!!! Caution !!!
#!!!!!!!!!!!!!!!
#Some stary images appear when the stellar spectra are too bright.
#You can see an example image having stary light at
#http://www.kusastro.kyoto-u.ac.jp/~iwamuro/FMOS/MANUAL/irs1_ghost_lrypb.html