The Python scripts in this repository can be used to generate figures illustrating the capabilities of the Python Peripheral Nerve Simulator: PyPNS.
This scientific software is released under the GNU Public License GPLv3.
The compiled mod files need to be present in the main directory. See readme of PyPNS.
Extrapolation of parameters of the myelinated axon model of McIntyre et al. 2002 [1].
Example current time course of a myelinated and an unmyelinated axon.
Potential profile caused by a current point source in a homogeneous medium, a nerve in saline and a nerve in a cuff electrode.
Single fibre action potential (SFAP) of a myelinated and an unmyelinated fibre in the three different media. Two figures are saved into the figure-directory with different resolutions.
Amplitude of SFAPs over diameter for both axon types in all three media. ...calculation
: simulate and save the SFAPs in a file to disk. ...loading
: load the simulated SFAPs and plot the curves.
Influence of cuff length on SFAP amplitude for both axon types. ...calculation
: simulate and save the SFAPs in a file to disk. ...loading
: load the simulated SFAPs and plot the curves.
Compute the compound action potential (CAP) of a stimulated rat vagus nerve. Takes long to calculate. The bundle length electrodeDistance
and the number of axons nAxons
can be reduced to speed things up.
Spectrum of the CAP computed in figure 10 for both axon types compared to an experimental recording.
Matlab scripts to generate direction change distributions observed in mouse vagus and sciatic nerves and distributions from Gaussian and uniform distributions as an input to the axon placing algorithm implemented in PyPNS.
Example axons as generated by PyPNS.
SFAPs from tortuous axons are generated and compared in terms of similarity.
Activation of axons in an extracellularly stimulated nerve at different degrees of tortuosity is computed and displayed. ...calculation
: a dictionary of activation ratios is generated and saved. ...loading
: a previously generated dictionary can be selected and the activation is displayed over stimulation current amplitudes and degrees of tortuosity.
[1] McIntyre, C C, A G Richardson, and W M Grill (2002). “Modeling the excitability of mammalian nerve fibers: Influence of afterpotentials on the recovery cycle.” Journal of Neurophysiology 87.2, pp. 995–1006.