corrected scaling default value and scaling behavior
This commit is contained in:
+1
-1
@@ -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',
|
||||
|
||||
+3
-3
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user