diff --git a/lstchain/calib/camera/calibrator.py b/lstchain/calib/camera/calibrator.py index 5d739e08d1..5e8be327f7 100644 --- a/lstchain/calib/camera/calibrator.py +++ b/lstchain/calib/camera/calibrator.py @@ -61,7 +61,8 @@ class LSTCameraCalibrator(CameraCalibrator): ).tag(config=True) - def __init__(self, **kwargs): + + def __init__(self, subarray, **kwargs): """ Parameters ---------- @@ -79,12 +80,13 @@ def __init__(self, **kwargs): kwargs """ - super().__init__(**kwargs) + super().__init__(subarray, **kwargs) # load the waveform charge extractor self.image_extractor = ImageExtractor.from_name( self.extractor_product, - config=self.config + subarray = self.subarray, + config = self.config ) self.log.info(f"extractor {self.extractor_product}") @@ -92,10 +94,12 @@ def __init__(self, **kwargs): self.data_volume_reducer = DataVolumeReducer.from_name( self.reducer_product, - config=self.config + subarray=self.subarray, + config = self.config ) self.log.info(f" {self.reducer_product}") + # declare gain selector if the threshold is defined if self.gain_threshold: self.gain_selector = gainselection.ThresholdGainSelector( diff --git a/lstchain/reco/r0_to_dl1.py b/lstchain/reco/r0_to_dl1.py index 7f91e8841d..dc18018b62 100644 --- a/lstchain/reco/r0_to_dl1.py +++ b/lstchain/reco/r0_to_dl1.py @@ -247,6 +247,7 @@ def r0_to_dl1( apply_charge_correction = Config(config).LSTCalibrationCalculator.apply_charge_correction, config = Config(config), allowed_tels = [1], + subarray = source.subarray ) # Pulse extractor for muon ring analysis. Same parameters (window_width and _shift) as the one for showers, but @@ -258,7 +259,8 @@ def r0_to_dl1( charge_scale=config['charge_scale'], apply_charge_correction=Config(config).LSTCalibrationCalculator.apply_charge_correction, config = Config(config), - allowed_tels = [1],) + allowed_tels = [1], + subarray = source.subarray) # Component to process interleaved pedestal and flat-fields