diff --git a/libeos/options.py b/libeos/options.py index 950989d..e98bead 100644 --- a/libeos/options.py +++ b/libeos/options.py @@ -335,16 +335,14 @@ class ReductionConfig(ArgParsable): 'help': '(list of) scaling factors, if less elements than files use the last one', }, ) - # TODO: This made no sense, it is used as single bool. - autoscale: bool = False - #autoscale: Tuple[float, float] = field( - # default_factory=lambda: [None, None], - # metadata={ - # 'short': 'S', - # 'group': 'data manicure', - # 'help': '', - # }, - # ) + autoscale: Tuple[float, float] = field( + default=None, + metadata={ + 'short': 'S', + 'group': 'data manicure', + 'help': '', + }, + ) subtract: Optional[str] = field( default=None, metadata={ @@ -359,7 +357,7 @@ class ReductionConfig(ArgParsable): 'group': 'input data', 'help': 'file number(s) of normalisation measurement'}) timeSlize: Optional[List[float]] = field( - default_factory=lambda: [None], + default= None, metadata={ 'short': 'ts', 'group': 'region of interest', diff --git a/libeos/reduction.py b/libeos/reduction.py index d6c9ff1..cf37ed0 100644 --- a/libeos/reduction.py +++ b/libeos/reduction.py @@ -95,7 +95,7 @@ class AmorReduction: lamda_e = self.file_reader.lamda_e detZ_e = self.file_reader.detZ_e self.monitor = np.sum(self.file_reader.monitorPerPulse) - logging.warning(f' monitor = {self.monitor:8.2f} {self.MONITOR_UNITS[self.experiment_config.monitorType]}') + logging.warning(f' monitor = {self.monitor:8.2f} {MONITOR_UNITS[self.experiment_config.monitorType]}') qz_lz, qx_lz, ref_lz, err_lz, res_lz, lamda_lz, theta_lz, int_lz, self.mask_lz = self.project_on_lz( self.file_reader, self.norm_lz, self.normAngle, lamda_e, detZ_e) #if self.monitor>1 : @@ -211,7 +211,7 @@ class AmorReduction: detZ_e = self.file_reader.detZ_e[filter_e] filter_m = np.where((time