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 cost

  • nrv.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 setting eit_forward.n_proc_nerve, eit_forward.n_proc_mesh and eit_forward.n_proc_fem).

Attributes

eit_forward.dim

Spatial dimension number of the problem.

eit_forward.fem_res_file

File where the fem results are saved

eit_forward.i_drive_A

Injected current in A

eit_forward.inj_protocol

Injection protocole.

eit_forward.is_multi_patern

Check if the injection protocol contains more than one pattern.

eit_forward.n_e

Number of electrodes.

eit_forward.n_f

Number of frequency step in the EIT simulation.

eit_forward.n_p

Number of injection paterns in the protocol.

eit_forward.n_t

Number of time step in the EIT simulation.

eit_forward.nerve_mesh_file

File where the nerve mesh is saved

eit_forward.nerve_res_file

File where the nerve simulation results are saved

eit_forward.timers_dict

Duration of all the simulations

eit_forward.x_bounds_fem

x bounds of the nerve section over which FEM is simulated

eit_forward.i_drive

current amplitude injected in uA.

eit_forward.use_backup

if true simulation resutls are save on the fligth

Methods

eit_forward.__init__(nervedata[, res_dname, ...])

Initialize the EIT forward simulation class.

eit_forward.build_mesh([with_axons])

Create the mesh for FEM simulation.

eit_forward.clear()

Clear all simulations outputs.

eit_forward.clear_fem_res()

Clear FEM results and reset result file.

eit_forward.get_nproc([which])

return the number of process of a given simualtion step

eit_forward.get_parameters()

Generic method returning all the atributes of an NRV_class instance

eit_forward.load(data[, blacklist])

Generic loading method for NRV_class instance

eit_forward.rerun_failed_steps([...])

Rerun failed FEM simulation steps.

eit_forward.run_all_fem(task_info)

Run the FEM simulation for all time step of a given task (process).

eit_forward.run_and_savefem(sfile[, ...])

Compute only a few time step of the EIT simulation and save the computed electric field in the whole domain

eit_forward.run_fem(task_info)

Run the FEM simulation for all time step of a given task (process).

eit_forward.run_fem_1core(task_info)

eit_forward.save([save, fname, blacklist])

Generic saving method for NRV_class instance.

eit_forward.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

eit_forward.simulate_eit([save, sim_list])

Run the eit problem for all time steps

eit_forward.simulate_nerve([t_start, ...])

Simulate the neural context: fibres conductivity and extracellular context.

eit_forward.simulate_recording([t_start, ...])

Simulate the neural context: fibres conductivity and extracelullar context.

eit_forward.v_shape()

Get the shape of the voltage results array.