Change request #2404
csphagen output fits file missing OGIP standard headers
Status: | Closed | Start date: | 03/08/2018 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | |||
Assigned To: | Knödlseder Jürgen | % Done: | 80% | ||
Category: | - | ||||
Target version: | 1.6.0 | ||||
Tags: | HEADERS CSPHAGEN OGIP XSPEC | ||||
Duration: |
Description
I have recently tested the compatibility of ctools and CTA data with xspec using csphagen to create on, off, arf and rmf fits files.
However, I discovered that the files were missing several jey headers required to conform to OGIP standards, and so they did not work in xspec.
Manually inputting these headers allowed the data to work in xspec.
Missing headers for each file (with descriptions from the documentation and example inputs that worked for me):-
For the onoff_on and onoff_off files:
-The following must be added to the SPECTRUM index:
TELESCOP = 'CTA’ / telescope (mission) name
INSTRUME = 'CTA’ / instrument name
FILTER = 'NONE’ / filter
BACKFILE = 'none’ / associated background filename
CORRFILE = 'none’ / associated correction filename
CORRSCAL = 1 / correction file scaling factor
RESPFILE = 'none’ / associated redistribution matrix filename
ANCRFILE = 'none’ / associated ancillary response filename
HDUCLASS = 'OGIP’ / format conforms to OGIP standard
HDUCLAS1 = 'SPECTRUM’ / PHA dataset
HDUVERS = '1.2.0’ / version of the file format (I took a guess for this)
POISSERR = T / poissionian errors to be assumed
CHANTYPE = 'PI’ / channel type (PHA, PI etc)
DETCHANS = 120 / total number of possible channels
For the onoff_arf file:
-The following must be added to the SPECRESP index:
TELESCOP = 'CTA’ / telescope (mission) name
INSTRUME = 'CTA’ / instrument name
FILTER = 'NONE’ / filter
HDUCLASS = 'OGIP’ / format conforms to OGIP standard
HDUCLAS1 = 'RESPONSE’ / extension contains response data
HDUCLAS2 = 'SPECRESP’ / extension contains an arf
HDUVERS = '1.2.0’ / version of the file format (guess)
For the onoff_rmf file:
- The following must be added to the EBOUNDS index:
TELESCOP = 'CTA’ / telescope (mission) name
INSTRUME = 'CTA’ / instrument name
FILTER = 'NONE’ / filter
CHANTYPE = 'PI’ / channel type (PHA, PI etc)
DETCHANS = 120 / total number of possible channels
HDUCLASS = 'OGIP’ / format conforms to OGIP standard
HDUCLAS1 = 'RESPONSE’ / extension contains response data
HDUCLAS2 = 'EBOUNDS’ / extension contains EBOUNDS
HDUVERS = '1.2.0’ / version of the file format (guess)
- The following must also be added to the MATRIX index:
TELESCOP = 'CTA’ / telescope (mission) name
INSTRUME = 'CTA’ / instrument name
FILTER = 'NONE’ / filter
CHANTYPE = 'PI’ / channel type (PHA, PI etc)
DETCHANS = 120 / total number of possible channels
HDUCLASS = 'OGIP’ / format conforms to OGIP standard
HDUCLAS1 = 'RESPONSE’ / dataset relates to the spectral response
HDUCLAS2 = 'RSP_MATRIX’ / dataset is a spectral response matrix
HDUVERS = '1.2.0’ / version of the file format (guess)
TLMIN4 = 0 / the minimum value allowed in column 4 (number corresponds to the number of the F_CHAN column)
The above are the minimum requirement for OGIP conformation, however there are other non-essential headers that may be of use.
Full details of the above and non-essential headers can be found here for the PHA files: https://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/spectra/ogip_92_007/node6.html.
For the arf and rmf files, full details can be found here (page 8 and 14 for the rmf extensions and page 17 for the arf extensions): ftp://legacy.gsfc.nasa.gov/caldb/docs/memos/cal_gen_92_002/cal_gen_92_002.pdf.
I hope this helps.
- Chris Moore
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 6 years ago
- Status changed from New to In Progress
- Assigned To set to Knödlseder Jürgen
- Target version set to 1.6.0
- % Done changed from 0 to 80
I implemented the changes. It seems to me that the keywords for the EBOUNDS
in the RMF
file are not required for Xspec.
I installed Xspec and did some testing. Looks good. Results are similar to results obtained with ctlike
.
I wrote a tutorial about how to do an Xspec analysis.
The merging of the code into the trunk is in progress.
#2 Updated by Knödlseder Jürgen over 6 years ago
- Status changed from In Progress to Closed
Here is a link to the tutorial: http://cta.irap.omp.eu/ctools-devel/users/tutorials/howto/howto_xspec.html
The code has been merged into devel
.