2009.10/27
前回までで作った複数枚のflat-fielding,sky引きしたファイルを一枚にまとめて(imcombine)精度の良い画像をつくっていきたい。
が、それをやるためには複数枚のファイル内の天体の位置合わせをしなくてはならない。更に検出器chipの特性である変なゆがみ(distortion)の補正も行った方がよい。
今日はとりあえず、distortion補正を行い、次回以降必要になる天体検出ソフト「SExtractor」をインストールする。
☆其の一 distortion補正
◎補正用ファイルをMCSREDから探す
・MCSREDのダウンロード
distortionはMOIRCSのchip特性であり、MOIRCS撮像データ処理用パッケージMCSREDの中に補正用ファイルがあるので以下のページからMCSREDをダウンロードしてlogin.clと同じディレクトリ(ホームディレクトリ)に入れとく。
MCSREDのページ
・MCSREDのDATABASEの中から今扱ってるデータと日付の近い補正用ファイルを取ってくる。
まず今扱ってるデータの日付を確認
cl> hselect *fits "DATE-OBS" yes | less
→全部2006-09-01のはず!
観測データは全部2006年9月1日にとったものなので、その直前の補正用ファイルをホームディレクトリのMCSRED内DATABASEから探す。
$ cd
$ cd MCSRED/DATABASE/
$ ls
ana_aug06.cfg mcsdistcrr2_aug06.dbs
ana_aug07.cfg mcsdistcrr2_aug07.dbs
ana_aug08.cfg mcsdistcrr2_aug08.dbs
ana_aug08.cfg~ mcsdistcrr2_dec05.dbs
ana_dec05.cfg mcsdistcrr2_feb07new.dbs
ana_feb07.cfg mcsdistcrr2_feb08.dbs
ana_feb07new.cfg mcsdistcrr2_jan05.dbs
ana_feb08.cfg mcsdistcrr2_jan06new.dbs
ana_jan05.cfg mcsdistcrr2_mar06.dbs
ana_jan06.cfg mcsdistcrr2_may07.dbs
ana_jan06new.cfg mcsdistcrr2_nov06new.dbs
ana_mar06.cfg mcsdistcrr2_oct07.dbs
ana_mar07.cfg mcsdistcrr2c_040920.dbs
ana_mar07.cfg.tmp mcsdistcrr2c_050125.dbs
ana_may07.cfg mcsdistcrr2c_050614.dbs
ana_nov06.cfg mcsdistcrr2c_aug05.dbs
ana_nov06new.cfg mcsmosaic1_aug06.dbs
ana_oct07.cfg mcsmosaic1_aug07.dbs
invmosaic_ch1.dbs mcsmosaic1_aug08.dbs
invmosaic_ch1.gmp mcsmosaic1_dec05.dbs
invmosaic_ch2.dbs mcsmosaic1_feb07new.dbs
invmosaic_ch2.gmp mcsmosaic1_feb08.dbs
mcs_distcor_ch1_040920.dbs mcsmosaic1_jan05.dbs
mcs_distcor_ch1_050125.dbs mcsmosaic1_jan06new.dbs
mcs_distcor_ch1_050614.dbs mcsmosaic1_mar06.dbs
mcs_distcor_ch2_040920.dbs mcsmosaic1_may07.dbs
mcs_distcor_ch2_050125.dbs mcsmosaic1_nov06new.dbs
mcs_distcor_ch2_050614.dbs mcsmosaic1_oct07.dbs
mcsdistcrr1_aug06.dbs mcsmosaic2_aug06.dbs
mcsdistcrr1_aug07.dbs mcsmosaic2_aug07.dbs
mcsdistcrr1_aug08.dbs mcsmosaic2_aug08.dbs
mcsdistcrr1_dec05.dbs mcsmosaic2_dec05.dbs
mcsdistcrr1_feb07new.dbs mcsmosaic2_feb07new.dbs
mcsdistcrr1_feb08.dbs mcsmosaic2_feb08.dbs
mcsdistcrr1_jan05.dbs mcsmosaic2_jan05.dbs
mcsdistcrr1_jan06new.dbs mcsmosaic2_jan06new.dbs
mcsdistcrr1_mar06.dbs mcsmosaic2_mar06.dbs
mcsdistcrr1_may07.dbs mcsmosaic2_may07.dbs
mcsdistcrr1_nov06new.dbs mcsmosaic2_nov06new.dbs
mcsdistcrr1_oct07.dbs mcsmosaic2_oct07.dbs
mcsdistcrr1c_040920.dbs mcsmosaicoffset_040920.dat
mcsdistcrr1c_050125.dbs mcsmosaicoffset_050125.dat
mcsdistcrr1c_050614.dbs mcsmosaicoffset_050614.dat
mcsdistcrr1c_aug05.dbs
見方としてはmcsdistcrrで始まるのがdistortion補正ファイルでmcsdistcrr(チップ)_(日付).dbsとなっている。
なので今回はmcsdistcrr1_aug06.dbs(チップ1用)、mcsdistcrr2_aug06.dbs(チップ2用)を作業スペース(~/irafwork/practice)にコピーしてくる。
$ cp mcsdistcrr1_aug06.dbs ~/irafwork/practice
$ cp mcsdistcrr2_aug06.dbs ~/irafwork/practice
中身を一応見てみると
$ more mcsdistcrr1_aug06.dbs
# Fri 02:53:26 01-Sep-2006
begin mcsdistcrr1_aug06.gmp
xrefmean 876.6067
yrefmean 1027.125
・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・
となっている。
mcsdistcrr1_aug06.gmpが変換式の名前になっている?というのは後で使う。
◎前回までで作ったsky引き済画像に対してdistortion補正を行う
前回までで作ったリストsubsky1013odd,subsky1013even内の全画像にdistortion補正かける。
・まずは出来上がりの受け皿になるリスト作っとく。そろそろ名前が長くなってきたので新しいリストdis1027odd内の各flameの名前は「disMCSA38???.fits」にする。
$ awk '{print "disMCSA"substr($1,16,30)}' subsky1013odd > dis1027odd
$ awk '{print "disMCSA"substr($1,16,30)}' subsky1013even > dis1027even
・iraf上で画像の幾何変換を行うタスクgeotran用いて、distortion補正行う
cl> epar geotran
I R A F
Image Reduction and Analysis Facility
PACKAGE = immatch
TASK = geotran
input = @subsky1013odd Input data //入力ファイル//
output = @dis1027odd Output data //distortion補正し終わったファイル入ったリスト//
database= mcsdistcrr1_aug06.dbs Name of GEOMAP database file //distortion補正変換の入ったファイル//
transfor= mcsdistcrr1_aug06.gmp Names of coordinate transforms in database file //変換式//
(geometr= geometric) Transformation type (linear,geometric)
(xin = INDEF) X origin of input frame in pixels
(yin = INDEF) Y origin of input frame in pixels
(xshift = INDEF) X origin shift in pixels
(yshift = INDEF) Y origin shift in pixels
(xout = INDEF) X origin of output frame in reference units
(yout = INDEF) Y origin of output frame in reference units
(xmag = INDEF) X scale of input picture in pixels per reference
(ymag = INDEF) Y scale of input picture in pixels per reference
(xrotati= INDEF) X axis rotation in degrees
(yrotati= INDEF) Y axis rotation in degrees
(xmin = INDEF) Minimum reference x value of output picture
(xmax = INDEF) Maximum reference x value of output picture
(ymin = INDEF) Minimum reference y value of output picture
(ymax = INDEF) Maximum reference y value of output picture
(xscale = 1.) X scale of output picture in reference units per
(yscale = 1.) Y scale of output picture in reference units per
(ncols = INDEF) Number of columns in the output picture //今回は変えないが変えることもある//
(nlines = INDEF) Number of lines in the output picture //変えると土台となるフォーマットを変えられる//
(xsample= 1.) Coordinate surface sampling interval in x
(ysample= 1.) Coordinate surface sampling interval in y
(interpo= linear) Interpolant
(boundar= constant) Boundary extension (nearest,constant,reflect,wra //余白となる所に何を入れるか//
(constan= -1000000.) Constant boundary extension //今はcountを-1000000にしてしまう//
(fluxcon= yes) Preserve image flux?
(nxblock= 512) X dimension of working block size in pixels
(nyblock= 512) Y dimension of working block size in pixels
(verbose= yes) Print messages about the progress of the task
(mode = ql)
(:go)で実行
distortion補正したのとしてないのを比べてみる。
cl> !ds9 &
cl> reset stdimage=imt4096
cl> display subskyflMCSA00038409.fits 1 →こんなの
cl> display disMCSA38409.fits 2 →こんなの
ほとんど同じようだが、distortion補正によって若干小さくなってる。
・同様に偶数ファイルsubsky1013evenにもdistortion補正かけてやる。
cl> epar geotran
I R A F
Image Reduction and Analysis Facility
PACKAGE = immatch
TASK = geotran
input = @subsky1013even Input data //入力ファイル//
output = @dis1027even Output data //distortion補正し終わったファイル入ったリスト//
database= mcsdistcrr2_aug06.dbs Name of GEOMAP database file //distortion補正変換の入ったファイル//
transfor= mcsdistcrr2_aug06.gmp Names of coordinate transforms in database file //変換式//
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
(:go)で実行
☆其の二 SExtractorを入れる。
・SExtractor・・・画像ファイルに対して天体検出を行うソフト。測光などもこれで行える。
このSExtractorを以下のページからlogin.clと同じディレクトリ(ホームディレクトリ)に持ってくる。
Astromatic.net
ちなみに自分はsextractor-2.5.0.tar.gzをおとした。
あとは説明書User's Manual(英語)に従って頑張ってインストールする。(よく覚えてないが、2.3節だけで済むはず)