emodelrunner.protocols.thalamus_protocols

Ephys protocols for the Thalamus packages.

Classes

RatSSCxMainProtocol(name[, rmp_protocol, ...])

Main protocol to fit RatSSCx neuron ephys parameters.

RatSSCxRinHoldcurrentProtocol(name[, ...])

IDRest protocol to fit RatSSCx neuron ephys parameters.

RatSSCxThresholdDetectionProtocol(name[, ...])

IDRest protocol to fit RatSSCx neuron ephys parameters.

StepProtocolCustom([name, step_stimulus, ...])

Step protocol with custom options to turn stochkv_det on or off.

StepThresholdProtocol(name[, thresh_perc, ...])

Step protocol based on threshold.

class emodelrunner.protocols.thalamus_protocols.RatSSCxMainProtocol(name, rmp_protocol=None, rmp_efeature=None, rinhold_protocol_dep=None, rinhold_protocol_hyp=None, rin_efeature_dep=None, rin_efeature_hyp=None, thdetect_protocol_dep=None, thdetect_protocol_hyp=None, other_protocols=None, pre_protocols=None)[source]

Bases: Protocol

Main protocol to fit RatSSCx neuron ephys parameters.

Pseudo code:

Find resting membrane potential Find input resistance If both of these scores are within bounds, run other protocols: - Find holding current - Find rheobase - Run IDRest - Possibly run other protocols (based on constructor arguments) - Return all the responses Otherwise return Rin and RMP protocol responses

generate_current(thres_i_hyp, thres_i_dep, holding_i_hyp, holding_i_dep, dt)[source]

Generate current for all protocols except rin and threshold detection.

Parameters
  • thres_i_hyp (float) – hyperpolarization threshold current (nA)

  • thres_i_dep (float) – depolarization threshold current (nA)

  • holding_i_hyp (float) – hyperpolarization holding current (nA)

  • holding_i_dep (float) – depolarization holding current (nA)

  • dt (float) – timestep of the generated currents (ms)

Returns

dict containing the generated currents

property rin_efeature_dep

Get in_efeature.

property rin_efeature_hyp

Get in_efeature.

run(cell_model, param_values, sim=None, isolate=None)[source]

Run protocol.

subprotocols()[source]

Return all the subprotocols contained in this protocol, is recursive.

class emodelrunner.protocols.thalamus_protocols.RatSSCxRinHoldcurrentProtocol(name, rin_protocol_template=None, voltagebase_efeature=None, holdi_estimate_multiplier=2, holdi_precision=0.1, holdi_max_depth=5, prefix=None)[source]

Bases: Protocol

IDRest protocol to fit RatSSCx neuron ephys parameters.

binsearch_holdi(holding_voltage, cell_model, param_values, sim=None, lower_bound=None, upper_bound=None, precision=None, max_depth=None, depth=1)[source]

Do binary search to find holding current.

create_rin_protocol_dep(holdi=None)[source]

Create Rin_dep protocol.

create_rin_protocol_hyp(holdi=None)[source]

Create rin_hyp protocol.

generate_current(threshold_current=None, holding_current=None, dt=0.1)[source]

Return current time series.

Parameters
  • threshold_current (float) – the threshold current (nA)

  • holding_current (float) – the holding current (nA)

  • dt (float) – timestep of the generated currents (ms)

Returns

dict containing the generated current

run(cell_model, param_values, sim, rmp=None)[source]

Run protocol.

search_holdi(cell_model, param_values, sim, holding_voltage, rin_noholding, rmp)[source]

Find the holding current to hold cell at holding_voltage.

subprotocols()[source]

Return subprotocols.

voltage_base(current, cell_model, param_values, sim=None)[source]

Calculate voltage base for certain stimulus current.

class emodelrunner.protocols.thalamus_protocols.RatSSCxThresholdDetectionProtocol(name, step_protocol_template=None, max_threshold_voltage=None, holding_voltage=None, prefix=None)[source]

Bases: Protocol

IDRest protocol to fit RatSSCx neuron ephys parameters.

binsearch_spike_threshold(cell_model, param_values, sim=None, holdi=None, lower_bound=None, upper_bound=None, precision=0.01, max_depth=5, depth=1)[source]

Do binary search to find spike threshold.

Assumption is that lower_bound has no spike, upper_bound has.

create_short_threshold_protocol(holdi=None, step_current=None)[source]

Create short threshold protocol.

create_step_protocol(holdi=0.0, step_current=0.0)[source]

Create threshold protocol.

detect_spike(cell_model, param_values, sim=None, step_current=None, holdi=None, short=False)[source]

Detect if spike is present at current level.

run(cell_model, param_values, sim, holdi, rin, rmp)[source]

Run protocol.

search_max_threshold_current(rin=None)[source]

Find the current necessary to get to max_threshold_voltage.

search_spike_threshold(cell_model, param_values, sim=None, holdi=None, lower_bound=None, upper_bound=None)[source]

Find the current step spiking threshold.

subprotocols()[source]

Return subprotocols.

class emodelrunner.protocols.thalamus_protocols.StepProtocolCustom(name=None, step_stimulus=None, holding_stimulus=None, recordings=None, cvode_active=None, stochkv_det=None)[source]

Bases: StepProtocol, CurrentOutputKeyMixin

Step protocol with custom options to turn stochkv_det on or off.

generate_current(threshold_current=None, holding_current=None, dt=0.1)[source]

Return current time series.

Parameters
  • threshold_current (float) – the threshold current (nA)

  • holding_current (float) – the holding current (nA)

  • dt (float) – timestep of the generated currents (ms)

Returns

dict containing the generated current

run(cell_model, param_values, sim=None, isolate=None, timeout=None)[source]

Run protocol.

property step_amplitude

Stimuli amplitude.

Returns

the amplitude of the step stimuli (nA)

property stim_end

Time stimulus ends.

Returns

the time at which the stimulus ends (ms)

property stim_start

Time stimulus starts.

Returns

the time at which the stimulus starts (ms)

class emodelrunner.protocols.thalamus_protocols.StepThresholdProtocol(name, thresh_perc=None, step_stimulus=None, holding_stimulus=None, recordings=None, cvode_active=None, stochkv_det=None)[source]

Bases: StepProtocolCustom

Step protocol based on threshold.

generate_current(threshold_current, holding_current, dt=0.1)[source]

Return current time series.

Parameters
  • threshold_current (float) – the threshold current (nA)

  • holding_current (float) – the holding current (nA)

  • dt (float) – timestep of the generated currents (ms)

Returns

dict containing the generated current

run(cell_model, param_values, sim=None, isolate=None, timeout=None)[source]

Run protocol.