sh 处理TGCat Chandra光谱的目录以产生来自MEG -1和MEG +1的通量光谱

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 处理TGCat Chandra光谱的目录以产生来自MEG -1和MEG +1的通量光谱相关的知识,希望对你有一定的参考价值。

# This is based on http://cxc.harvard.edu/sherpa/faq/no_model.html

# Load MEG -1
load_data('meg_-1.pha.gz')
# Assume model which is just a constant=1
set_source(polynom1d.truespec)
truespec=1.
# Now get the deconvolved plot
energy=get_ratio_plot().x # keV
photon=get_ratio_plot().y  # ph/s/cm2/keV
photonerr=get_ratio_plot().yerr
# Save it.
save_arrays("Flux_meg-1.dat",[energy,photon,photonerr],["keV","FLUX","FLUXerr"],ascii=True)

# Clear variables so we can do MEG +1
clear()

# Same for MEG+1
load_data('meg_1.pha.gz')
set_source(polynom1d.truespec)
truespec=1.
energy=get_ratio_plot().x # keV
photon=get_ratio_plot().y  # ph/s/cm2/keV
photonerr=get_ratio_plot().yerr
save_arrays("Flux_meg+1.dat",[energy,photon,photonerr],["keV","FLUX","FLUXerr"],ascii=True)
#!/bin/bash

# Load all the chandra data processing tools.
#ciao
# Note this script must already have run ciao

# For each subdirectory, run the sherpa script to extract flux spectra.
for onedir in $(ls -d */); do
 cd $onedir
 echo $onedir
 sherpa -b ../SherpaExtractMEGFlux.py
 cd ..
done

以上是关于sh 处理TGCat Chandra光谱的目录以产生来自MEG -1和MEG +1的通量光谱的主要内容,如果未能解决你的问题,请参考以下文章

歙州黟县

光谱的处理算法

VS2013+OPENCV+GDAL处理多光谱数据

基于PCA和PLS的近红外光谱建模

图形化界面-光谱处理系统1

#4302. 魔法咒语