emodelrunner.protocols.protocols_func

Protocol-related functions.

Functions

check_for_forbidden_protocol(protocols_dict)

Check for unsupported protocol.

get_extra_recording_location(...[, ...])

Get the location for the extra recording.

get_recordings(protocol_name, ...[, ...])

Get recordings from protocol definition.

Classes

CurrentOutputKeyMixin()

Contains methods useful for multiple Protocol classes.

class emodelrunner.protocols.protocols_func.CurrentOutputKeyMixin[source]

Bases: object

Contains methods useful for multiple Protocol classes.

curr_output_key()[source]

Get the output key for current based on the one for voltage.

Returns

str used as key in current dict

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

Exception – 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
  • Exception – if the recording definition “type” is “somadistanceapic” and apical_point_isec is -1.

  • Exception – 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