Fix issue with scaling factor in time slicing if no -s option was given
Unit Testing / test (3.10) (push) Successful in 54s
Unit Testing / test (3.11) (push) Successful in 53s
Unit Testing / test (3.8) (push) Successful in 52s
Unit Testing / test (3.12) (push) Successful in 56s
Unit Testing / test (3.9) (push) Successful in 58s

This commit is contained in:
2026-07-09 16:27:23 +02:00
parent eec3d337ff
commit 738c937f65
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -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',
+6 -6
View File
@@ -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()