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 subarray to calibration class #458

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 8 additions & 4 deletions lstchain/calib/camera/calibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class LSTCameraCalibrator(CameraCalibrator):

).tag(config=True)

def __init__(self, **kwargs):

def __init__(self, subarray, **kwargs):
"""
Parameters
----------
Expand All @@ -79,23 +80,26 @@ 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}")

print("EXTRACTOR", self.image_extractor)

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(
Expand Down
4 changes: 3 additions & 1 deletion lstchain/reco/r0_to_dl1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down