//-このページは? // //--副鏡連続波ポインティング測定の解析を行う人のためのページです。 -更新履歴 -- 01-Oct-09 - YT - created. -- 16-Apr-10 - YT - modified for the 2010-Apr runs. -- 14-May-10 - YT - added description on iOPT. -- 19-May-10 - SO - modified some commands for 2010 season -- 20-May-10 - BH - modified some commands for making file list -- 05-Jun-10 - SO, BH - modified -- 07-Jun-10 - YS, BH - modified -- 07-Oct-10 - BH - modified for -- 18-Aug-13 - YT - modified for 2013 session -- 28-Apr-14 - BH - updated ---- -目次 #contents // ----------------------------------------------------------------------- *連続波ポインティング測定のデータ解析 [#w0283a9c] - 解析の流れ ++ ファイル群のコピー ++ 連続波クロススキャンデータの一次解析 - 使用マシン/アカウント -- マシン:''aste-mx2.mtk.nao.ac.jp'' -- アカウント:''astebeam'' - 注意/備考 //--&color(red,yellow){''4.電波軸と光学望遠鏡軸のオフセットの測定析''まで進めてください。(14-May-10 - YT)}; // ----------------------------------------------------------------------- **1. ファイル群のコピー [#ef156e33] (1.1, 1.2まで自動で行うスクリプト astebeam@aste-mx2:~/pointing/observations/make_sbrf_pointing_list.sh もあります) ***1.1. アンテナログファイルをaste-mx2にコピー [#scf33b33] - ''aste10''アカウントでaste-mx2にログイン //+アンテナログファイルを aste-1c → aste-2c → aste-mx2 の順番でコピー。(2013年度版) //+アンテナログファイルを aste-1c → aste-2c → aste-at3i → aste-mx2 の順番でコピー。(2011年度版) //+アンテナログファイルを aste-1c → aste-2c → aste-mx2 の順番でコピー。(2010年度版) // // % ssh aste10@aste-mx2 // % ssh aste10@aste-2c // //--2013年度版 rsync -avz -e ssh asteobs@aste-1c:/log/7/'real20130818*' ~/antlog/ ~~~~~~~~ <- 測定日 // aste10@aste-2c% rsync -avz -e ssh asteobs@aste-1c:/log/7/'real20130818*' ~/antlog/ // aste10@aste-mx2% rsync -avz -e ssh aste10@aste-2c:~/antlog/'real20130818*' ~/antlog/ //-- BAND8QMの場合 aste10--> ast10b8 に変更。(added by R.Miura) // //-2011年度版 //aste-1c → aste-2c →aste-at3i →aste-mt2 → aste-mx2 の順番でコピー。 // aste10@aste-2c% rsync -avz -e ssh asteobs@aste-1c:/log/7/'real20110422*' ~/antlog/ // aste10@aste-at3i% rsync -avz -e ssh aste10@aste-2c:~/antlog/'real20110422*' ~/antlog/ // aste10@aste-mt2% cd ~/antlog // aste10@aste-mt2% sftp aste10@aste-at3i <--rsynが使えなかった。 // sftp> cd antlog // sftp> get real20110422* // aste11@aste-mx2% cd ~/antlog // aste11@aste-mx2% sftp aste10@aste-mt2 // sftp> cd antlog // sftp> get real20110422* ***1.2. 解析に使うファイルリストを作成する [#n62ddb29] - 指示書と観測データファイル(*.LCK)のリストを作成する。 --''astebeam''アカウントでaste-mx2にログインし、下記の作業ディレクトリで指示書名と観測データファイル名(*.LCK)のリストを作成する。 ---ディレクトリ: /home/astebeam/pointing/observations ---リスト名: C31018sat.list (<-- 数字は、西暦の下一桁と、月日。2013年の場合はC3xxxx.list) // //--2013年度版 // astebeam@aste-mx2% source ~/.cshrc.linux # <-- 当面はおまじないと思ってください astebeam@aste-mx2% cd ~/pointing/observations astebeam@aste-mx2% ssh aste10@aste-2c 'grep "Aug[ ]* 18" /log/6/mess | grep START | grep -v Cosmos | grep -v SEND' > tmp.txt ~~~ ~~ <- Month, Day astebeam@aste-mx2% cat tmp.txt | grep sbrf10 | awk '{print $9,$8}' | sed -e "s/aste10.sbrf10.//;s/' 1/.start C/;s/00\.000//" > lck.list //astebeam@aste-mx2% cat tmp.txt | grep sbrf10 | awk '{print $9,$8}' | sed -e "s/aste10.sbrf10.//;s/'[ ]*13/.start C3/;s/00\.000//" > tmp2.txt // //--2011年度版 //2011年4月バージョン aste-2c ->aste-at3i ->aste-mt2 -> aste-wx2 // asteobs@aste-2c% rm tmp.txt <--過去のものを削除 // asteobs@aste-2c% grep "Apr[ ]* 22" /log/6/mess | grep START | grep -v Cosmos | grep -v SEND > tmp.txt // asteobs@aste-at3i% rm tmp.txt <--過去のものを削除 // asteobs@aste-at3i% sftp asteobs@aste-2c // sftp> get tmp.txt // sftp> exit // asteobs@aste-mt2% rm tmp.txt <--過去のものを削除 // asteobs@aste-mt2% sftp asteobs@aste-at3i // sftp> get tmp.txt // sftp> exit // astebeam@aste-mx2 % sftp asteobs@aste-mt2 // sftp> get tmp.txt // sftp> exit // astebeam@aste-mx2 % rm tmp2.txt <--古いものを削除 // astebeam@aste-mx2 % cat tmp.txt | grep sbrf11 | awk '{print $9,$8}' | sed -e "s/aste11.sbrf11.//;s/'[ ]*11/.start C1/;s/00\.000//" > tmp2.txt // astebeam@aste-mx2 % cp tmp2.txt ~/pointing/observations // // // ---3行目のgrepコマンドの引数"Aug[ ]* 18"は、空白を「_」で表現することにすると、「"Aug[_]*_18"」。「[ ]*」は正規表現で空白の0個以上の繰り返しを意味します。"Aug[ ]* 18" の部分で、例えば5月5日のように日にちが一桁の場合、"May[_]*_5"となる。 --- 前月のデータを解析する場合、前月のログ (aste-2c:/log/6/mess) は、ZIP圧縮されたうえ名前を変更されて保存される (7月のデータは mess.130801.Z 等になる)。たとえば、7月31日のログを読みだすには、下記のようにしてZIPファイルを読みだせばOK。 ssh aste10@aste-2c 'zcat /log/6/mess.130801.Z | grep "Jul[ ]* 31" | grep START | grep -v Cosmos | grep -v SEND' > tmp.txt // // - アンテナログファイルのリストを作成する。 // astebeam@aste-mx2[~/pointing/observations]: ls -l /home/aste10/antlog/real20130818* | grep -v gz$ | awk '{print $9}' | sed s#/home/aste10/antlog/## > antlog.list ~~~~~~~~ <- 測定日 //--2013年度版 //-2011年度版 // astebeam@aste-mx2[~]: cd ~/pointing/observations // astebeam@aste-mx2[~]: rm tmp3.txt <--古いものを削除 // astebeam@aste-mx2[~/pointing/observations]: ls -l /home/aste11/antlog/real20110422* | grep -v gz$ | awk '{print $9}' | sed s#/home/aste11/antlog/## > tmp3.txt // *** 1.3. lck.listとantlog.listを整形して「指示書名」「lock-inファイル名」「アンテナログファイル名」「dAZ, dEL」を列挙したリスト C30818.list を作成。 [#of1273cc] --行数を調べるにはwcコマンドが便利 // wc tmp2.txt // wc tmp3.txt wc lck.list wc antlog.list -- 列を並べるにはpasteコマンドが便利。 // paste tmp2.txt tmp3.txt > C30818.list paste lck.list antlog.list > C30818.list // -- or automatic script by KT may be useful mergeList.py lck.list antlog.list > C30818.list -- ''【重要】リストの書き方'' --- 同時に行っている光ポインティングの指示書はすっ飛ばしてください。 --- LCK と real の時刻が対応していることを確認する。 --- LCKファイルの拡張子 (.LCK) は不要です。 --- 測定の最初に行った jpx5cc3.start を用いたポインティングについては、記載しないでください。 --- 列の順序は下記の通りにして下さい。列の区切りはスペース・タブ、両方可能。 # 指示書名 LCKファイル名 アンテナログファイル名 dAZ dEL コメント // jpx5cc3.start C909040713 real20090904071146 +0.0 +0.0 # for determining the initial (dAZ,dEL) ijpx5c3.start C010150719 real20101015071759 -7.0 +3.0 ijpx5c3.start C010150811 real20101015081026 -7.0 +3.0 ijpx5c3.start C010150843 real20101015084232 -7.0 +18. # EL<10 ---最後のdAz, dELはエディタを使って自分で入れる必要あり。 //---上記やり方だと、*.LCKの拡張しが残るので、手動で、削除する必要あり。 ***ファイルリスト作成時のtips [#oa0a3d3b] - rectangular cut & paste on emacs --ctrl-space で矩形の開始位置(左上角)をマーク --ctrl-{ > で最終行に行きカーソルで矩形の右下角に移動 --ctrl-x r k -> cut --ctrl-x r y -> paste - rectangular cut & paste on mi (for Mac users) --Macユーザはエディタ mi (http://mimikaki.net/) をつかっても便利。 --[shift]+[command]+R で矩形選択モードに入る --マウスでテキスト中の矩形領域を選択し、[command]+C でコピー --[shift]+[command]+V で矩形貼付け - Excelを用いる --[データ]→[外部データの取り込み]を用いるなどして、「指示書・LCK」と「アンテナログ」の時刻を照らし合わせつつ、ひとつのファイルにする。 --テキストファイル(空白区切り・タブ区切り両方可能)で書き出す。 --ただし、書き出したファイルの改行コードがUNIXのもの(LF)になっていることを確認する。 - command "paste" を用いる -- $paste file1 file2 > C01015jup.list // ----------------------------------------------------------------------- ** 2. iOPTテーブルの転送 [#wa763860] - iOPT の結果が書き込まれたテーブルの名前を調べる。 //asteobs@aste-mx2 → asteobs@aste-2c → astepon@aste-c1c (pw: kollama!) の順番でログイン。 // astepon@aste-c1c % cd ~/optpon/ astepon@aste-c1c % ls 20101015* 201010150123.tab # ← ここでは、このファイルを例にとります。 // //+ aste-2cにログイン // astebeam@aste-mx2 % ssh aste-2c -l asteobs // asteobs@aste-2c % cd subref/iopttab // - 測定時に起動していたiOPTが吐いた巨大なテーブル201010150123.tabに含まれる必要な情報(ここでは172-24Dという恒星)をreduce_iopttab で抜き出して、201010150123_red.tabという名前で保存。 astebeam@aste-mx2 % cd ~/pointing/observations astebeam@aste-mx2 % ssh astepon@aste-c1c '~/optpon/reduce_iopttab ~/optpon/201010150123.tab 134-34B' > 201010150123_red.tab # USAGE: reduce_iopttab (iOPTが出力したテーブル) (恒星の名前) // asteobs@aste-2c % ssh astepon@aste-c1c '~/optpon/reduce_iopttab ~/optpon/201010150123.tab 134-34B' > 201010150123_red.tab // asteobs@aste-2c % ssh astepon@aste-c1c '~/optpon/reduce_iopttab ~/optpon/201010150123.tab 172-24D' > 201010150123_red.tab // 三鷹に転送 (aste-2c → aste-mx2) // astebeam@aste-mx2 % scp asteobs@aste-2c:~/subref/iopttab/201010150123_red.tab ~/pointing/observations //**2. [OLD] iOPTテーブルの転送 [#wa763860] //+ iOPT の結果が書き込まれたテーブルの名前を調べる。asteobs@aste-mx2 → asteobs@aste-2cの順番でログイン。 // //(aste-2cには置いていなかったのでaste-1sからコピーしました 2010/06/05 sonodera) // asteobs@aste-2c % cd ~/optpon/ // asteobs@aste-2c % ls 20090905* // 200909040123.tab # ← ここでは、このファイルを例にとります。 // //+ iOPTの結果を抽出 //-- 測定時に起動していたiOPTが吐いた巨大なテーブル200909040123.tabに含まれる必要な情報//(ここでは 214-16C という恒星)をreduce_iopttab で抜き出して、200909040123_red.tabという名前で保存。astebeam@aste-mx2で実行する。 // astebeam@aste-mx2 % ssh asteobs@aste-2c '/home/astepon/optpon/reduce_iopttab ///home/astepon/optpon/200909040123.tab 214-16C' > ///home/astebeam/pointing/observations/200909040123_red.tab // # USAGE: reduce_iopttab (iOPTが出力したテーブル) (恒星の名前) // ----------------------------------------------------------------------- **3. 連続波クロススキャンデータの一次解析 [#a4150e2d] + ログイン。(astebeam@aste-mx2) + 一次解析。(update on 07-Oct-10) % source ~/.cshrc.linux % cd ~/pointing/observations/ % point_redux -l C01015jup.list // % point_redux C909040719 real20090904071759 -7.0 +3.0 // C01015jup.listに記述されている測定時間ごとの .dazdel ファイル (e.g., C010150447.dazdel)と、それらをまとめたファイル(C01015jup.dazdel)が作られる。 // -- point_reduxの使用方法は(とりあえず)下記を参照されたい。~/linux/bin/point_reduxのヘッダに記載。 -- 【推奨】上述のように、[-l] オプションによって、前述の手順で作成したファイルリストを指定してください。 # NAME: # point_redux # # PURPOSE: # reduce a data set obtained for pointing measurements using # planets. # # INPUT: # lockin - name of a lock-in data file (omit the extension .LCK). # antlog - name of an antenna log file # dAZ - specifies azumuth offset in arcsec. The value should be # recorded by an observer in pointing measurements. # dEL - same as dAZ but for EL. # # OPTIONAL INPUT: # -v - can specify the num. of scans to average. The default # is 1 (does not average). # -o - can specify an obstable name actually used for the data # aquisition. The default is set to DEF_OBST. See SETTING # VARIABLES. (The current default DEF_OBST = jpx5cc3.start) # -l - may specify a text file that lists input parameters (lockin, # antlog, dAZ, dEL). # # USAGE FOR EXAMPLE: # point_redux -v 2 -o jpx5cc.start C711230429 real20071123042815 16. 34. # point_redux -l C90905jup.list # (where C90905jup.list includes (col.1) obstable, (col.2) # lockin, (col.3) antlog, (col.4) dAZ, (col.5) dEL.) // //+電波軸のAz, EL依存性解析を行う場合のために、出力された測定時間ごとの .dazdel ファイルをまとめて一つのファイルにしておく。 // cat C006040*.dazdel | awk '$1==2010 {print $0}' > C00604radio.dazdel //手順4.「電波軸と光学望遠鏡軸のオフセットの測定」のiopt_trackを行うと、電波軸と光学望遠鏡軸のオフセットが .dazdel に上書きされる。そのため、電波軸のみの結果を調べるためには、ここで別のファイルに保存しておく必要がある。 // // ----------------------------------------------------------------------- ** 4. 電波軸と光学望遠鏡軸のオフセットの測定 [#yb66a7b1] + オフセットを測定。 astebeam@aste-mx2 % cd ~/pointing/observations astebeam@aste-mx2 % iopt_track C01015jup.list 201010150123_red.tab iopt_trackは、主鏡成分を引き去った副鏡指向誤差成分をファイル C01015jup.r2o.dazdel に書き出す(r2oはradio-to-opticalの意味)。 // + 画像 (PNG, PS) が生成されているので、これをwikiに貼付ける。 astebeam@aste-mx2 % ls *.png C01015jup.r2o.png #ref(iopt_track.png); --iopt_trackの結果。横軸が時刻、縦軸がポインティング量(a: dAZ, b dEL)である。 ---青&color(blue,white){▲};は、iOPTのポインティングを示している。 ---橙色&color(orange,white){●};は、point_reduxの結果であり、主鏡ポインティング誤差と副鏡ポインティング誤差の両方が重ね合わさっている状態である。 ---副鏡指向誤差のみを取り出すために、主鏡指向誤差成分を引き去る必要がある。そこで、各iOPTデータ点間のスプライン補完を主鏡指向誤差成分として、point_reduxの結果から引き去る。その結果が赤色&color(red,white){●}; である。 -- iopt_trackの使用方法は(とりあえず)下記を参照されたい。~/linux/bin/iopt_trackのヘッダに記載。 # NAME: # iopt_track # # PURPOSE: # models boresight offsets from the basic pointing model obtained # by optical measurements, and estimates relative offsets between # main-ref boresight and sub-ref boresight. # # INPUT: # listfile - a file listing LCK files, antenna log files, etc.. # The list file should be identical that used in # point_redux. # iopttab - a file including iOPT results. The results are obtained # with reduce_iopttab. # # OUTPUT: # dazdel file - includes the time sequence of boresights dAZ and dEL, # which represent the offset of radio- and optical-axis # (i.e., axis of the optical telescope for all-sky # pointing). # plot file - draws results on PostScript and PNG files. # # USAGE: # iopt_track <listfile> <iopttab> // ----------------------------------------------------------------------- **5. ポイティングのAz, EL依存性 [#qa966fe6] //- iopt_trackで出力された測定時間ごとの .dazdel ファイルをまとめて一つにしする。 // cat C006040*.dazdel | awk '$1==2010 {print $0}' > C00604jup.dazdel - point_elfitを実行 -- 使用したいデータ名(拡張子不要)を引数にして、 -- "-i" オプションを付けると、電波軸と光軸のオフセットデータ(C01015.r2o.dazdel)をプロットする -- "-a" オプションを付けると、電波軸のみのオフセットデータをプロットする % point_elfit -i C01015jup 複数ファイルも可 % point_elfit -i 101003/C01013jup 101014/C01014jup C01015jup (※) PS画像を書き出すには、~/pointing/observations/ ディレクトリに必要ファイルをコピーするなどして作業する必要がある。 --- point_elfitの使用方法は、 ~/linux/bin/point_elfit のヘッダに記載。 # NAME: # point_elfit # # PURPOSE: # fit AZ(EL) offset values to a linear combination of sin(EL), cos(EL) # and constant. # # INPUT: # datafile - specifies the name of file(s) created by point_redux. # No extension (e.g. .dazdel) is required. If you set -l # option with a file name liting data files, you do not # need to specify <datafile>. # # OPTIONAL INPUT: # -h - shows help. # -a - shows result as a function of azumuthal angles. # -c - fits the data to a constant value. This option is useful # when you determine an pointing offset in the AZ direction. # -l - specfies a file listing input datafiles. # -z - draws a plot in terms of AZ for the horizontal axis. # # USAGE: # point_elfit [-h] [-ac] [-l <list>] <datafile> [<datafile2> ...] --- 使用例(推奨) d(EL) vs. EL plot: % point_elfit -i C01015jup d(AZ) vs. EL plot: % point_elfit -iac C01015jup d(EL) vs. AZ plot: % point_elfit -iz C01015jup d(AZ) vs. AZ plot: % point_elfit -izac C01015jup // d(EL) vs. EL plot: % point_elfit C005190018 C005190043 C005190228 C005190434 C005190605 C005190657 // d(AZ) vs. EL plot: % point_elfit -ac C005190018 C005190043 C005190228 C005190434 C005190605 C005190657 // d(EL) vs. AZ plot: % point_elfit -z C005190018 C005190043 C005190228 C005190434 C005190605 C005190657 // d(AZ) vs. AZ plot: % point_elfit -zac C005190018 C005190043 C005190228 C005190434 C005190605 C005190657 --- 電波軸のみのAz, EL依存性を調べたい場合は -i オプションなし //先に保存しておいた電波軸のデータの入ったファイルを読み込む % point_elfit C01015jup // -- 解析結果をログにアップ //--- 上記sbrf_xyfitの結果(working directoryにPNGファイルとして生成されている)を、データ取得日と同じ測定ログのページに書き込んでください。[[Observing Log/2009-08-01]]のページを参考にしてください。 --astebeam@aste-mx2% cd ~/pointing/observations/ 下に測定日のディレクトリを作成し、解析に使用したデータ、出力ファイルを移動させておく。 // ----------------------------------------------------------------------- **6. 器差ファイルの更新と再測定による確認 [#ed65ed6c] -&color(red,white){''器差ファイルの更新を行う権限は、各立ち上げ時の責任者1名が持ちます。''}; -&color(red,white){''権限のない方は、責任者の同意なしに器差ファイルを更新してはいけません。''}; - 器差ファイルの更新手順は[[Observation and Analysis/SubRef/PageForChief]]に記載。 //以上。 //================================================