diff --git a/eos/options.py b/eos/options.py index 10db230..7e9bd46 100644 --- a/eos/options.py +++ b/eos/options.py @@ -433,8 +433,8 @@ class ReflectivityReductionConfig(ArgParsable): metadata={ '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: [], + scale: Optional[List[float]] = field( + default=None, metadata={ 'short': 's', 'group': 'data manicure', diff --git a/eos/reduction_reflectivity.py b/eos/reduction_reflectivity.py index 413ffb6..eb49f78 100644 --- a/eos/reduction_reflectivity.py +++ b/eos/reduction_reflectivity.py @@ -310,12 +310,12 @@ class ReflectivityReduction: logging.info(f' {ti:<4d} {time:6.0f} {self.monitor:7.2f} {MONITOR_UNITS[self.config.experiment.monitorType]}') proj: LZProjection = self.project_on_lz(slice) - try: - 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) + 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) # projection on qz-grid result = proj.project_on_qz()