观测号为953和461
下载数据的网址:https://cda.harvard.edu/chaser/
在Observation ID输入观测ID953,461
点击Search
Select all
Add Products to Retrieval List
Retrieve Products
~/chandra/test5 » ciao #初始化ciao
(ciao-4.12) --------------------------------------------------------------------
~/chandra/test5 » download_chandra_obsid 953,461 #下载数据
Downloading files for ObsId 11823, total size is 366 Mb.
Type Format Size 0........H.........1 Download Time Average Rate
.
.
.
Total download size for ObsId 11823 = 366 Mb
Total download time for ObsId 11823 = 7 m 19 s
~/chandra » chandra_repro 953,461 outdir="" verbose=5
Running chandra_repro
version: 03 April 2020
进入预处理后的repro目录
别忘了初始化ciao
ciao
punlearn axbary
pset axbary infile=acisf00953_repro_evt2.fits
pset axbary orbitfile=../primary/orbitf069509100N001_eph1.fits
pset axbary outfile=acis_953_bary_evt2.fits
pset axbary ra=6.02430 dec=-72.08090
axbary
dmhedit acisf00953_repro_evt2.fits file= op=add key=ASOLFILE value="pcad_133_bary_asol1.fits"
dmhedit acisf00953_repro_evt2.fits"[cols time]" data rows=1:6
用ds9打开acis_953_bary_evt2.fits文件
ds9 acis_953_bary_evt2.fits -cmap b -scale log &
分别做出如下三个区域,并用ds9打开
ds9 acis_953_bary_evt2.fits -cmap b -scale log -region src1.reg -region src2.reg -region bkg.reg
punlearn dmextract
dmextract infile="acis_953_bary_evt2.fits [ccd_id=3,sky=region(src1.reg)][bin time=::2000]" outfile="src1_sub_lc.fits" bkg="acis_953_bary_evt2.fits[ccd_id=3,sky=region(bg.reg)]" opt="ltc1" clobber=yes verbose=2
punlearn dmextract
dmextract infile="acis_953_bary_evt2.fits[ccd_id=3,sky=region(src2.reg)][bin time=::2000]" outfile="src2_sub_lc.fits" bkg="acis_953_bary_evt2.fits[ccd_id=3,sky=region(bg.reg)]" opt="ltc1" clobber=yes verbose=0
初始化heasoft,用fv打开fv src2_sub_lc.fits
h
fv src2_sub_lc.fits &
写python脚本
vi pl.py
脚本内容如下
```python
from pycrates import read_file
import matplotlib.pylab as plt
tab = read_file("src2_sub_lc_400.fits")
dt = tab.get_column("dt").values
rate = tab.get_column("net_rate").values
erate = tab.get_column("err_rate").values
plt.errorbar(dt, rate, yerr=erate,marker="o",color="red", mfc="black", mec="black", ecolor="grey")
plt.xlabel("$\Delta$ T (sec)")
plt.ylabel("Net Count Rate (counts/sec)")
plt.title("src2_sub_lc_400.fits")
plt.show()
用python运行pl.py
python pl.py
改为200bins
punlearn dmextract
dmextract infile="acis_953_bary_evt2.fits[ccd_id=3,sky=region(src2.reg)][bin time=::200]" outfile="src2_sub_lc_200.fits" bkg="acis_953_bary_evt2.fits[ccd_id=3,sky=region(bg.reg)]" opt="ltc1" clobber=yes verbose=0
Update two files
punlearn axbary
pset axbary infile=pcadf064938693N003_asol1.fits
pset axbary orbitfile=../primary/orbitf064886464N002_eph1.fits
pset axbary outfile=pcad_461_bary_asol1.fits
pset axbary ra=187.2779170 dec=2.0523890
pset axbary clobber=yes
axbary mode=h