RMF Utilities
- nuskybgd.rmf.add_abs_fits(detabsfile, rmffile)[source]
[Placeholder] Add detector absorption to response matrix. Doing so may obviate the need for a separate ARF file. This function works with FITS files.
- nuskybgd.rmf.add_abs_hdu(detabshdu, rmfhdu)[source]
Add detector absorption to response matrix. Doing so may obviate the need for a separate ARF file. This function works with FITS HDUs.
The input ‘rmfhdu’ is modified.
Use cases:
Add DETABS from CALDB to the RMF file from CALDB.
Add weighed DETABS to a user supplied RMF file.
- Parameters
detabshdu (astropy.io.fits.BinTableHDU) – HDU with BinTable ‘DETABS’ containing absorption data.
rmfhdu (astropy.io.fits.BinTableHDU) – HDU with BinTable ‘MATRIX’ containing RMF data.
- nuskybgd.rmf.add_weighted_abs(abshdus, weights, rmfhdu)[source]
Add absorption to an RMF, using given weights for the detectors.
The input ‘rmfhdu’ is modified in-place.
- Parameters
abshdus (astropy.io.fits.HDUList) – e.g. CALDB DETABS FITS file
weights (list of float) – 4 values corresponding to the detector weights.
rmfhdu (astropy.io.fits.BinTableHDU) – A BinTableHDU with RMF data.
- nuskybgd.rmf.detabs_hdu(abshdus, weights)[source]
Coadd absorption spectrum of the detectors using the given weights. The weights are normalized to unity before proceeding.
Use cases:
Get detector absorption weighed by area inside a source region.
Get absorption of a single detector by giving it 100% weight.
- Parameters
abshdus (astropy.io.fits.HDUList) – e.g. CALDB DETABS FITS file.
weights (list of float) – 4 values corresponding to the detector weights.
- Returns
A BinTableHDU ‘DETABS’ containing weighted absorption data.
- Return type
astropy.io.fits.BinTableHDU