Skip to content

Commit

Permalink
interpolator now copies input tables so they are not being altered wh…
Browse files Browse the repository at this point in the history
…en interpolating
  • Loading branch information
Christoph Toennis committed Aug 6, 2024
1 parent 04f794a commit e9a2112
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ctapipe/io/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def add_table(self, tel_id, input_table):
if not isinstance(input_table["time"], Time):
raise TypeError("'time' column of pointing table must be astropy.time.Time")

input_table = input_table.copy()
input_table.sort("time")

az = input_table["azimuth"].quantity.to_value(u.rad)
Expand Down Expand Up @@ -279,6 +280,7 @@ def add_table(self, tel_id, input_table):

self._check_tables(input_table)

input_table = input_table.copy()
input_table.sort("time")
time = input_table["time"]
gain = input_table["gain"]
Expand Down Expand Up @@ -335,6 +337,7 @@ def add_table(self, tel_id, input_table):

self._check_tables(input_table)

input_table = input_table.copy()
input_table.sort("time")
time = input_table["time"]
pedestal = input_table["pedestal"]
Expand Down

0 comments on commit e9a2112

Please sign in to comment.