The chspec package includes multiple models for calculating photon spectrum for different temperature distributions that can be loaded in XSPEC spectral fitting package. At present it includes two models:
chisoth
: Emission from isothermal plasmachgausdem
: Emission from Gaussian distribution of Differential Emission Measure
These models calculate the synthetic photon spectrum from a spectral library, generated by using the atomic database package CHIANTI. The pre-calculated spectra over grid of temperatures is stored in a FITS file.
The isothermal model takes logarithm of the temperature in K (LogT), abundances (Ax) of the elements with Z=2 to Z=30, and the volume emission measure as input parameters. The volume emission measure is implemented as a normalization factor, which is in the units of 1046 cm-3. For the gaussian DEM model, peak temperature and width of Gaussian (in log) are input parameters in addition to the abundances. Normalization gives peak emission measure in units of 1046 cm-3. The abundances Ax are in logarithmic units such that Ax = 12+log10(Nx) where Nx is abundance of element X relative to Hydrogen. The default abundances are from 'sun_coronal_1992_feldman_ext.abund' file in CHIANTI database.
Details of chisoth model and the tabulated spectra used in the model is given in the appendix of Mondal, Biswajit et al. 2021, ApJ.
HEASOFT package along with XSPEC is required for the installation of chspec package.
-
Download the chspec package from this repository by selecting "Code" > "Download ZIP".
-
Unzip and place the resulting chspec directory in desired location.
-
Go to this chspec directory:
cd chspec
Note: If you have not executed the init script for heasoft in your environment, it needs
to be done (usually by executing heainit
if that alias is set).
- To install chspec package, run the
install.sh
script:
./install.sh
This will first download the FITS table file using wget
and save it in the directory
chspec/tables
. Then, the model will be compiled and installed.
Open XSPEC command prompt and run the following:
xspec > lmod chspec /path to/chspec/
You can also include this in your .xspec/xspec.rc file to load the model on XSPEC startup automatically.
Now the chisoth
and chgausdem
models will be available for use as as an XSPEC
model. They may be
defined like:
xspec > model chisoth
xspec > model chgausdem
For an example of the use of chisoth
model in PyXSPEC, see this Jupyter
notebook.