Skip to content

Commit

Permalink
Construct example identifiers for stereo real data
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacave Bastien committed Jun 13, 2024
1 parent 2c5a4dc commit 0066bd9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion dl1_data_handler/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def __init__(


# Apply the multiplicity cut after the parameter cuts for the subarray
if parameter_selection and multiplicity_selection["Subarray"] > 1:
if multiplicity_selection["Subarray"] > 1:
subarray_triggers = np.zeros(len(event_id))
for tel_type in selected_telescopes:
subarray_triggers += np.count_nonzero(
Expand Down Expand Up @@ -630,6 +630,18 @@ def __init__(
)
else:
example_identifiers.append((file_idx, sim_idx, img_idx))
else:
# Construct the example identifiers
for idx in range(len(allevents)):
img_idx = []
for tel_type in selected_telescopes:
img_idx.append(image_indices[tel_type][idx])
if self.pointing_mode in ["subarray", "divergent"]:
example_identifiers.append(
(file_idx, img_idx, array_pointing)
)
else:
example_identifiers.append((file_idx, img_idx))

# Confirm that the files are consistent and merge them
if not self.telescopes:
Expand Down

0 comments on commit 0066bd9

Please sign in to comment.