Skip to content

Commit

Permalink
Disable time calibration for simtel files in extract_dl1
Browse files Browse the repository at this point in the history
  • Loading branch information
watsonjj committed Aug 8, 2019
1 parent 714766b commit b5f1010
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions CHECLabPy/scripts/extract_dl1.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ def main():
"then the default columns will be stored.")
args = parser.parse_args()

time_calibrator = TimeCalibrator()

input_paths = args.input_paths
n_files = len(input_paths)
for i_path, input_path in enumerate(input_paths):
Expand All @@ -68,6 +66,10 @@ def main():

is_mc = isinstance(reader, SimtelReader)

time_calibrator = None
if not is_mc:
time_calibrator = TimeCalibrator()

kwargs = dict(
n_pixels=n_pixels,
n_samples=n_samples,
Expand Down Expand Up @@ -105,8 +107,10 @@ def main():
if not start_time:
start_time = t_cpu

shifted = time_calibrator(waveforms)
waveforms_bs = baseline_subtractor.subtract(shifted)
if time_calibrator:
waveforms = time_calibrator(waveforms)

waveforms_bs = baseline_subtractor.subtract(waveforms)
bs = baseline_subtractor.baseline

params = dict(
Expand Down

0 comments on commit b5f1010

Please sign in to comment.