Skip to content

Commit

Permalink
Changed flags for image and peak_time transform scale
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienLacave committed Jun 13, 2024
1 parent 0066bd9 commit 6711171
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dl1_data_handler/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,24 +203,24 @@ def __init__(
if table.split("/")[-2] == "images" and self.image_channels is not None:
# Check the transform value used for the file compression
if (
"image_TRANSFORM_SCALE"
"CTAFIELD_3_TRANSFORM_SCALE"
in self.files[first_file].root[table]._v_attrs
and self.image_scale is None
):
self.image_scale = (
self.files[first_file]
.root[table]
._v_attrs["image_TRANSFORM_SCALE"]
._v_attrs["CTAFIELD_3_TRANSFORM_SCALE"]
)
if (
"peak_time_TRANSFORM_SCALE"
"CTAFIELD_4_TRANSFORM_SCALE"
in self.files[first_file].root[table]._v_attrs
and self.peak_time_scale is None
):
self.peak_time_scale = (
self.files[first_file]
.root[table]
._v_attrs["peak_time_TRANSFORM_SCALE"]
._v_attrs["CTAFIELD_4_TRANSFORM_SCALE"]
)

self.simulation_info = None
Expand Down Expand Up @@ -750,7 +750,7 @@ def __init__(
in self.files[first_file].root.dl1.event.telescope.images
):
if (
"image_TRANSFORM_SCALE"
"CTAFIELD_3_TRANSFORM_SCALE"
in self.files[first_file]
.root.dl1.event.telescope.images[tel_table]
._v_attrs
Expand All @@ -759,10 +759,10 @@ def __init__(
self.image_scale = (
self.files[first_file]
.root.dl1.event.telescope.images[tel_table]
._v_attrs["image_TRANSFORM_SCALE"]
._v_attrs["CTAFIELD_3_TRANSFORM_SCALE"]
)
if (
"peak_time_TRANSFORM_SCALE"
"CTAFIELD_4_TRANSFORM_SCALE"
in self.files[first_file]
.root.dl1.event.telescope.images[tel_table]
._v_attrs
Expand All @@ -771,7 +771,7 @@ def __init__(
self.peak_time_scale = (
self.files[first_file]
.root.dl1.event.telescope.images[tel_table]
._v_attrs["peak_time_TRANSFORM_SCALE"]
._v_attrs["CTAFIELD_4_TRANSFORM_SCALE"]
)

self.pixel_positions, self.num_pixels = self._construct_pixel_positions(
Expand Down

0 comments on commit 6711171

Please sign in to comment.