Fix for direct beam normalization and monitor low count rate
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user