nrv.fmod

Description

FIELD Models - fmod: handles extracellular field models.

fmod hosts the code to compute extracellular electrical fields and quantities. Such quantity can result from both:

  • electrical stimulation, handled by injecting stimulation current waveforms on electrodes. Associated computations can be performed using analitical approach (fast but relying on strong hypotheses), or using Finite Element models,

  • the activity of the cells. In this second case, computations are for the moment only performed with an analitical approach.

Finite Elements solver can be chosen between COMSOL (requieres extra license, this is not the recommended choice and is maintained only for comparison with existing results in the litterature) and FenicsX. This last solution is fully open source and should be preferred. In this case, geometries are meshed using GMSH. All FEM computations are handled by a subpackage called FEM (seel below).

Note

for scientific details of how nmod works and an overview of the general implementation, refer to the ‘Scientific foundations’ section of the documentation.

Subpackages

FEM

NeuRon Virtualizer, large scale modeling of Peripheral Nervous System with random stimulation waveforms

Classes

material()

a class for material, where all the physical properties constants are stored.

electrode([ID])

Objet for generic electrode description.

point_source_electrode([x, y, z, ID])

Point source electrode.

FEM_electrode(label[, ID])

Electrode located in Finite Element Model in Comsol

LIFE_electrode([label, D, length, x_shift, ...])

Longitudinal IntraFascicular Electrode for FEM models

CUFF_electrode([label, contact_length, ...])

CUFF electrode for FEM models

CUFF_MP_electrode([label, N_contact, ...])

MultiPolar CUFF electrode for FEM models

extracellular_context()

extracellular_context is a class to handle the computation of the extracellular voltage field induced by the electrical stimulation.

stimulation([material])

Stimulation object are designed to connect all other objects requierd to analyticaly compute the external potential voltage for axons : - the material surrounding the axon (only one) - a list of electrode(s) - a list of corresponding current stimuli This class inherits from extracellular_context.

FEM_stimulation([model_fname, endo_mat, ...])

FEM_based_simulation object are designed to connect all other objects required to compute the external potential voltage for axons using FEM :

recording_point([x, y, z, ID, method])

Object equivalent to a point source electrode for extracellular potential recording only (No stimulation)

recorder([material])

Object for recording extracellular potential of axons.

Functions

is_FEM_electrode(elec)

Check if the electrode is a FEM based electrode

is_CUFF_electrode(elec)

Check if the electrode is a LIFE electrode

is_LIFE_electrode(elec)

Check if the electrode is a LIFE electrode

is_analytical_electrode(elec)

Check if the electrode is an analytical based electrode

is_extra_stim(test_stim)

check if an object is a stimulation, return True if yes, else False

is_analytical_extra_stim(test_stim)

check if an object is a stimulation (analytical only), return True if yes, else False

is_FEM_extra_stim(test_stim)

check if an object is a FEM stimulation, return True if yes, else False

is_mat(mat)

check if an object is a material, return True if yes, else False

is_recording_point(point)

Check if the specified object is a recording point

is_recorder(rec)

Check if the specified object is a recorder

load_any_electrode(data)

return any kind of electrod context properties from a dictionary or a json file

load_any_extracel_context(data)

return any kind of extracellular context properties from a dictionary or a json file

load_material(f_material)

Load a material by its name.

check_electrodes_overlap(elec1, elec2)

check if two FEM electrodes are overlaping

get_mat_file_as_dict(fname)

Open .mat material librairy file and return all lines as a dictionnary

compute_effective_conductivity(sigma, ...)

return the effective conductivity of the material.

NodeD_interpol(diameter)

Compute the MRG Node diameters