Utils Module#
This module contains utility functions for setup, NMODL file handling, current generation, plotting, and type definitions.
Current Generation#
|
Create a matrix of ramp currents for multiple pools. |
|
Create a matrix of step currents for multiple pools. |
|
Create a matrix of sinusoidal currents for multiple pools. |
|
Create a matrix of sawtooth currents for multiple pools. |
|
Create a matrix of trapezoidal currents for multiple pools. |
NEURON Utilities#
Injects input currents into the specified populations. |
|
Injects input currents into populations and returns recorded spike trains. |
Continuous Saver#
|
Manages continuous saving of simulation data in chunks to prevent memory overflow. |
|
Load chunks and convert to NEO Block format (compatible with SimulationRunner output). |
Plotting & Visualization#
|
Plot spike raster plots for neural populations, one per axis. |
|
Plot membrane potential traces for selected cells across populations. |
|
Plot muscle dynamics from Hill model. |
|
Plot comparison of antagonist muscle dynamics. |
|
Plot spindle model dynamics. |
|
Plot Golgi tendon organ (GTO) dynamics. |
Type Definitions#
Quantity Types#
Physical quantity type for time in seconds. |
|
Physical quantity type for time in milliseconds. |
|
Physical quantity type for angles in radians. |
|
Physical quantity type for angles in degrees. |
|
Physical quantity type for electrical potential in millivolts. |
|
Physical quantity type for electrical potential in microvolts. |
|
Physical quantity type for electrical current in nanoamperes. |
|
Physical quantity type for electrical conductance in microsiemens. |
|
Physical quantity type for conductivity in siemens per meter. |
|
Physical quantity type for frequency in hertz. |
|
Physical quantity type for firing rate in pulses per second. |
|
Physical quantity type for length in millimeters. |
|
Physical quantity type for length in meters. |
|
Physical quantity type for area in square millimeters. |
|
Physical quantity type for density per square millimeter. |
|
Physical quantity type for velocity in meters per second. |
|
Physical quantity type for velocity in millimeters per second. |
Neo Data Types#
Neo AnalogSignal for input currents in nanoamperes with time in seconds. |
|
Neo AnalogSignal for force measurements in newtons or dimensionless units. |
|
Neo Block containing spike train data organized by motor unit pools. |
|
Neo Block containing surface motor unit action potentials (MUAPs). |
|
Neo Block containing surface EMG signals. |
|
Neo Block containing intramuscular motor unit action potentials (MUAPs). |
|
Neo Block containing intramuscular EMG signals. |
Matrix & Array Types#
2D floating-point array for cortical input patterns. |
|
1D array of recruitment threshold values for motor units. |
|
1D array representing joint angle trajectory over time. |
|
2D array of moment arms as a function of joint angle. |