From 86086df548a5c244be095c4cc3291afdc9b9a58c Mon Sep 17 00:00:00 2001 From: Panu Lahtinen Date: Fri, 30 Nov 2018 11:23:47 +0200 Subject: [PATCH] Ensure that radiance from planck() isn't masked This will fix saving of the LUT for Py2.7 --- pyspectral/blackbody.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyspectral/blackbody.py b/pyspectral/blackbody.py index 491f7a0f..af069b07 100644 --- a/pyspectral/blackbody.py +++ b/pyspectral/blackbody.py @@ -182,6 +182,7 @@ def planck(wave, temp, wavelength=True): denom = np.exp(exp_arg) - 1 rad = nom / denom + rad = np.where(rad.mask, np.nan, rad.data) radshape = rad.shape if wln.shape[0] == 1: if temperature.shape[0] == 1: