Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to enable/disable charge integration integration correction #146

Merged
merged 4 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions protopipe/aux/example_config_files/analysis.yaml
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions protopipe/pipeline/event_preparer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -236,17 +243,18 @@ 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)
HealthyPear marked this conversation as resolved.
Show resolved Hide resolved
# 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]

self.calib = CameraCalibrator(
config=cfg, image_extractor=extractor, subarray=subarray,
image_extractor=extractor, subarray=subarray,
)

# Reconstruction
Expand Down