From 1e6182cbfb7fdff2164a2a634a00bdc889967560 Mon Sep 17 00:00:00 2001 From: rcooke Date: Sun, 1 Dec 2024 20:26:40 +0000 Subject: [PATCH] fix numra in WCS --- pypeit/core/datacube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pypeit/core/datacube.py b/pypeit/core/datacube.py index 668d12768..bcca07d36 100644 --- a/pypeit/core/datacube.py +++ b/pypeit/core/datacube.py @@ -238,8 +238,8 @@ def extract_point_source(wave, flxcube, ivarcube, bpmcube, wcscube, exptime, # Convert from counts/s/Ang/arcsec**2 to counts. The sensitivity function expects counts as input numxx, numyy, numwave = flxcube.shape - arcsecSQ = (wcscube.wcs.cdelt[0] * wcscube.wcs.cunit[0].to(units.arcsec)) * \ - (wcscube.wcs.cdelt[1] * wcscube.wcs.cunit[1].to(units.arcsec)) + arcsecSQ = abs((wcscube.wcs.cdelt[0] * wcscube.wcs.cunit[0].to(units.arcsec)) * \ + (wcscube.wcs.cdelt[1] * wcscube.wcs.cunit[1].to(units.arcsec))) if fluxed: # The datacube is flux calibrated, in units of 10^-17 erg/s/cm**2/Ang/arcsec**2 # Scale the flux and ivar cubes to be in units of erg/s/cm**2/Ang