1

これらの座標を使用して結果の FITS イメージを操作するために、FITS ファイルの座標系を元の赤道座標系から銀河座標 (度単位) に変更しようとしています。

このためには、各ピクセルの赤道位置を含む配列を抽出して、それらを目的の銀河座標に変換する必要があります。これは私の知識が限られている場所であり、その配列を抽出する方法を理解できないようです。

最終的に、次の方法で緯度に基づいて画像をスライスしたいと思います。

import pyfits

f = pyfits.open("im1.fits")
h, data = f[0].header, f[0].data

#Here I would include the transformation from Equatorial to Galactic of
the position array doing something like:
coord = SkyCoord(ra, dec, frame=Galactic, unit='deg')

#This would do the slicing
from astropy.nddata import Cutout2D
from astropy import units as u
from astropy import coordinates

#Given a longitude and latitude
size = [mylon, mylat]
cut = Cutout2D(f, center, size, wcs=wcs)
4

1 に答える 1