![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
天文数据处理
唐小拽
天体物理
展开
-
python3基于spectral_cube.py抽取ALMA数据的分子谱线供XCLASS使用
from astropy.io import fitsfrom spectral_cube import SpectralCube as specimport numpy as npimport matplotlib.pyplot as pltimport osimport sysfrom astropy.coordinates import SkyCoordfrom astropy.wcs import WCSfrom astropy.table import Tableimport a原创 2021-01-13 15:21:42 · 482 阅读 · 1 评论 -
ALMA simulation脚本
#define working direction path:path = '/home/mengyao/test/ALMA_simulation/W51n/uv-range_sim/'#define project name: project_name='gauss_point'#define parameters for tclean:imsize=[1024,1024]cell='0.005arcsec'threshold='0.15mJy'uvrange='> 910klamb原创 2020-11-18 12:49:33 · 284 阅读 · 0 评论 -
CASA制作光谱的moments图
#please set file name of fits image.fitsfile='test.fits'#please set the rest frequency of molecule which you are interested (in unit of MHz):restfreq=221199#please give the name of moleculemolname='CH3CN_v8=1'#please set the channel range which inclu原创 2020-07-17 02:35:16 · 395 阅读 · 0 评论 -
matplotlib多个图组成子图的画法
import numpy as npimport matplotlib.pyplot as pltMSDC_real = np.loadtxt('MSDC_real.txt') #import dataMSDC_random = np.loadtxt('random_MSDC_results.txt') #import data#set font propertyfont1 = {'...原创 2020-01-31 03:12:40 · 309 阅读 · 0 评论 -
使用matplotlib画叠加的光谱图
import matplotlib.pyplot as pltimport numpy as npfile1 = ['G168-H1_c-C3H_1.47677E+04.txt', 'G168-H1_c-C3H_1.489305E+04.txt', 'G168-H1_H2CO_1.448848E+04.txt', 'G168-H1_HC5N5-4_1.3313334E+0...原创 2019-03-27 18:35:45 · 2751 阅读 · 0 评论 -
在CASA中将JY/BEAM转化为K
在CASA中将JY/BEAM转化为K代码如下代码如下// An highlighted blockinputname='IRAS16293_spw0_image' #input name of fits file without ".fits" imagename=inputname + '.fits'outfile=inputname + '_K'imhead(imagename=i...原创 2019-01-10 20:50:14 · 137 阅读 · 0 评论 -
计算分子柱密度
#计算PMO观测得到分子的柱密度#to calculate column density of molecules###dust temperature of G168-H1 is 11.9(0.3)#dust temperature of G168-H2 is 13.2(1.0)import numpy as npTd_1 = 11.9Td_2 = 13.2N_H2_G168_H...原创 2019-01-15 09:04:06 · 772 阅读 · 1 评论