aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-11-30 20:04:19 +0800
committerAaron LI <aly@aaronly.me>2017-11-30 20:04:19 +0800
commitfc5a0b6bd6deed81674f589d1be66fd0509094b1 (patch)
treebc4cd8131752cf891cec2c3c68a26144536e0148
parentf66390aeb424e53898def998fa332f421de676c1 (diff)
downloadatoolbox-fc5a0b6bd6deed81674f589d1be66fd0509094b1.tar.bz2
astro/fits2skymodel.py: workaround MAXVALUE keyword when it's inf
-rwxr-xr-xastro/oskar/fits2skymodel.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astro/oskar/fits2skymodel.py b/astro/oskar/fits2skymodel.py
index 3044487..e280705 100755
--- a/astro/oskar/fits2skymodel.py
+++ b/astro/oskar/fits2skymodel.py
@@ -127,7 +127,8 @@ class SkyModel:
header["PixSize"] = (self.pixelsize, "Pixel size [arcsec]")
header["K2JyPix"] = (self.factor_K2JyPixel, "[K] -> [Jy/pixel]")
header["MINVALUE"] = (self.minvalue, "[K] minimum threshold")
- header["MAXVALUE"] = (self.maxvalue, "[K] maximum threshold")
+ if np.isfinite(self.maxvalue):
+ header["MAXVALUE"] = (self.maxvalue, "[K] maximum threshold")
return header
@property