eit_forward
- class nrv.eit.eit_forward(nervedata, res_dname=None, label='eit_1', **parameters)[source]
Abstract base class for Electrical Impedance Tomography (EIT) forward simulation in neural contexts.
This class provides the interface and core logic for simulating EIT problems on nerve models, including nerve simulation, mesh generation, FEM problem definition, and result management. It supports multi-core parallelization, custom electrode protocols, and backup/retry mechanisms for failed simulation steps.
EIT users guide — For generic description.
Tutorial 6 — For usage description.
Note
- This class is abstract and cannot be instantiated directely. Use either:
nrv.eit.EIT3DProblem: FEM is solved in a 3D-space (Oxyz), with an extremely large computational costnrv.eit.EIT2DProblem(recommended): FEM is solved in a 2D-plan (Oyz) using apparent condictivity approximations.
Warning
For now the 2D approximation isn’t well documented. Further explaination will be added to the doc in the future.
Tip
Supports multiprocessing for large-scale simulations. Number of core can either be set for all steps (by setting
eit_forward.n_proc_global) or for each step individually (by settingeit_forward.n_proc_nerve,eit_forward.n_proc_meshandeit_forward.n_proc_fem).
Attributes
Spatial dimension number of the problem. |
|
File where the fem results are saved |
|
Injected current in A |
|
Injection protocole. |
|
Check if the injection protocol contains more than one pattern. |
|
Number of electrodes. |
|
Number of frequency step in the EIT simulation. |
|
Number of injection paterns in the protocol. |
|
Number of time step in the EIT simulation. |
|
File where the nerve mesh is saved |
|
File where the nerve simulation results are saved |
|
Duration of all the simulations |
|
x bounds of the nerve section over which FEM is simulated |
|
current amplitude injected in uA. |
|
if true simulation resutls are save on the fligth |
Methods
|
Initialize the EIT forward simulation class. |
|
Create the mesh for FEM simulation. |
Clear all simulations outputs. |
|
Clear FEM results and reset result file. |
|
|
return the number of process of a given simualtion step |
Generic method returning all the atributes of an NRV_class instance |
|
|
Generic loading method for |
Rerun failed FEM simulation steps. |
|
|
Run the FEM simulation for all time step of a given task (process). |
|
Compute only a few time step of the EIT simulation and save the computed electric field in the whole domain |
|
Run the FEM simulation for all time step of a given task (process). |
|
|
|
Generic saving method for |
|
Generic method to set any attribute of |
|
Run the eit problem for all time steps |
|
Simulate the neural context: fibres conductivity and extracellular context. |
|
Simulate the neural context: fibres conductivity and extracelullar context. |
Get the shape of the voltage results array. |