diff --git a/src/toolbox_scs/detectors/viking.py b/src/toolbox_scs/detectors/viking.py index dc795e50a818ae75aeb450aa203e14b6f15fd0cb..d8242e8320a9435c88c4093e462b13ca6b47ca2c 100644 --- a/src/toolbox_scs/detectors/viking.py +++ b/src/toolbox_scs/detectors/viking.py @@ -8,24 +8,20 @@ __all__ = ['Viking'] # ----------------------------------------------------------------------------- # Viking class class Viking: - # run - PROPOSAL = 2953 - - # image range - X_RANGE = slice(None, None) - Y_RANGE = slice(None, None) - - # dimension for integration - INTEGRATE_DIM = 'newt_y' - USE_DARK = False - dark_image = None - - # polynomial degree for background subtraction - POLY_DEG = 5 - - FIELDS = ['newton'] - - ENERGY_CALIB = [0, 1, 0] + def __init__(self, proposalNB): + self.PROPOSAL = proposalNB + self.FIELDS = ['newton'] + self.ENERGY_CALIB = [0, 1, 0] + # dark + self.USE_DARK = False + self.dark_image = None + # image range + self.X_RANGE = slice(None, None) + self.Y_RANGE = slice(None, None) + # dimension for integration + self.INTEGRATE_DIM = 'newt_y' + # polynomial degree for background subtraction + self.POLY_DEG = 5 def set_params(self, **params): for key, value in params.items(): @@ -34,7 +30,7 @@ class Viking: def get_params(self, *params): if not params: params = ('proposal', 'x_range', 'y_range', 'integrate_dim', - 'fields',) + 'energy_calib', 'use_dark', 'poly_deg', 'fields') return {param: getattr(self, param.upper()) for param in params} def from_run(self, runNB, proposal=None, add_attrs=True, calibrate=True):