From e6db1a11a7a593362a13b45fedcd4f567a03819e Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 29 Aug 2023 23:23:15 +0200 Subject: [PATCH] Ah, turns out deepcopy IS needed here only took 2 h to figure that one out... --- scopesim/optics/fov_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scopesim/optics/fov_manager.py b/scopesim/optics/fov_manager.py index 89d0f859..6c361af9 100644 --- a/scopesim/optics/fov_manager.py +++ b/scopesim/optics/fov_manager.py @@ -258,7 +258,7 @@ def split(self, axis, value, aperture_id=None) -> None: continue if vol[f"{axis}_min"] >= value or vol[f"{axis}_max"] <= value: continue - new_vol = vol.copy() + new_vol = deepcopy(vol) new_vol[f"{axis}_min"] = value vol[f"{axis}_max"] = value self.insert(self.index(vol) + 1, new_vol) @@ -364,7 +364,7 @@ def _get_new_vols(): if not all(_volume_in_range(vol, axis, edge) for axis, edge in zip(axes, edges)): continue - new_vol = vol.copy() + new_vol = deepcopy(vol) for axis, edge in zip(axes, edges): new_vol[f"{axis}_min"] = max(edge[0], vol[f"{axis}_min"]) new_vol[f"{axis}_max"] = min(edge[1], vol[f"{axis}_max"])