_read_rmf#
- sunkit_spex.fitting_legacy.io._read_rmf(file)[source]#
Read a .rmf file and extract useful information from it.
- Parameters:
file (
str
,file-like
orpathlib.Path
) – A .rmf file (seeopen
for details).- Returns:
The low and high boundary of energy bins (data[‘energ_lo’], data[‘energ_hi’]), number of sub-set channels in the energy bin (data[‘n_grp’]), starting index of each sub-set of channels (data[‘f_chan’]), number of channels in each sub-set (data[‘n_chan’]), redistribution matrix [counts per photon] (data[‘matrix’]).
- Return type: