Top/Reduction/NIR Reduction Pipeline


**ANIR Reduction Pipeline for the NIR Channel (ARIA) [#a1714946]

***What you need to run the pipeline; [#t49c2ab9]
-IRAF
If you don't have IRAF yet, please install it as follows (for Mac or Ubuntu);

 Download IRAF packages from http://iraf.noao.edu/
 
 #Newly create directory /iraf/iraf
 sudo mkdir /iraf
 cd /iraf
 sudo mkdir /iraf 
 
 #Extract the downloaded IRAF packages
 cd /iraf/iraf 
 sudo tar -xvf iraf***.tar
 
 #Install 
 cd unix/hlib
 sudo ./insatll.csh

-IRAF extern packages (stsdas, mscred)
Install external packages

 cd /iraf/iraf/extern
 sudo ./configure
 sudo make stsdas

 cd /iraf/iraf/extern/stsdas
 sudo ln -s bin.macosx bin.macintel (in case of Mac)
 cd /iraf/iraf/extern/tables
 sudo ln -s bin.macosx bin.macintel (in case of Mac)
 sudo make mscred

-OPM Software
For pattern matching, this pipeline uses OPM software available at
[[Noriyuki Matsunaga's web>http://translate.google.co.jp/translate?sl=ja&tl=en&js=y&prev=_t&hl=ja&ie=UTF-8&u=http%3A%2F%2Fstella.astron.s.u-tokyo.ac.jp%2Fnmatsuna%2FJapanese%2Fsoftware%2FOPM.html&edit-text=]].

-SuperMongo(Graph plot)~
If you want to plot some result, please install Super Mongo, 
available at [[Robert Lupton's web>http://www.astro.princeton.edu/~rhl/sm/]].

***How to Install [#b773935f]
-Extract the following zip file at whatever directory you like~
Aria_development_ver : [[dev.zip>http://www.ioa.s.u-tokyo.ac.jp/~tateuchi/download/dev.zip]]~
In the following example, a directory /home/anir/aqua is used

-Install OPM~

 cd /home/anir/aqua/sample
 wget http://stella.astron.s.u-tokyo.ac.jp/nmatsuna/Japanese/software/OPM1_4.tgz
 tar zxvf OPM1_4.tgz 
 cd OPM
 make 
 make cfitsio (if you have CFITSIO installed)

-Install Super Mongo~

***Cookbook for ARIA (Development Version) [#p4e084eb]

 #Note that this ARIA code (development version ) can only reduce the near IR data!
 
 
 1. DIRECTORY STRUCTURE OF AQUA IN UNI3
 _________________________________________________
      aqua --- rawdata (put some raw ANIR data you want to reduce)
              |
              --- aria --- 2mass
                           --- scripts
                           --- skyflat
                           --- template
 _________________________________________________
      #You can reduce the ANIR data with AQUA at  /home/anir/aqua.
      #IP address of uni3 is 192.168.36.41
 
 
 2. WHERE CAN I PUT SOME ANIR DATA?
      You, probably have got some raw FITS data beginning with ANIA000*****.fits.
      What you should do for the first step to reduce the data is to put them to /home/anir/aqua/rawdat.
      #for the beginner training, ANIA0001583[1-9].fits files have been copied in this directory already.
 
 
 3. WHERE CAN I REDUCE THE DATA?
      You should go into the directory at /home/anir/aqua/aria. 
 _________________________________________________
      >cd /home/anir/aqua/aria
 _________________________________________________
      This is the main directory where you can reduce them.
      Besides, you can find some other directories, such as "2mass", "badpix", "scripts", "skyflat" and "template".
      All files in this directory are necessary to reduce them.
 
 
 4. COPY THE REDUCTION SCRIPT TO THE MAIN DIRECTORY
      The scripts are in "scripts/scripts_nir" directory where you can find a lot of version about that.
      Then, copy them to the main directory as any name you want.
      #I STRONGLY recommend you to use the latest version !
 _________________________________________________
      >pwd
 /home/anir/aqua/aria
      >cp -r scripts/scripts_nir/script_20120507 sample 
 _________________________________________________
 
 
 5. MAKE IRAF DIRECTORY
      It is necessary for the tool to make Iraf directory. Therefore, you should make it in the directory you have created.
 _________________________________________________
      >cd sample
      >pwd
 /home/anir/aqua/aria/sample
      >mkiraf
 -- creating a new uparm directory
 Terminal types: xgterm,xterm,gterm,vt640,vt100,etc.
 Enter terminal type: xterm
 A new LOGIN.CL file has been created in the current directory.
 You may wish to review and edit this file to change the defaults.
 _________________________________________________
 
 
 6. OPTIMIZE SOME PARAMETERS IN THE SETTING FILE
     You should optimize the parameters for the data you want to reduce. The main code you have to edit is "script.process".
     If you edit it on the remote terminal, you have to use "emacs" or "vi".
 _________________________________________________
      >pwd
 /home/anir/aqua/aria/sample
      >emacs script.process -nw
 or
      >vi script.process
 _________________________________________________
     If you are not familiar with using "emacs" or "vi", you can edit it with "gedit" instead of them.
 _________________________________________________
      >pwd
 /home/anir/aqua/aria/sample
      >gedit script.process &
 _________________________________________________
     However, you have to keep in your mind that "gedit"can only be used on uni3 or through X-terminal.
     You SHOULD NOT use it when you have your observation on the summit because of the band limitation.
 
     What you should do to optimize the setting file is followings;
 _________________________________________________
       -1- Change "NSTART" paramter at line 11
             You should write here the start number of FITS file you want to reduce with removing "ANIA000" and ".fits"
       -2- Change "SFLAT" paramter at line 17
             You can choose ../skyflat/sflat_ks.fits in this case.
       -3- Change "OUTPUT" paramter at line 23
             You can set output fits file name
       -4- Change "SCFILTER" paramter at line 24
             If you want to estimate the zero magnitude and system efficiency, you should set this parameter.
       -5- Change "BAND" paramter at line 48
             This parameter is not so essential because it is just only used to match the position. You can choose "J", "H" or "K".
       -6- Change "FILTER" paramter at line 85
             If you want to estimate the zero magnitude and system efficiency, you should set this parameter.
 _________________________________________________
     Of course, there are many other parameters you can edit in this file.
     However, it is not necessary to edit them just to reduce. These parameters will need when you want to reduce them with high quality.
 
     If you complete optimizing it, you can finish setting.
 
 
 7. RUN THE SCRIPT!
     Now, you have finished what you should do before you run the script !
     To run this script using xterminal is better because you can see the fitting results of coordinate matching,
     zero magnitude and so on with "gv" command which is including in this script.
 _________________________________________________
      >pwd
 /home/anir/aqua/aria/sample
      >xterm &
 #on the xterm terminal
      xterm>./script.process
 _________________________________________________
     However, you can run it on the terminal where you are. 
     #I recommend you to take a log whenever you run this script.
 _________________________________________________
      >pwd
 /home/anir/aqua/aria/sample
      >./script.process > 20131117a.log
 _________________________________________________
 
 
 8. CONGRATULATIONS!!
     Finally, you can get the reduced data as "ic5179_ks.fits" in this case !
     You must be happy now!!
 
 
 Should you have any questions, feel free to ask me!
 Have a nice and happy observation and data reduction life in atacama!!
 
 
 Ken Tateuchi


Front page   Edit Diff History Attach Copy Rename Reload   New Page list Search Recent changes   Help   RSS of recent changes