From cf7a2cc76554ef7fed893e97ccd97c2595ad2ce1 Mon Sep 17 00:00:00 2001 From: Franca Cassol Date: Tue, 7 Jul 2020 12:21:06 +0200 Subject: [PATCH 1/2] Add subarray argument --- lstchain/calib/camera/calibrator.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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( From 126601b5aefc49bf1969bde74515a44a3d00f38a Mon Sep 17 00:00:00 2001 From: Franca Cassol Date: Tue, 7 Jul 2020 12:21:50 +0200 Subject: [PATCH 2/2] Add subarray argument --- lstchain/reco/r0_to_dl1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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