diff --git a/pes_to_spec/model.py b/pes_to_spec/model.py index aba3ee8769f7f0584c9e383bf43804c506351595..1239d71c5dd984814e00069e9596e4b22e70ba46 100644 --- a/pes_to_spec/model.py +++ b/pes_to_spec/model.py @@ -466,13 +466,13 @@ class SelectRelevantLowResolution(TransformerMixin, BaseEstimator): poly: Whether to output a polynomial expantion of the low-resolution data. """ def __init__(self, - channels:List[str]=[f"channel_{j}_{k}" - for j, k in product(range(1, 5), ["A", "B", "C", "D"])], + channels:Tuple[str]=tuple(f"channel_{j}_{k}" + for j, k in product(range(1, 5), ["A", "B", "C", "D"])), tof_start: Optional[int]=None, delta_tof: Optional[int]=300, poly: bool=False ): - self.channels = channels + self.channels = list(channels) self.tof_start = tof_start self.delta_tof = delta_tof self.poly = poly @@ -874,8 +874,8 @@ class Model(TransformerMixin, BaseEstimator): """ def __init__(self, - channels:List[str]=[f"channel_{j}_{k}" - for j, k in product(range(1, 5), ["A", "B", "C", "D"])], + channels:Tuple[str]=tuple(f"channel_{j}_{k}" for j, k in + product(range(1, 5), ["A", "B", "C", "D"])), pca_threshold: float=0.90, high_res_fwhm: float=0, tof_start: Optional[int]=None, @@ -902,7 +902,7 @@ class Model(TransformerMixin, BaseEstimator): ('unc', UncertaintyHolder()), ]) self.ood = {ch: UncorrelatedDeviation(sigma=5) - for ch in channels+['full']} + for ch in channels + ('full',)} if model_type == "bnn": self.fit_model = BNNModel(n_epochs=n_bnn_epochs) elif model_type == "bnn_rvm":