1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

casaのimmomentsの使い方

Last updated at Posted at 2020-02-08

#immoments

  • cubeデータを様々な方法で軸を減らすことができるcasaのtaskの一つ
    • 例えば、cubeを積分強度や速度場、速度分散などにできる
  • 公式ドキュメントはこちら

##指定できるパラメーター

imagename           =         ''        #  Name of the input image
moments             =        [0]        #  List of moments you would like to compute
axis                = 'spectral'        #  The momement axis: ra, dec, lat, long, spectral, or stokes
region              =         ''        #  Region selection. Default is to use the full image.
box                 =         ''        #  Rectangular region(s) to select in direction plane. Default is to use the entire direction plane.
chans               =         ''        #  Channels to use. Default is to use all channels.
stokes              =         ''        #  Stokes planes to use. Default is to use all Stokes planes.
mask                =         ''        #  Mask to use. Default is none.
includepix          =         -1        #  Range of pixel values to include
excludepix          =         -1        #  Range of pixel values to exclude
outfile             =         ''        #  Output image file name (or root for multiple moments)

とりあえずは、

  • imagename
  • moments
  • outfile

を指定すればよい。

momentsは以下を参考に値を指定する。

moments=0   - 積分強度  
moments=1   - 速度場
moments=2   - 速度分散  
moments=3   - 強度の中央値  
moments=4   - coordinateの中央値
moments=5   - スペクトルの平均の標準偏差  
moments=6   - root mean square of the spectrum  
moments=7   - absolute mean deviation of the spectrum  
moments=8   - スペクトルの最大値  
moments=9   - coordinate of the maximum value of the spectrum  
moments=10  - スペクトルの最小値  
moments=11  - coordinate of the minimum value of the spectrum

##参考スクリプト

  • 積分強度を作成し、imageを出力
immoments.py
import os
import pyfits

fname = "oooo.image" or "xxxxx.fits"

fn = os.path.splitext(fname)[0]
outfile = fn+"_mom0"
immoments(imagename = fname,
          moments = [0],
          outfile = outfile+".image")

exportfits(imagename = outfile+".image",
           fitsimage = outfile+".fits",
           dropdeg = True,
           overwrite = True,
           history = False)


その他の関数はこちら

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?