diff --git a/eos/options.py b/eos/options.py index cd11738..10db230 100644 --- a/eos/options.py +++ b/eos/options.py @@ -434,7 +434,7 @@ class ReflectivityReductionConfig(ArgParsable): 'group': 'input data', 'help': 'apply convolution on lambda axes to smooth the normalization data, useful for low statistics'}) scale: List[float] = field( - default_factory=lambda: [1.], + default_factory=lambda: [], metadata={ 'short': 's', 'group': 'data manicure', diff --git a/eos/projection.py b/eos/projection.py index f034ae6..c9db818 100644 --- a/eos/projection.py +++ b/eos/projection.py @@ -248,9 +248,9 @@ class LZProjection(ProjectionInterface): def scale(self, factor: float): if not self.is_normalized: raise ValueError("Dataset needs to be normalized, first") - self.data.ref *= factor - self.data.err *= factor - self.norm_monitor /= factor + self.data.ref /= factor + self.data.err /= factor + self.norm_monitor *= factor def project_on_qz(self): if not self.is_normalized: diff --git a/eos/reduction_reflectivity.py b/eos/reduction_reflectivity.py index ce8fc3b..6168c38 100644 --- a/eos/reduction_reflectivity.py +++ b/eos/reduction_reflectivity.py @@ -204,11 +204,12 @@ class ReflectivityReduction: logging.info(f' monitor = {self.monitor:8.2f} {MONITOR_UNITS[self.config.experiment.monitorType]}') proj:LZProjection = self.project_on_lz() - try: - scale = self.config.reduction.scale[i] - except IndexError: - scale = self.config.reduction.scale[-1] - proj.scale(scale) + if not self.config.reduction.is_default('scale'): + try: + scale = self.config.reduction.scale[i] + except IndexError: + scale = self.config.reduction.scale[-1] + proj.scale(scale) if 'Rqz.ort' in self.config.output.outputFormats: headerRqz = self.header.orso_header()