diff --git a/snudda/neurons/neuron_model_extended.py b/snudda/neurons/neuron_model_extended.py index 198633b0d..721be3aed 100644 --- a/snudda/neurons/neuron_model_extended.py +++ b/snudda/neurons/neuron_model_extended.py @@ -243,11 +243,14 @@ def define_parameters(self, parameter_config, parameter_id=None, parameter_key=N bounds=bounds, value=value)) elif param_config['type'] in ['section', 'range']: + if param_config['dist_type'] == 'uniform': scaler = ephys.parameterscalers.NrnSegmentLinearScaler() elif param_config['dist_type'] in ['exp', 'distance']: scaler = ephys.parameterscalers.NrnSegmentSomaDistanceScaler(distribution=param_config['dist']) - + else: + raise ValueError(f"Unknown dist_type = {param_config['dist_type']}, " + f"expected 'uniform', 'exp' or 'distance'") # 2024-07-23: Updated format, so that "sectionlist" is allowed to be either a string (of one section type) # or a list of strings with section types.