记录钱德拉望远镜天文软件ciao的一些简单使用,本文能谱拟合基于sherpa

前言:
为了记录正在学习使用钱德拉望远镜的天文软件包ciao,写下这篇博客.
如有错误之处及建议,欢迎到评论区讨论.
heasoft的安装请参看:https://blog.csdn.net/qq_46753404/article/details/117304662?utm_source=app&app_version=4.7.1&code=app_1562916241&uLinkId=usr1mkqgl919blen


一.下载样本数据

下载有专属的命令,本文以下载观测号13858为例.当然,你也可以官网先下载样本数据,之后解压就行.

1.下载命令:

download_chandra_obsid 13858 

注意:一定要初始化ciao,否则只会显示以下内容:

download_chandra_obsid: command not found

下载完以后会在你的当前目录下生成一个名为13858的目录.

2.下载数据后,首先进行预处理.这是每次处理数据前一定要做的事情!!!以保证软件包使用的是望远镜最新的相应文件.

预处理命令:

chandra_repro 13858 outdir=""

效果显示:

Running chandra_repro
version: 03 April 2020


Processing input directory '/home/wang/Downloads/13858'

Resetting afterglow status bits in evt1.fits file...

Running the destreak tool on the evt1.fits file...

Running acis_build_badpix and acis_find_afterglow to create a new bad pixel file...

Running acis_process_events to reprocess the evt1.fits file...
Output from acis_process_events:
# acis_process_events (CIAO 4.12): The following error occurred 2 times:
	dsAPEPULSEHEIGHTERR -- WARNING: pulse height is less than split threshold when performing serial CTI adjustment.
Filtering the evt1.fits file by grade and status and time...
Applying the good time intervals from the flt1.fits file...
The new evt2.fits file is: /home/wang/Downloads/13858/repro/acisf13858_repro_evt2.fits

Updating the event file header with chandra_repro HISTORY record
Creating FOV file...
Setting observation-specific bad pixel file in local ardlib.par.

Cleaning up intermediate files

WARNING: Observation-specific bad pixel file set for session use:
         /home/wang/Downloads/13858/repro/acisf13858_repro_bpix1.fits
         Run 'punlearn ardlib' when analysis of this dataset completed.

The data have been reprocessed.
Start your analysis with the new products in
/home/wang/Downloads/13858/repro

之后就会在你之前下载的观测号文件中生成一个名为repro的目录


二.建立源区域和背景区域

可以先查看repro目录下都有哪些文件.
1.切换目录到repro:

cd 13858/repro

2.使用ls命令查看.

ls

效果显示如下:

acisf13858_000N001_bpix1.fits  acisf13858_repro_bpix1.fits
acisf13858_000N001_fov1.fits   acisf13858_repro_evt2.fits
acisf13858_000N001_msk1.fits   acisf13858_repro_flt2.fits
acisf13858_000N001_mtl1.fits   acisf13858_repro_fov1.fits
acisf13858_000N001_stat1.fits  acisf456520720N001_pbk0.fits
acisf13858_asol1.lis           pcadf456520092N001_asol1.fits

我们需要定义两个区域,一个用于源,另一个用于背景.要做到这一点,首先用ds9显示图像:

ds9 acisf13858_repro_evt2.fits

效果如下:
在这里插入图片描述3.换颜色
点击color, 选b
在这里插入图片描述

4.放大
点击zoom,再选择zoom 4
在这里插入图片描述
5.选源(src_region).
点击edit,后选择region,然后在源附近长按左键拖动,就会出现圆圈.这是src图效果
在这里插入图片描述6.选背景区域(bkg_region)
远离亮点,选一个较大的区域作为背景.步骤同第5
在这里插入图片描述

三、能谱拟合.

1.仍然在ciao初始化的环境下.依次输入以下命令.

punlearn specextract
pset specextract infile="acisf13858_repro_evt2.fits[sky=region(src.reg)]"
pset specextract bkgfile="acisf13858_repro_evt2.fits[sky=region(bkg.reg)]"
pset specextract outroot=13858
pset specextract clobber=yes
pset specextract grouptype=NUM_CTS
pset specextract binspec=30
pset specextract weight=no
specextract

2.进入sherpa.

sherpa

进入界面如下:
在这里插入图片描述依次输入以下内容:

load_pha('13858_grp.pi')
ignore(':0.8,8.0:')
subtract()
plot_data()
plt.savefig('notice.jpg')
set_source(xsphabs.abs1*powlaw1d.p1)
abs1.nH = 0.07
freeze(abs1.nH)
guess(p1)
fit()
plot_fit_delchi()
plt.savefig('fit.jpg')

我的拟合结果如下:在这里插入图片描述


总结

一、下载需要的数据.
二、在ds9选区域.
三、能谱拟合.

  • 5
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

X射线双星

希望您继续支持我

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值