Simulators¶
- class dendrotweaks.simulators.NeuronSimulator(temperature=37, v_init=-70, dt=0.025, cvode=False)[source]¶
Bases:
Simulator
A class to represent the NEURON simulator.
- Parameters:
temperature (float) – The temperature of the simulation in Celsius.
v_init (float) – The initial membrane potential of the neuron in mV.
dt (float) – The time step of the simulation in ms.
cvode (bool) – Whether to use the CVode variable time step integrator.
- temperature¶
The temperature of the simulation in Celsius.
- Type:
float
- v_init¶
The initial membrane potential of the neuron in mV.
- Type:
float
- dt¶
The time step of the simulation in ms.
- Type:
float
- property recordings¶
- property t¶
- add_recording(sec, loc, var='v')[source]¶
Add a recording to the simulator.
- Parameters:
sec (Section) – The section to record from.
loc (float) – The location along the normalized section length to record from.
var (str) – The variable to record. Default is ‘v’ (voltage).
- remove_recording(sec, loc, var='v')[source]¶
Remove a recording from the simulator.
- Parameters:
sec (Section) – The section to remove the recording from.
loc (float) – The location along the normalized section length to remove the recording from.
- run(duration=300)[source]¶
Run a simulation.
- Parameters:
duration (float) – The duration of the simulation in milliseconds.
- to_dict()[source]¶
Convert the simulator to a dictionary.
- Returns:
A dictionary representation of the simulator.
- Return type:
dict
- from_dict(data)[source]¶
Create a simulator from a dictionary.
- Parameters:
data (dict) – The dictionary representation of the simulator.
- plot_currents(**kwargs)¶
Plot the recorded currents.
- plot_var(var='v', ax=None, segments=None, **kwargs)¶
- plot_voltage(**kwargs)¶
Plot the recorded voltages.