Commit 7a6c70a6 authored by Alessio Berti's avatar Alessio Berti
Browse files

Add some documentation to method finding stereo events.

parent 4c347b7c
Pipeline #90241 failed with stage
in 8 minutes and 21 seconds
......@@ -1357,11 +1357,15 @@ class MarsRun:
stereo_m1_data = self.event_data['M1']['stereo_event_number'][np.where(self.event_data['M1']['trigger_pattern'] == DATA_TRIGGER_PATTERN)]
stereo_m2_data = self.event_data['M2']['stereo_event_number'][np.where(self.event_data['M2']['trigger_pattern'] == DATA_TRIGGER_PATTERN)]
# find common values between M1 and M2 stereo events, see
stereo_numbers = np.intersect1d(stereo_m1_data, stereo_m2_data)
# find indices of the stereo event numbers in original stereo event numbers arrays, see
m1_ids = np.searchsorted(self.event_data['M1']['stereo_event_number'], stereo_numbers)
m2_ids = np.searchsorted(self.event_data['M2']['stereo_event_number'], stereo_numbers)
# make list of tuples, see
stereo_ids = list(zip(m1_ids, m2_ids))
stereo_m1_data = self.event_data['M1']['stereo_event_number'][np.where(self.event_data['M1']['trigger_pattern'] == MC_TRIGGER_PATTERN)]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment