2009.7/23
☆其の一 リスト作り、および簡単なsky引き


  ◎cl0024観測データを使い易いようにリスト化

・単純なデータだけなら・・・
cl> imhe MCSA*.fits
MCSA00038169.fits[2048,2048][int]: DARK
MCSA00038170.fits[2048,2048][int]: DARK
MCSA00038171.fits[2048,2048][int]: DARK
MCSA00038172.fits[2048,2048][int]: DARK
MCSA00038173.fits[2048,2048][int]: DARK
MCSA00038174.fits[2048,2048][int]: DARK
MCSA00038175.fits[2048,2048][int]: DARK
・・・・ 
    ・・・・・・・・           
            ・・・・・・・・・・・




これをリスト化するなら・・・
cl> imhe MCSA*.fits > cl0024_data_short
とすれば最低限のデータが入ったリストcl0024_data_shortの出来上がり。

・自分が見たい任意のデータだけ抜き出してリスト化

cl> imhe MCSA*.fits l+ | less
MCSA00038169.fits[2048,2048][int]: DARK
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [2048,2048], length of user area 5954 s.u.
Created Mon 20:58:41 22-Feb-2010, Last modified Mon 20:58:41 22-Feb-2010
Pixel file "MCSA00038169.fits" [ok]
DOM-HUM =        25.5 / Humidity measured in the dome (%)
DOM-PRS =       621.40 / Atmospheric pressure in the dome (hPa)
DOM-TMP =       276.65 / Temperature measured in the dome (K)
DOM-WND =        0.00 / Wind velocity in the dome (m/s)
OUT-HUM =        23.1 / Humidity measured outside of the dome (%)
OUT-PRS =       621.40 / Atmospheric pressure outside of the dome (hPa)
OUT-TMP =       277.25 / Temperature measured outside of the dome (K)
OUT-WND =        5.80 / Wind velocity outside of the dome (m/s)
SEEING =        0.00 / StarSize FWHM at telescope focus (arcsec)
WEATHER = 'Fine  '     / Weather condition
BZERO  =        0.0 / Real=fits-value*BSCALE+BZERO
BSCALE =         1.0 / Real=fits-value*BSCALE+BZERO
BLANK =     -2147483648 / Value used for NULL pixels
BUNIT = 'ADU   '     / Unit of original pixel values
CDELT1 =     0.00003250 / X Scale projected on detector (#/pix)
CDELT2 =     0.00003250 / Y Scale projected on detector (#/pix)
CRPIX1 =       1750.0 / Reference pixel in X (pixel)
CRPIX2 = 1024.0 / Reference pixel in Y (pixel)
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
                ・・・・・・・・・・・・・・・・・・・・・・・・・

などとすれば全情報見れるが長すぎて見る気失せる・・・

そこで
・欲しい情報(名前、どういうデータ?,filter,露出時間,coadd=何回重ね撮りしたか?)だけをリスト化したい。
cl> hselect MCSA*.fits "frameid,object,filter01,exptime,coadd" yes > cl0024_data_select
で、全fitsファイルの欲しい情報だけのリストできる。
$ more cl0024_data_select
MCSA00038169 DARK H2 13.000 1
MCSA00038170 DARK H2 13.000 1
MCSA00038171 DARK H2 13.000 1
MCSA00038172 DARK H2 13.000 1
MCSA00038173 DARK H2 13.000 1
MCSA00038174 DARK H2 13.000 1
MCSA00038175 DARK H2 60.000 1
MCSA00038176 DARK H2 60.000 1
MCSA00038177 DARK H2 13.000 1
MCSA00038178 DARK H2 13.000 1
MCSA00038181 DARK OC1_3 11.470 1
MCSA00038182 DARK OC1_3 11.470 1
・・・・・・・・・・             
       ・・・・・・・・・・      
              ・・・・・・・・・


・objectがcl0024でexp-timeが150秒のfitsファイルのみをリスト化する。
$ awk '$2=="CL0024" && $4>50 {print $1".fits"}' cl0024_data_select > cl0024list
$ more cl0024list
MCSA00038397.fits
MCSA00038398.fits
MCSA00038399.fits
MCSA00038400.fits
MCSA00038401.fits
・・・・・    
   ・・・・・・
でcl0024_data_selectリストからcl0024の画像だけが入ったリストつくれる。

・MOIRCSはchip1とchip2の2種類あり、奇数と偶数でchipがわかれているのでcl0024listも奇数リストと偶数リストに分ける。
$ cat -n cl0024list | more
1 MCSA00038397.fits
2 MCSA00038398.fits
3 MCSA00038399.fits
・・・・・・・・・
         ・・・・・・・・
と、catで番号付けできることを利用して
$ cat -n cl0024list | awk '$1%2==1{print $2}' > cl0024odd
$ cat -n cl0024list | awk '$1%2==0{print $2}' > cl0024even
とすれば奇数リストと偶数リストのできあがり!
(条件文の$1%2==1とは、1行目の番号を2で割った余りが1ならば真ということ)


◎簡単な作業、sky引き

・リスト全体を1つのファイルのように扱いたい場合
→@をつければok

cl> imhe @cl0024odd | less
MCSA00038393.fits[2048,2048][int]: CL0024
MCSA00038395.fits[2048,2048][int]: CL0024
MCSA00038397.fits[2048,2048][int]: CL0024
MCSA00038399.fits[2048,2048][int]: CL0024
MCSA00038401.fits[2048,2048][int]: CL0024
MCSA00038403.fits[2048,2048][int]: CL0024
MCSA00038405.fits[2048,2048][int]: CL0024
・・・・・・・・・・・・・・       
           ・・・・・・・・・・・


・単純には異なる画像を引算するだけでsky引きにはなる!

cl> imarith MCSA00038435.fits - MCSA00038437.fits hoge723.fits
  (    ファイル1   演算子  ファイル2   新しい名前) 
cl>display hoge723.fits 1 zr- zs- z1=0 z2=1000
z1=0. z2=1000.
(スケールをオートにしないでzr- zs- z1=? z2=?としていちいちいじった方がいい)

→一応銀河とおぼしきものと、その影があらわれたはず
こちらから画像
(注意:必ず同じchip同士の画像を引く!)


目次に戻る