LoginSignup
2
4

More than 5 years have passed since last update.

CASA4.5でNRO/FORESTデータを解析する

Last updated at Posted at 2016-03-13

スクリプト例

reduction.casa.py
#
# CASA Version 4.5.2 (r36115)
#

nrofile = 'cyg1xa.Cyg1.20160113175731.16.Y'

# 下準備
# ======

# scan table 形式で NRO 生データを読み込む
# ---------------------------------------
st = sd.scantable(nrofile, average=False, freqref='VREF')

# ASAP 形式で保存する
# -------------------
st.save(nrofile + '.asap')


# リダクション
# ===========

# ベースラインを引く
# -----------------
kw1 = {
    'infile': nrofile + '.asap',
    'outfile': nrofile + '.A01.blfit.asap',
    'spw': '0',    # '0' -> Array01, '1' -> Array02, ...
    'maskmode': 'auto',
    'blfunc': 'poly',
    'order': 1,
}
sdbaseline(**kw1)

# スケーリングを補正する
# --------------------
kw2 = {
    'infile': kw1['outfile'],
    'outfile': nrofile + '.A01.scale.asap',
    'factor':  1.0,  # 実際は適切なファクターを使います
}
sdscale(**kw2)

# MS2 形式で保存する
# -----------------
kw3 = {
    'infile': kw2['outfile'],
    'outfile': nrofile + '.A01.scale.ms',
    'outform': 'MS2',
}
sdsave(**kw3)

# 実際は、ベースラインを引く、スケーリングを補正する、MS2 形式で保存する、
# 一連の作業を、全てのアレイ、全ての観測に対して実行します。

# イメージングする
# ---------------
use_data_list = [
    nrofile + '.A01.scale.ms',
    nrofile + '.A05.scale.ms',
    nrofile + '.A09.scale.ms',
    nrofile + '.A13.scale.ms',
]

kw4 = {
    'infiles': use_data_list,
    'outfile': 'cyg1xa.Cyg1.20160113175731.16.Y.12CO.ms',
    'spw': '0,4,8,12',
    'gridfunction': 'GAUSS',
    'cell': ['8.5arcsec', '8.5arcsec'],
    'mode': 'velocity',
    'nchan': 251,
    'start': '-150km/s',
    'width': '1km/s',
}
sdimaging(**kw4)

# FITS 形式で書き出す
# ------------------
kw5 = {
    'imagename': kw4['outfile'],
    'fitsimage': 'cyg1xa.Cyg1.20160113175731.16.Y.12CO.fits',
    'velocity': True,
    'dropdeg': True,
}
exportfits(**kw5)

関数リファレンス

引数の詳細などは下記から。

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4