emodelrunner.protocols.protocols_func¶
Protocol-related functions.
Functions
|
Check for unsupported protocol. |
|
Get the location for the extra recording. |
|
Get recordings from protocol definition. |
Classes
Contains methods useful for multiple Protocol classes. |
- class emodelrunner.protocols.protocols_func.CurrentOutputKeyMixin[source]¶
Bases:
object
Contains methods useful for multiple Protocol classes.
- emodelrunner.protocols.protocols_func.check_for_forbidden_protocol(protocols_dict)[source]¶
Check for unsupported protocol.
- Parameters:
protocols_dict (dict) – contains all protocols to be run
- Raises:
ValueError – If a protocol that should only be used with MainProtocol is present in protocols_dict
- emodelrunner.protocols.protocols_func.get_extra_recording_location(recording_definition, apical_point_isec=-1)[source]¶
Get the location for the extra recording.
- Parameters:
recording_definition (dict) – contains the extra recording configuration data
apical_point_isec (int) – apical point section index. Should be given if the recording definition “type” is “somadistanceapic”
- Raises:
ValueError – if the recording definition “type” is “somadistanceapic” and apical_point_isec is -1.
ValueError – if the ‘type’ in the recording definition is neither “somadistance”, nor “somadistanceapic”, nor “nrnseclistcomp”
- Returns:
location of the extra recording
- emodelrunner.protocols.protocols_func.get_recordings(protocol_name, protocol_definition, prefix, apical_point_isec=-1)[source]¶
Get recordings from protocol definition.
- Parameters:
protocol_name (str) – name of the protocol
protocol_definition (dict) – dict containing the protocol data
prefix (str) – prefix used in naming responses, features, recordings, etc.
apical_point_isec (int) – apical point section index Should be given if there is “somadistanceapic” in “type” of at least one of the extra recording definition
- Returns:
list of RecordingCustom