diff --git a/eos/projection.py b/eos/projection.py index 4acc62d..1f96d24 100644 --- a/eos/projection.py +++ b/eos/projection.py @@ -241,6 +241,7 @@ class LZProjection(ProjectionInterface): ref_lz *= norm.monitor/self.monitor ref_lz[np.logical_not(self.data.mask)] = np.nan self.data.norm = norm_lz + self.norm_monitor = norm.monitor self.data.ref = ref_lz self.calc_error() self.is_normalized = True diff --git a/eos/reduction_reflectivity.py b/eos/reduction_reflectivity.py index 6168c38..413ffb6 100644 --- a/eos/reduction_reflectivity.py +++ b/eos/reduction_reflectivity.py @@ -314,6 +314,7 @@ class ReflectivityReduction: scale = self.config.reduction.scale[i] except IndexError: scale = self.config.reduction.scale[-1] + # TODO: causes error if no '-s' argumnet is given proj.scale(scale) # projection on qz-grid @@ -451,6 +452,9 @@ class ReflectivityReduction: proj.apply_norm_mask(self.norm, min_norm=self.config.reduction.normalizationFilter, min_theta=self.config.reduction.normAngleFilter) + if self.monitor<=1e-6: + self.monitor = np.nan + proj.project(dataset, self.monitor) if self.config.reduction.normalisationMethod == NormalisationMethod.over_illuminated: @@ -465,7 +469,7 @@ class ReflectivityReduction: else: logging.error('unknown normalisation method! Use [u]nder, [o]ver or [d]irect illumination') proj.normalize_no_footprint(self.norm) - if self.monitor<=1e-6: + if self.monitor is np.nan: logging.info(' low monitor -> nan output') proj.data.ref *= np.nan