Fix issue with scaling factor in time slicing if no -s option was given
This commit is contained in:
+2
-2
@@ -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',
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user