Skip to content

Commit

Permalink
Added error message if unknown dist_type
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Sep 27, 2024
1 parent 0c615a3 commit fe56fcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snudda/neurons/neuron_model_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit fe56fcf

Please sign in to comment.