We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67be391 commit 7b1d048Copy full SHA for 7b1d048
scopesim/optics/optical_train.py
@@ -358,6 +358,7 @@ def prepare_source(self, source):
358
# ..todo: lower needed because "DEG" is not understood, this is ugly
359
pixarea = (header["CDELT1"] * u.Unit(header["CUNIT1"].lower()) *
360
header["CDELT2"] * u.Unit(header["CUNIT2"].lower())).to(u.arcsec**2)
361
+ pixarea = np.abs(pixarea) # CDELTi can be negative, pixarea cannot
362
data = data / pixarea.value # cube is per arcsec2
363
364
data = (data * factor).value
0 commit comments