admin管理员组

文章数量:1359224

I am working on a python script to write a rmf fits file to be read and used by Xspec. I have two problems.

  1. even though I set the format of the matrix entries to be a variable length array of floats PE(), the command
    print(repr(hdul[1].data)) returns the matrix column to be an i4, integer 32 bits. since the matrix is normalised to one, this means that every entry in the matrix is either 1 or zero. However, when I do print(hdul[1].data['MATRIX'], the correct values are shown as floats. I'd like to understand why this discrepancy.

  2. when using the FTOOLS routine dmprfm to check the contents of the rmf file I create, the bin ranges that contain non-zero entries consistently show all zeros.


Energy Range 1 E_MIN : 0.006521 E_MAX : 0.006530 No. of Channel groups : 1 GROUP 1 No. of Response Values : 22 Total Efficiency : 17.7812 Bin Range : 1 to22 Response Value Scaler : 10 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

the bin ranges are correct as well as the no. of response values, just the entries are wrong. I also tried by providing a matrix of ones and the result does not change.

if anyone is aware of an example script that guides people on how to create the correct fits file for rmf files it would be great. I'm not looking for the header keywords as those are widely documented.

本文标签: How to create xspec rmf fits file on python for a new missionStack Overflow