From 1bdb682de640a33e75ca72c67ddb6e594f51c555 Mon Sep 17 00:00:00 2001 From: jbrink Date: Tue, 17 Nov 2026 15:29:48 +0100 Subject: [PATCH] SPEC mode: squeeze 3D TIPTOP psf extensions down to 2D, both the data and the WCS from the header. --- scopesim/effects/psfs/discrete.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scopesim/effects/psfs/discrete.py b/scopesim/effects/psfs/discrete.py index 64d852ef..f0f391f2 100644 --- a/scopesim/effects/psfs/discrete.py +++ b/scopesim/effects/psfs/discrete.py @@ -281,9 +281,10 @@ def make_psf_cube(self, fov, spline_order=1): unit_factor = 1 ref_pixel_scale = hdr["CDELT1"] * unit_factor - psfwcs = WCS(hdr) + psfwcs = WCS(hdr).sub(2) # get the spatial part of the WCS psf = self._file[ext].data psf = psf / psf.sum() # normalisation of the input psf + psf = np.atleast_2d(psf.squeeze()) # remove any extra singleton dimensions nyin, nxin = psf.shape ipsf = RectBivariateSpline(