Skip to content

Commit 7649bd7

Browse files
committed
fix pytest
1 parent 0e9877d commit 7649bd7

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

dl1_data_handler/reader.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def _construct_mono_example_identifiers(self):
502502
keys=["obs_id", "tel_id"],
503503
)
504504
events = self._transform_to_cam_coord_offsets(events)
505-
array_pointing = self._get_array_pointing(f)
505+
array_pointing = self.get_array_pointing(f)
506506
# Join the prediction table with the telescope pointing table
507507
events = join(
508508
left=events,
@@ -665,7 +665,7 @@ def _multiplicity_cut_subarray(table, key_colnames):
665665
events.add_column(
666666
true_shower_primary_class, name="true_shower_primary_class"
667667
)
668-
array_pointing = self._get_array_pointing(f)
668+
array_pointing = self.get_array_pointing(f)
669669
# Join the prediction table with the telescope pointing table
670670
events = join(
671671
left=events,
@@ -797,16 +797,6 @@ def _transform_to_cam_coord_offsets(self, table) -> Table:
797797
tel_tables = []
798798
for tel_id in self.tel_ids:
799799
tel_table = table.copy()
800-
tel_table.keep_columns(
801-
[
802-
"obs_id",
803-
"tel_id",
804-
"true_alt",
805-
"true_az",
806-
"telescope_pointing_azimuth",
807-
"telescope_pointing_altitude",
808-
]
809-
)
810800
tel_table = tel_table[tel_table["tel_id"] == tel_id]
811801
# Set the telescope pointing of the SkyOffsetSeparation tranform to the fix pointing
812802
tel_ground_frame = self.subarray.tel_coords[
@@ -834,6 +824,7 @@ def _transform_to_cam_coord_offsets(self, table) -> Table:
834824
true_cam_distance = np.sqrt(
835825
true_cam_position.x**2 + true_cam_position.y**2
836826
)
827+
tel_table.keep_columns(["obs_id", "tel_id"])
837828
tel_table.add_column(true_cam_position.x, name="cam_coord_offset_x")
838829
tel_table.add_column(true_cam_position.y, name="cam_coord_offset_y")
839830
tel_table.add_column(true_cam_distance, name="cam_coord_distance")

0 commit comments

Comments
 (0)