From 782225381ec8e025650c60f9c164b209f3d25f1e Mon Sep 17 00:00:00 2001 From: Michele Peresano Date: Wed, 16 Jun 2021 13:10:35 +0200 Subject: [PATCH 1/3] Update analysis configuration file --- protopipe/aux/example_config_files/analysis.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/protopipe/aux/example_config_files/analysis.yaml b/protopipe/aux/example_config_files/analysis.yaml index ea0a545d..67095ceb 100644 --- a/protopipe/aux/example_config_files/analysis.yaml +++ b/protopipe/aux/example_config_files/analysis.yaml @@ -1,7 +1,8 @@ # General informations +# WARNING: the settings recorded here are unstable and used here only to give an example # NOTE: only Prod3b simulations are currently supported. General: - config_name: 'v0.4.0_dev1' + config_name: 'test' site: 'north' # 'north' or 'south' # array can be either # - 'subarray_LSTs', 'subarray_MSTs', 'subarray_SSTs' or 'full_array' @@ -16,6 +17,7 @@ Calibration: # photoelectrons # the pixel-wise one calculated by simtelarray is 0.92 calibscale: 0.92 + apply_integration_correction: false # Cleaning for reconstruction ImageCleaning: @@ -24,8 +26,8 @@ ImageCleaning: biggest: tail: # thresholds: # picture, boundary - - LSTCam: [6.61, 3.30] - - NectarCam: [5.75, 2.88] + - LSTCam: [5.0, 2.5] + - NectarCam: [5.0, 2.5] - FlashCam: [4,2] # dummy values for reliable unit-testing - ASTRICam: [4,2] # dummy values for reliable unit-testing - DigiCam: [0,0] # values left unset for future studies @@ -58,8 +60,8 @@ ImageCleaning: extended: tail: # thresholds: # picture, boundary - - LSTCam: [6.61, 3.30] - - NectarCam: [5.75, 2.88] + - LSTCam: [5.0, 2.5] + - NectarCam: [5.0, 2.5] - FlashCam: [4,2] # dummy values for reliable unit-testing - ASTRICam: [4,2] # dummy values for reliable unit-testing - DigiCam: [0,0] # values left unset for future studies @@ -91,7 +93,7 @@ ImageCleaning: # Cut for image selection ImageSelection: source: "extended" # biggest or extended - charge: [50., 1e10] + charge: [55., 1e10] pixel: [3, 1e10] ellipticity: [0.1, 0.6] nominal_distance: [0., 0.8] # in camera radius From 03f0ac2d7b6a8e1e10d3cee7a2a319eeb8422a56 Mon Sep 17 00:00:00 2001 From: Michele Peresano Date: Wed, 16 Jun 2021 13:14:14 +0200 Subject: [PATCH 2/3] make event preparer read and apply new option --- protopipe/pipeline/event_preparer.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/protopipe/pipeline/event_preparer.py b/protopipe/pipeline/event_preparer.py index 753a95c1..212c3eb1 100644 --- a/protopipe/pipeline/event_preparer.py +++ b/protopipe/pipeline/event_preparer.py @@ -144,6 +144,13 @@ def __init__( debug=False, ): """Initiliaze an EventPreparer object.""" + + # Readout window integration correction + try: + self.apply_integration_correction = config["Calibration"]["apply_integration_correction"] + except KeyError: + # defaults to enabled + self.apply_integration_correction = True # Calibscale try: @@ -236,9 +243,10 @@ def __init__( ) ) - # Configuration for the camera calibrator + # Configuration for the image extractor cfg = Config() + cfg.TwoPassWindowSum.apply_integration_correction = self.apply_integration_correction extractor = TwoPassWindowSum(config=cfg, subarray=subarray) # Get the name of the image extractor in order to adapt some options @@ -246,7 +254,7 @@ def __init__( self.extractorName = list(extractor.get_current_config().items())[0][0] self.calib = CameraCalibrator( - config=cfg, image_extractor=extractor, subarray=subarray, + image_extractor=extractor, subarray=subarray, ) # Reconstruction From 7b0512592630e78f3d53a8f81934a8a222b8a092 Mon Sep 17 00:00:00 2001 From: Michele Peresano Date: Thu, 17 Jun 2021 11:02:41 +0200 Subject: [PATCH 3/3] pass option as argument, remove extractor config --- protopipe/pipeline/event_preparer.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/protopipe/pipeline/event_preparer.py b/protopipe/pipeline/event_preparer.py index 212c3eb1..2d6f8c0f 100644 --- a/protopipe/pipeline/event_preparer.py +++ b/protopipe/pipeline/event_preparer.py @@ -243,12 +243,7 @@ def __init__( ) ) - # Configuration for the image extractor - - cfg = Config() - cfg.TwoPassWindowSum.apply_integration_correction = self.apply_integration_correction - - extractor = TwoPassWindowSum(config=cfg, subarray=subarray) + extractor = TwoPassWindowSum(subarray=subarray, apply_integration_correction=self.apply_integration_correction) # Get the name of the image extractor in order to adapt some options # specific to TwoPassWindowSum later on self.extractorName = list(extractor.get_current_config().items())[0][0]