create_non_delta_rmf
- sherpa.astro.instrument.create_non_delta_rmf(rmflo, rmfhi, fname, offset=1, e_min=None, e_max=None, ethresh=None, name='delta-rmf', header=None)[source] [edit on github]
Create a RMF using a matrix from a file.
The RMF matrix (the mapping from channel to energy bin) is read in from a file.
Changed in version 4.17.0: Support for offset values other than 1 has been improved.
Changed in version 4.16.0: The number of channels is now taken from e_min (if set) so the matrix is no-longer required to be square.
Added in version 4.10.1.
- Parameters:
rmflo (array) – The energy bins (low and high, in keV) for the RMF. It is assumed that emfhi_i > rmflo_i, rmflo_j > 0, that the energy bins are either ascending, so rmflo_i+1 > rmflo_i or descending (rmflo_i+1 < rmflo_i), and that there are no overlaps. These correspond to the Elow and Ehigh columns (represented by the ENERG_LO and ENERG_HI columns of the MATRIX block) of the OGIP standard.
rmfhi (array) – The energy bins (low and high, in keV) for the RMF. It is assumed that emfhi_i > rmflo_i, rmflo_j > 0, that the energy bins are either ascending, so rmflo_i+1 > rmflo_i or descending (rmflo_i+1 < rmflo_i), and that there are no overlaps. These correspond to the Elow and Ehigh columns (represented by the ENERG_LO and ENERG_HI columns of the MATRIX block) of the OGIP standard.
fname (str) – The name of the two-dimensional image file which stores the response information (the format of this file matches that created by the CIAO tool rmfimg).
offset (int, optional) – The starting channel number, which can not be negative.
e_min (None or array, optional) – The E_MIN and E_MAX columns of the EBOUNDS block of the RMF. If not given the matrix is assumed to be square (using the rmflo and rmfhi values), otherwise these arrays provide the approximate mapping from channel to energy range of the RMF.
e_max (None or array, optional) – The E_MIN and E_MAX columns of the EBOUNDS block of the RMF. If not given the matrix is assumed to be square (using the rmflo and rmfhi values), otherwise these arrays provide the approximate mapping from channel to energy range of the RMF.
ethresh (number or None, optional) – Passed through to the DataRMF call. It controls whether zero-energy bins are replaced.
name (str) – The name of the RMF data set
header (dict) – Header for the created RMF
- Returns:
rmf
- Return type:
DataRMF instance
See also