Commit 32668adf authored by Moritz Huetten's avatar Moritz Huetten
Browse files

add trigger id to event containers

parent 89ba99dc
Pipeline #76380 failed with stage
in 9 minutes and 9 seconds
......@@ -265,16 +265,19 @@ class MAGICEventSource(EventSource):
data.r0.obs_id = obs_id
data.r0.event_id = event_id
data.r0.tel.clear()
data.r0.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data['M1']['trigger_pattern'][event_order_number]
# Setting up the R1 container
data.r1.obs_id = obs_id
data.r1.event_id = event_id
data.r1.tel.clear()
data.r1.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data['M1']['trigger_pattern'][event_order_number]
# Setting up the DL0 container
data.dl0.obs_id = obs_id
data.dl0.event_id = event_id
data.dl0.tel.clear()
data.dl0.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data['M1']['trigger_pattern'][event_order_number]
# Filling the DL1 container with the event data
for tel_i, tel_id in enumerate(tels_in_file):
......@@ -386,16 +389,19 @@ class MAGICEventSource(EventSource):
data.r0.obs_id = obs_id
data.r0.event_id = event_id
data.r0.tel.clear()
data.r0.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data[telescope]['trigger_pattern'][event_order_number]
# Setting up the R1 container
data.r1.obs_id = obs_id
data.r1.event_id = event_id
data.r1.tel.clear()
data.r1.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data[telescope]['trigger_pattern'][event_order_number]
# Setting up the DL0 container
data.dl0.obs_id = obs_id
data.dl0.event_id = event_id
data.dl0.tel.clear()
data.dl0.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data[telescope]['trigger_pattern'][event_order_number]
# Creating the telescope pointing container
pointing = TelescopePointingContainer()
......@@ -503,16 +509,19 @@ class MAGICEventSource(EventSource):
data.r0.obs_id = obs_id
data.r0.event_id = event_id
data.r0.tel.clear()
data.r0.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data[telescope]['trigger_pattern'][event_order_number]
# Setting up the R1 container
data.r1.obs_id = obs_id
data.r1.event_id = event_id
data.r1.tel.clear()
data.r1.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data[telescope]['trigger_pattern'][event_order_number]
# Setting up the DL0 container
data.dl0.obs_id = obs_id
data.dl0.event_id = event_id
data.dl0.tel.clear()
data.dl0.tel[tel_i + 1].trigger_type = self.current_run['data'].event_data[telescope]['trigger_pattern'][event_order_number]
# Creating the telescope pointing container
pointing = TelescopePointingContainer()
......@@ -666,8 +675,8 @@ class MarsRun:
event_data['charge'] = []
event_data['arrival_time'] = []
event_data['trigger_pattern'] = scipy.array([])
event_data['stereo_event_number'] = scipy.array([])
event_data['trigger_pattern'] = scipy.array([], dtype=np.int32)
event_data['stereo_event_number'] = scipy.array([], dtype=np.int32)
event_data['pointing_zd'] = scipy.array([])
event_data['pointing_az'] = scipy.array([])
event_data['pointing_ra'] = scipy.array([])
......@@ -865,7 +874,7 @@ class MarsRun:
event_data['badpixelinfo'].append(badpixelinfo)
event_data['mars_meta'].append(mars_meta)
event_data['trigger_pattern'] = scipy.concatenate((event_data['trigger_pattern'], trigger_pattern))
event_data['stereo_event_number'] = scipy.concatenate((event_data['stereo_event_number'], stereo_event_number)).astype(dtype='int')
event_data['stereo_event_number'] = scipy.concatenate((event_data['stereo_event_number'], stereo_event_number))
event_data['pointing_zd'] = scipy.concatenate((event_data['pointing_zd'], pointing_zd))
event_data['pointing_az'] = scipy.concatenate((event_data['pointing_az'], pointing_az))
event_data['pointing_ra'] = scipy.concatenate((event_data['pointing_ra'], pointing_ra))
......
Supports Markdown
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