emodel_generalisation.model.bpopt

Module with overloaded things from bluepyopt.

Functions

check_recordings(recordings, icell, sim)

Returns a list of valid recordings (where the variable is in the location).

get_i_membrane(isection)

Look for i_membrane in a location.

get_loc_currents(isection)

Get all overall currents available in a location.

get_loc_ions(isection)

Get all ion concentrations available in a location.

get_loc_varlist(isection)

Get all possible variables in a location.

Classes

BPEMProtocol([name, stimulus, recordings, ...])

Base protocol

FixedDtRecordingCustom([name, location, ...])

Recording that can be checked, with recording every 0.1 ms.

LooseDtRecordingCustom([name, location, ...])

Recording that can be checked, but that do not records at fixed dt.

ProtocolRunner(protocols[, name])

Meta-protocol in charge of running the other protocols in the correct order

ProtocolWithDependencies([dependencies, ...])

To add to a protocol to specify that it depends on the responses of other protocols

RMPProtocol(name, location, target_voltage)

Protocol consisting of a step of amplitude zero

ReboundBurst([name, stimulus, recordings, ...])

Protocol for rebound bursting of thalamic cells.

ResponseDependencies([dependencies])

To add to a protocol to specify that it depends on the responses of other protocols

RinProtocol(name, location, target_rin[, ...])

Protocol used to find the input resistance of a model

SearchHoldingCurrent(name, location[, ...])

Protocol used to find the holding current of a model

SearchThresholdCurrent(name, location[, ...])

Protocol used to find the threshold current (rheobase) of a model

ThresholdBasedProtocol([name, stimulus, ...])

Protocol having rheobase-rescaling capabilities.

eFELFeatureBPEM(name[, efel_feature_name, ...])

eFEL feature extra

class emodel_generalisation.model.bpopt.BPEMProtocol(name=None, stimulus=None, recordings=None, cvode_active=None, stochasticity=False)

Bases: SweepProtocol

Base protocol

instantiate(sim=None, cell_model=None)

Check recordings, then instantiate.

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Run protocol

stim_start()

Time stimulus starts

class emodel_generalisation.model.bpopt.FixedDtRecordingCustom(name=None, location=None, variable='v')

Bases: LooseDtRecordingCustom

Recording that can be checked, with recording every 0.1 ms.

instantiate(sim=None, icell=None)

Instantiate recording.

class emodel_generalisation.model.bpopt.LooseDtRecordingCustom(name=None, location=None, variable='v')

Bases: CompRecording

Recording that can be checked, but that do not records at fixed dt.

instantiate(sim=None, icell=None)

Instantiate recording.

property response

Return recording response. Turn current densities into currents.

class emodel_generalisation.model.bpopt.ProtocolRunner(protocols, name='ProtocolRunner')

Bases: Protocol

Meta-protocol in charge of running the other protocols in the correct order

compute_execution_order()

Compute the execution order of the protocols by taking into account their dependencies

run(cell_model, param_values, sim=None, isolate=None, timeout=None)

Run protocol

class emodel_generalisation.model.bpopt.ProtocolWithDependencies(dependencies=None, name=None, stimulus=None, recordings=None, cvode_active=None, stochasticity=False)

Bases: BPEMProtocol, ResponseDependencies

To add to a protocol to specify that it depends on the responses of other protocols

class emodel_generalisation.model.bpopt.RMPProtocol(name, location, target_voltage, stimulus_duration=500.0)

Bases: BPEMProtocol

Protocol consisting of a step of amplitude zero

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Compute the RMP

class emodel_generalisation.model.bpopt.ReboundBurst(name=None, stimulus=None, recordings=None, cvode_active=None, stochasticity=False)

Bases: BPEMProtocol

Protocol for rebound bursting of thalamic cells.

get_holding_current_from_voltage(voltage, cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None, max_depth=10)

Run bisection search to get holding current that match holding voltage.

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Run protocol

class emodel_generalisation.model.bpopt.ResponseDependencies(dependencies=None)

Bases: object

To add to a protocol to specify that it depends on the responses of other protocols

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Run protocol

set_attribute(attribute, value)

Set an attribute of the class based on the name of the attribute. Also handles the case where the name is of the form: attribute.sub_attribute

class emodel_generalisation.model.bpopt.RinProtocol(name, location, target_rin, amp=-0.02, stimulus_delay=500.0, stimulus_duration=500.0, totduration=1000.0)

Bases: ProtocolWithDependencies

Protocol used to find the input resistance of a model

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Compute the Rin

class emodel_generalisation.model.bpopt.SearchHoldingCurrent(name, location, target_voltage=None, voltage_precision=0.1, stimulus_duration=1000.0, upper_bound=0.2, lower_bound=-0.2, strict_bounds=True, max_depth=7, no_spikes=True)

Bases: BPEMProtocol

Protocol used to find the holding current of a model

Do bisection search to find holding current

get_voltage_base(holding_current, cell_model, param_values, sim, isolate, timeout=None)

Calculate voltage base for a certain holding current

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Run protocol

class emodel_generalisation.model.bpopt.SearchThresholdCurrent(name, location, target_threshold=None, current_precision=0.01, stimulus_delay=500.0, stimulus_duration=2000.0, stimulus_totduration=3000.0, max_threshold_voltage=-30, spikecount_timeout=50, max_depth=10, no_spikes=True)

Bases: ProtocolWithDependencies

Protocol used to find the threshold current (rheobase) of a model

Do bisection search to find threshold current.

define_search_bounds(cell_model, param_values, sim, isolate, responses)

Define the bounds and check their validity

max_threshold_current()

Find the current necessary to get to max_threshold_voltage

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Run protocol

class emodel_generalisation.model.bpopt.ThresholdBasedProtocol(name=None, stimulus=None, recordings=None, cvode_active=None, stochasticity=False)

Bases: ProtocolWithDependencies

Protocol having rheobase-rescaling capabilities. When using ThresholdBasedProtocol, the current amplitude and step amplitude of the stimulus will be ignored and replaced by values obtained from the holding current and rheobase of the cell model respectively.

run(cell_model, param_values=None, sim=None, isolate=None, timeout=None, responses=None)

Run protocol

emodel_generalisation.model.bpopt.check_recordings(recordings, icell, sim)

Returns a list of valid recordings (where the variable is in the location).

class emodel_generalisation.model.bpopt.eFELFeatureBPEM(name, efel_feature_name=None, recording_names=None, stim_start=None, stim_end=None, exp_mean=None, exp_std=None, threshold=None, stimulus_current=None, comment='', interp_step=None, double_settings=None, int_settings=None, string_settings=None)

Bases: eFELFeature

eFEL feature extra

calculate_bpo_feature(responses)

Return internal feature which is directly passed as a response

calculate_bpo_score(responses)

Return score for bpo feature

calculate_feature(responses, raise_warnings=False)

Calculate feature value

calculate_score(responses, trace_check=False)

Calculate the score

emodel_generalisation.model.bpopt.get_i_membrane(isection)

Look for i_membrane in a location.

emodel_generalisation.model.bpopt.get_loc_currents(isection)

Get all overall currents available in a location.

emodel_generalisation.model.bpopt.get_loc_ions(isection)

Get all ion concentrations available in a location.

emodel_generalisation.model.bpopt.get_loc_varlist(isection)

Get all possible variables in a location.