Skip to content

Commit 3344a5b

Browse files
authored
Merge pull request #1251 from cta-observatory/r0g_r0v_bugfix
Fix lstchain_r0g_to_r0v.py
2 parents 8bfba0f + f6b21d9 commit 3344a5b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lstchain/scripts/lstchain_r0g_to_r0v.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,15 @@ def main():
148148
wf = wf.reshape((num_gains, num_pixels, num_samples))
149149

150150
evtype = event_type[event.event_id]
151-
151+
pixel_status = protozfits.any_array_to_numpy(event.pixel_status)
152152
ordered_pix_mask = np.array(num_pixels*[True])
153+
153154
if evtype in EVENT_TYPES_TO_REDUCE:
154155
pixmask = pixel_mask[event.event_id]
155156
ordered_pix_mask = pixmask[pixel_id_map]
156157
new_wf = wf[:, ordered_pix_mask, :]
157158
event.waveform.data = new_wf.tobytes()
158-
pixel_status = protozfits.any_array_to_numpy(event.pixel_status)
159+
159160
# Modify pixel status as needed
160161
new_status = np.where(ordered_pix_mask,
161162
pixel_status | PixelStatus.DVR_STATUS_0,

0 commit comments

Comments
 (0)