Skip to content

Commit a5f98dd

Browse files
committed
FIX:
- ready for further review - setter for bkg_map_maker fixed - time scale added to ref_epoch - checked that the code runs with with LST-1 data
1 parent 84aeceb commit a5f98dd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pybkgmodel/data.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,11 @@ def load_events(cls, file_name):
656656
event_data[name] *= u.one
657657

658658
# Event times need to be converted from Instrument reference epoch
659-
ref_epoch = astropy.time.Time(evt_head['MJDREFI'], evt_head['MJDREFF'], format='mjd')
659+
ref_epoch = astropy.time.Time(evt_head['MJDREFI'],
660+
evt_head['MJDREFF'],
661+
scale=evt_head['TIMESYS'].lower(),
662+
format='mjd'
663+
)
660664

661665
evt_time = evt_data['TIME'].quantity + ref_epoch
662666
event_data['mjd'] = evt_time.mjd * u.d

src/pybkgmodel/processing.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,18 +788,14 @@ def __init__(self,
788788

789789
@property
790790
def bkg_map_maker(self):
791-
print("Getter called. Current value:", self._bkg_map_maker)
792791
return super().bkg_map_maker
793792

794793
@bkg_map_maker.setter
795794
def bkg_map_maker(self, maker):
796-
print("Setter called with:", maker)
797795
if not isinstance(maker, ExclusionMap):
798796
raise TypeError(f"Maker must be of type {ExclusionMap}")
799797
super(RunwiseExclusionMap, type(self)).bkg_map_maker.__set__(self, maker)
800-
print("Value set:", self._bkg_map_maker)
801798

802-
803799
class StackedExclusionMap(Stacked):
804800
"""
805801
A class used to store the settings from the configuation file and to

0 commit comments

Comments
 (0)