These are notes for doing a unit test for the Xspec model
zigm. Basic approach is to load the model,
set up a dummy response, specify the model, and compute
the flux in a specified energy band.
The xspec script zigm.xcm has the xspec commands
that are used after the model has been loaded.
lmod zigm # load the model
script zigm
dummyrsp 0.002 0.0035 500 linear # cover the 3542 - 6200 Angstroms
model pow*zigm # power law * lyman forest model
# set up power law to give 1 photon/s/cm2/Hz
0.0 # power-law index
2.418e17 # norm
3.5 # z
1 # Meiksin model
1 # include lyman limit
flux 0.00305 0.00315
script none
The answer should be:
Model Flux 7.603e+12 photons (37.693 ergs/cm^2/s) range (0.0030500 - 0.0031500 keV)
I expect about 0.3/cm2/s/Hz
The bandwidth is 1e-4 * 2.418e17 = 2.4e13 Hz.
So expected answer is ~7e12. Seems OK
The script then checks the Madau model (with metals).
0.0 # power-law index
2.418e17 # norm
3.5 # z
0 # Madau model
1 # include lyman limit
flux 0.00305 0.00315
The answer should be:
Model Flux 2.1398e+12 photons (10.609 ergs/cm^2/s) range (0.0030500 - 0.0031500 keV)