FEM_stimulation
- class nrv.fmod.FEM_stimulation(model_fname=None, endo_mat='endoneurium_ranck', peri_mat='perineurium', epi_mat='epineurium', ext_mat='saline', comsol=True, Ncore=None)[source]
FEM_based_simulation object are designed to connect all other objects required to compute the external potential voltage for axons using FEM :
Shape and positon of the nerve
Shape and position of each fascicle
the materials for the FEM stimulation : endoneurium, perineurium, epineurium and external material
a list of electrode(s)
a list of corresponding current stimuli
- Parameters:
model_fname (str) – name of the comsol mph file to solve
endo_mat (str) – specification of the endoneurium material, see
material
for further detailsperi_mat (str) – specification of the perineurium material, see
material
for further detailsepi_mat (str) – specification of the epineurium material, see
material
for further detailsext_mat (str) – specification of the external material (everything but the nerve), see
material
for further details
Methods
|
Instrantiation an extracellular_context object, empty shell to store electrodes and stimuli |
|
Add a stimulation electrode and its stimulus to the stimulation, only it the electrode is FEM based. |
Change the stimulus of the ID_elec electrods |
|
clear the footprints for all electrodes from existing array |
|
Compute the footprints for all electrodes |
|
|
Compute the external potential on a array of coordinate for a time sample of all synchronised stimuli with all electrodes. |
Generic method returning all the atributes of an NRV_class instance |
|
check if a stimulation object is empty (No electrodes and stimuli, no external field can be computed). |
|
|
Load all extracellular context properties from a dictionary or a json file |
|
|
remove a fascicle of the FEM simulation |
|
|
Reshape a fascicle of the FEM simulation |
|
Reshape the nerve of the FEM simulation |
|
Reshape the size of the FEM simulation outer box |
Set materials properties, build geometry and mesh if not already done and solve the FEM model all in one. |
|
|
Return extracellular context as dictionary and eventually save it as json file |
Set the number of cores to use for the FEM |
|
set the footprints for all electrodes from existing array |
|
|
Generic method to set any attribute of |
Parameter a model with all added electrodes parameters, material parameters, build geometry and mesh |
|
Synchronise all stimuli before simulation. |
|
|
Move extracellular context electrodes by group translation |