Skip to content

Commit

Permalink
Merge branch 'master' into thread_safe
Browse files Browse the repository at this point in the history
* master:
  Disable time calibration for simtel files in extract_dl1
  • Loading branch information
watsonjj committed Aug 8, 2019
2 parents a95522a + b5f1010 commit c0f0753
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 @@ -108,8 +110,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 c0f0753

Please sign in to comment.