sims¶
Module for running simulations (propagation, ITD, etc.) on MSO models.
- compute_propagation_test_difference(rec_site, synapse, func, which='voltage', **kwargs)[source]¶
Compute the difference between rec_site and synapse data using a provided function.
Parameters¶
- rec_sitedict
Dictionary containing ‘maxv’, ‘maxt’, and ‘restv’ for the recording site.
- synapsedict
Dictionary containing ‘maxv’, ‘maxt’, and ‘restv’ for the synapse.
- funcfunction
Function to apply to the max voltage or time values.
- whichstr, optional
Specifies whether to compute for ‘voltage’ or ‘time’. Default is ‘voltage’.
- **kwargsdict
Additional keyword arguments to pass to the function.
Returns¶
- section_data: list
List of computed values for section based on the provided function.
- find_compensated_cond(cell, seg, maxv, desired_maxv, original_gmax=0.005, tolerance=0.1, resting_potential=-61.7, recursion_limit=20, recursion_count=0)[source]¶
Recursively adjusts synaptic conductance (gmax) to achieve a desired max voltage.
Parameters¶
- cellCell
The cell instance to use for the simulation.
- segSegment
The segment where the synapse is located.
- maxvfloat
The maximum voltage recorded from the initial simulation.
- desired_maxvfloat
The target maximum voltage to achieve.
- original_gmaxfloat, optional
The initial conductance value to start with. Default is 0.005.
- tolerancefloat, optional
The acceptable error range for the maximum voltage. Default is 0.1.
- resting_potentialfloat, optional
The resting potential of the cell. Default is -61.7.
- recursion_limitint, optional
The maximum number of recursive calls allowed. Default is 20.
- recursion_countint, optional
The current recursion depth. Default is 0.
Returns¶
- new_gmax: float
The adjusted conductance value that achieves the desired maximum voltage.
- indiv_syn_test(cell, synapse_list, rec_section, gmax=0.01)[source]¶
Activates each synapse individually in a given list and, for each synapse, records the max voltages and time at those voltages at the recording site and the synapse site
Parameters¶
- cell: Cell
Cell instance to pull stabilization_time variable to use.
- synapse_list: list[Exp2Syn]
list of synapse NEURON point processes to activate.
- rec_section: Section
Section to record from for the non-synapse compartment measurements. Records from center of given section.
Returns¶
- recordings: dict
Dictionary with keys ‘rec_site’ and ‘syn’, each containing dicts for ‘maxv’, ‘maxt’, and ‘restv’.
- itd_test_sweep(cell, offset_sections, stable_sections, innervation_pattern, axon_speed=1, cycles=1, interval=1, exc_fiber_gmax=0.037, inhibition=False, inh_timing=-0.32, inh_fiber_gmax=0.022, threshold=25, relative_threshold=True, record_axon=False, itd_vals=None, traces=False, **kwargs)[source]¶
Perform ITD (Interaural Time Difference) tests on a given cell.
Parameters¶
- cellCell
The cell instance to be tested. : list
- offset_sectionslist
List of polar branches for the first section.
- stable_sectionslist
List of polar branches for the second section.
- innervation_patternstr
Pattern for innervation (‘random’, ‘total’).
- axon_speedfloat, optional
The speed of axonal propagation (in m/s). Default is 1.
- cyclesint, optional
The number of netstim cycles. Default is 1.
- intervalfloat, optional
The time between netstim cycles. Default is 1.
- exc_fiber_gmaxfloat, optional
The maximum conductance for excitatory fibers. Default is 0.037.
- inhibitionbool, optional
Whether to include inhibition in the test. Default is False.
- inh_timingfloat, optional
The delay for inhibition (in ms). Default is -0.32.
- inh_fiber_gmaxfloat, optional
The maximum conductance for inhibitory fibers. Default is 0.022.
- thresholdfloat, optional
The threshold for spike detection. Default is 0.
- relative_thresholdbool, optional
Whether to use a threshold relative to cell’s resting potential. Default is True.
- record_axonbool, optional
Whether to record axonal activity. Default is False.
- itd_valslist, optional
List of ITD values to test. Default is None.
- tracesbool, optional
Whether to record traces. Default is False.
- syn_spacefloat, optional
Space between each synapse in a group. Ignored if innervation_pattern is ‘total’.
- num_synint, optional
Number of synapses in each group. Ignored if innervation_pattern is ‘total’.
- num_fiberint, optional
Number of axon fibers (or synapse groups) innervating each list. Ignored if innervation_pattern is ‘total’.
Returns¶
- results
Results of the ITD test sweep {spike_counts, traces, itd_vals}.
- propagation_test(cell, section_list, **kwargs)[source]¶
Tests synapses at every segment and returns time at max depolarization.
Parameters¶
- cell: Cell
Cell instance to pass to syntest_max_voltage
- section_list: list[Section]
sectionlist (from Cell instance) to place synapses on
Returns¶
- list[dict[str, dict[str, list[float]]]]
List of dictionaries containing max voltage and time data for each section.