Skip to content

Commit

Permalink
Merge pull request #216 from pawel21/change_conditions_in_time_lapse_…
Browse files Browse the repository at this point in the history
…corr

Improved condition in timelapse correction
  • Loading branch information
rlopezcoto authored Nov 18, 2019
2 parents 8bdd812 + ac19318 commit a038272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lstchain/calib/camera/r0.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,11 @@ def do_time_lapse_corr(waveform, expected_pixel_id, local_clock_list,
# code from Takayuki & Julian
if pix % 2 == 0:
first_cap = fc[nr_module, gain, pix]
if first_cap % size1drs > 765 and first_cap % size1drs < 1012:
if first_cap % size1drs > 767 and first_cap % size1drs < 1013:
start = int(first_cap) + size1drs
end = int(first_cap) + size1drs + 12
last_time_array[nr_module, gain, pix, (start%size4drs):(end%size4drs)] = time_now
elif first_cap % size1drs >= 1012:
elif first_cap % size1drs >= 1013:
channel = int(first_cap / size1drs)
for kk in range(first_cap + size1drs, ((channel + 2) * size1drs)):
last_time_array[nr_module, gain, pix, int(kk) % size4drs] = time_now
Expand Down Expand Up @@ -549,7 +549,7 @@ def do_time_lapse_corr_data_from_20181010_to_20191104(waveform, expected_pixel_i
start = int(first_cap) + size1drs - 1
end = int(first_cap) + size1drs + 11
last_time_array[nr_module, gain, pix, (start % size4drs):(end % size4drs)] = time_now
elif first_cap % size1drs >= 1014:
elif first_cap % size1drs >= 1013:
channel = int(first_cap / size1drs)
for kk in range(first_cap + size1drs, (channel + 2) * size1drs):
last_time_array[nr_module, gain, pix, int(kk) % size4drs] = time_now
Expand Down

0 comments on commit a038272

Please sign in to comment.