From eec6873374306f6a626476e557f0bfc871389f33 Mon Sep 17 00:00:00 2001 From: teutoburg Date: Wed, 10 Dec 2025 15:48:12 +0100 Subject: [PATCH 1/2] Fix CUNIT not respected in FVPSF effect --- scopesim/effects/psfs/discrete.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scopesim/effects/psfs/discrete.py b/scopesim/effects/psfs/discrete.py index db2561ad..2bf0fada 100644 --- a/scopesim/effects/psfs/discrete.py +++ b/scopesim/effects/psfs/discrete.py @@ -405,8 +405,9 @@ def get_kernel(self, fov): self.current_data = self._file[ext].data # compare the fov and psf pixel scales - kernel_pixel_scale = self._file[ext].header["CDELT1"] - fov_pixel_scale = fov.header["CDELT1"] + kernel_pixel_unit = u.Unit(self._file[ext].header.get("CUNIT1", "deg")) + kernel_pixel_scale = self._file[ext].header["CDELT1"] * kernel_pixel_unit + fov_pixel_scale = fov.header["CDELT1"] * u.Unit(fov.header["CUNIT1"]) # get the spatial map of the kernel cube layers strl_hdu = self.strehl_imagehdu @@ -426,6 +427,7 @@ def get_kernel(self, fov): # TODO: should the mask also be rescaled? # rescale the pixel scale of the kernel to match the fov images pix_ratio = fov_pixel_scale / kernel_pixel_scale + pix_ratio = pix_ratio.to_value(1).round(5) if abs(pix_ratio - 1) > self.meta["flux_accuracy"]: spline_order = from_currsys( "!SIM.computing.spline_order", cmds=self.cmds) From 87e30774a99266cdd22bf78210eb36ed4be61959 Mon Sep 17 00:00:00 2001 From: teutoburg Date: Wed, 10 Dec 2025 15:53:07 +0100 Subject: [PATCH 2/2] Bumping version from 0.11.2a1 to 0.11.2a2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3b1c781..71b66e6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ScopeSim" -version = "0.11.2a1" +version = "0.11.2a2" description = "Generalised telescope observation simulator" license = {text = "GPL-3.0-or-later"} authors = [