oersted satellite magh data visualization routines: go-oersted


last updated on February 24th, 2003

1. startup the routines

まず、goを起動します。そののちに、oersted_routines.proというcomponentを以下のようにしてcompileしてあげてください。必要なIDL routinesが順にcompileされます。

Go> .run oersted_routines

必要なprocedureのcompileができたら、oersted visualization routinesをstartさせます。この手続きによって、dataの取り込みに必要な配列などが用意され、visualizationの準備がすべて完了します。oersted_routinesのstartupは以下のcommandで行います。

start_oersted

Go> start_oersted

promptが以下のように変わったら、起動成功です。

Go-oersted>


2. data description

Oersted衛星のmagh(高時間分解能磁場観測)dataは、/radar07/Oersted/以下に置かれています。以下の3つの種類のfileがあります。

このgo-oerstedでは、Converted fileとOverpass fileを用います。

Converted dataは、20分ごとに1つのfileになっています。その理由は、maghのdataが25Hzという高いsampling rateであるため、一日分のfileでは、dataの読み出しに時間がかかるためです。各々のfileは以下のような名前になっています。

     19991201_1900_cnv.dat.gz: 1999年12月1日の1900UTから20分間のdata

ただし、formatがbinaryであるため、endianの違う計算機で読み出しをする場合は、endian反転をしてやらなければなりません。作成したのは、SUN sparcです。

Overpass dataは、一日分の衛星の位置を一秒ごとに記録したものです。formatはasciiなので、目でfileの中身を確認できますし、他の計算機でも読み出し可能です。


3. load the data

dataの読み出しは、以下のcommandを用います。

file_oersted, 'date', hhmm, /append

dataは20分ごとのfileに分けられているので、その開始時間をhhmmの4桁のformatで指定します。例えば、2000年1月22日の6時00分から20分間のdataを読み込むには、以下のようにします。

Go-oersted> file_oersted, '20000122', 0600
Total 30518 samples loaded!

続けてつぎの20分のdataも連続的に取り込みたいときは、以下のようにappend keywordをつけます。

Go-oersted> file_oersted, '20000122', 0620, /append
Total 59939 samples loaded!

これで、6時00分から40分間のdataがmemoryに取り込まれました。


4. plot the data

まず、plotする時間帯を以下のcommandで指定します

time_oersted, shh, smm, sss, ehh, emm, ess

今、0600-0640UTまでのdataを読み込んでいるとして、そのうちの6時17分00秒から6時26分00秒までのdataを時系列でplotするには、以下のようにします。

Go-oersted> time_oersted, 06, 17, 00, 06, 26, 00

次に、plotするparameterの選択を以下のcommandで行います。

set_param_oersted, param_id, /help

それぞれのparameterはparam_idで指定されます。どのparameterがどのidに対応しているかは、
help keywordを指定することで表示することができます。

Go-oersted> set_param_oersted, /help

In geomag coords. total radial : 0
total theta : 1
total phi : 2
residual radial : 3
residual theta : 4
residual  phi : 5
In gondla coords. total x : 6
total y : 7
total z : 8
residual x : 9
residual y : 10
residual z : 11

この中からplotしたいparameterを選択します。例えば、磁気座標(geomag coords.)の変動分(residual)のradial成分を指定したい時には、

Go-oersted> set_param_oersted, 3

としてやります。最後に、plotする領域の設定を行います。これには、二つの方法があります。一つ目は、以下の位置割り振りcommandを使う方法です。

define_panel, columns, rows, column, row, /bar

このcommandは、1つのoutput deviceを横方向にcolumns、縦方向にrowsに分割し、そのcolumn番目とrow番目のpanelにplotを出力する領域を用意するという機能を持ちます。注意すべきは、columnおよびrowは0から始まるということです。例えば、deviceを上下二つに分割して、上側にplot領域を用意するには、以下のようにします。

Go-oersted> define_panel, 1,2, 0, 0, /bar

ここでbar keywordはpanelの右側にcolour bar用のspaceを用意するという意味です。radarのdataと組み合わせて表示する際に用いることがあります。このcommandでpanelの出力領域を指定する時に、縦方向にpanelの間隔をあけずに表示したい場合は、以下のオマジナイを用います。

set_format, /sardines

もとのように、間隔を空けるような設定にもどすには、以下を用います。

set_format, /guppies

二つ目の領域指定方法は、device座標で位置決めを行うcommandを用いる方法です。

define_position, x1, y1, x2, y2

横方向の両端、x1, x2と縦方向の両端y1, y2でpanelがでてくる領域の指定をします。例えば以下のように使います。

Go-oersted> define_position, 0.2, 0.3, 0.8, 0.7

これで描画の準備が完了しました。あとは、以下のcommandでplotするだけです。

plot_oersted, yrange=[y1,y2], /no_x, time_line=[hhmmss]

例えば以下の用に使います。

Go-oersted> plot_oersted, yrange=[-500, 500]

縦軸の範囲は、auto scalingですが、陽に指定したければ、yrange keywordを用います。また、時間方向に縦線を入れたいときは、time_line keywordを用います。例えば、6時20分00秒のところに線を入れたいと思えば、

Go-oersted> plot_oersted, yrange=[-500, 500], time_line=[062000]

また、x軸の情報(UT, MLT, MLAT, ALT)などを描きたくない場合は、no_x keywordを指定します。そのkeywordは縦方向にpanelをつなげて行く際に便利です(set_format, /sardinesを実行した場合など)。


5. example

ここで、まとめとして、磁気座標の変動成分の3成分を縦に3つ並べて出力することをやってみます。

dataを読み込んでplotする時間幅を指定

Go-oersted> file, '20000122', 0600
Go-oersted> file, '20000122', 0620, /append
Go-oersted> time_oersted, 06, 17, 00, 06, 23, 00

portraitでpostscript fileを開く

Go-oersted> ps_start, 'oersted_example.ps'
Go-oersted> ps_portrait

文字の大きさを0.7にする(defaultの1.0では大きすぎるため)

Go-oersted> set_char_size, 0.7

geomag redisual radial成分のplot

Go-oersted> set_format, /sardines
Go-oersted> define_panel, 1, 4, 0, 0
Go-oersted> set_param_oersted, 3
Go-oersted> plot_oersted, /no_x

geomag redisual theta成分のplot

Go-oersted> define_panel, 1, 4, 0, 1
Go-oersted> set_param_oersted, 4
Go-oersted> plot_oersted, /no_x

geomag redisual phi成分のplot

Go-oersted> define_panel, 1, 4, 0, 2
Go-oersted> set_param_oersted, 5
Go-oersted> plot_oersted

psを閉じて、previewする

Go-oersted> ps_close
Go-oersted> ps_preview


以上で、go-oerstedの簡単な解説を終わります。

                      Just type start_oersted, it's easier than falling off a bicycle ...


switch to gwave.ice.uec.ac.jp/~hosokawa/codes/codes.html