@@ -186,7 +186,7 @@ def apply_response(self, mflux, exposure=None):
186
186
## ---- Supporting response file objects
187
187
188
188
class ResponseMatrix (object ):
189
- def __init__ (self , filename ):
189
+ def __init__ (self , filename , extension = None ):
190
190
"""
191
191
Load a response matrix file (RMF) from a FITS file.
192
192
@@ -244,7 +244,7 @@ def __init__(self, filename):
244
244
self .energ_hi = None
245
245
self .energ_unit = None
246
246
self .detchans = None
247
- self ._load_rmf (filename )
247
+ self ._load_rmf (filename , extension = extension )
248
248
249
249
def _load_rmf (self , filename , extension = None ):
250
250
# open the FITS file and extract the MATRIX extension
@@ -463,7 +463,7 @@ def apply_rmf(self, spec):
463
463
464
464
class AreaResponse (object ):
465
465
466
- def __init__ (self , filename ):
466
+ def __init__ (self , filename , extension = None ):
467
467
"""
468
468
Load an area response file (ARF) from a FITS file.
469
469
@@ -472,6 +472,10 @@ def __init__(self, filename):
472
472
filename : str
473
473
The file name with the ARF file
474
474
475
+ extension : str (default None)
476
+ FITS file extension keyword, if the spectral response is stored
477
+ under an extension other than "SPECRESP"
478
+
475
479
Attributes
476
480
----------
477
481
filename : str
@@ -506,7 +510,7 @@ def __init__(self, filename):
506
510
self .specresp = None
507
511
self .fracexpo = None
508
512
self .exposure = None
509
- self ._load_arf (filename )
513
+ self ._load_arf (filename , extension = extension )
510
514
511
515
def _load_arf (self , filename , extension = None ):
512
516
# open the FITS file and extract the SPECRESP extension
0 commit comments