eit_forward_results

class nrv.eit.results.eit_forward_results(nerve_res: nerve_results | str | dict | None = None, fem_res: dict | None = None, data: str | dict | None = None)[source]

Stores and manages the results of an Electrical Impedance Tomography (EIT) forward simulation.

This class combines outputs from both the nerve simulation and the finite element (FEM) EIT simulation, providing convenient access to time series, electrode measurements, protocol information, and post-processing tools.

Parameters:
  • nerve_res (nerve_results, str, dict, or None, optional) – Results from the nerve simulation, or a path/dictionary to load them.

  • fem_res (dict or None, optional) – Results from the FEM EIT simulation.

  • data (str or dict or None, optional) – Path or dictionary containing saved results to load.

Notes

  • This class is designed for efficient post-processing and visualization of EIT simulation results.

  • It supports multi-frequency and multi-protocol EIT simulations.

  • Failed or invalid time steps are automatically detected and can be filtered out.

  • Provides tools for CAP detection and analysis.

Examples

>>> res = eit_forward_results(nerve_res=nerve_sim, fem_res=fem_sim) # create results
>>> dv = res.dv_eit(i_e=0) # Access voltage shift of the first electrode
>>> cap_mask = res.get_cap_mask(thr=0.1)
>>> res.plot_recruited_fibers(ax)

Attributes

Methods

eit_forward_results.__init__([nerve_res, ...])

eit_forward_results.clear()

eit_forward_results.copy()

eit_forward_results.dv_eit([t, i_t, i_e, ...])

eit_forward_results.dv_eit_normalized([t, ...])

eit_forward_results.dv_eit_pc([t, i_t, i_e, ...])

eit_forward_results.fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

eit_forward_results.get(key[, default])

Return the value for key if key is in the dictionary, else default.

eit_forward_results.get_acap_mask([thr, ...])

eit_forward_results.get_acap_t_ppt([thr, ...])

eit_forward_results.get_acap_v_ppt([thr, ...])

eit_forward_results.get_cap_i_t([thr, verbose])

eit_forward_results.get_cap_mask([thr])

eit_forward_results.get_dv_from_df(data[, ...])

eit_forward_results.get_idxs([i_t, i_e, ...])

Return a tuple containing the

eit_forward_results.get_reccap_ppt([thr])

eit_forward_results.i_t_duration(i_t_start, ...)

eit_forward_results.incorporate_nerve_res(...)

eit_forward_results.items()

eit_forward_results.ix_([i_t, i_e, i_f, ...])

eit_forward_results.keys()

eit_forward_results.load(data)

eit_forward_results.plot(ax[, which, t, ...])

eit_forward_results.pop(k[,d])

If the key is not found, return the default if given; otherwise, raise a KeyError.

eit_forward_results.popitem()

Remove and return a (key, value) pair as a 2-tuple.

eit_forward_results.setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

eit_forward_results.t([dt, i_f])

eit_forward_results.update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

eit_forward_results.update_acap_inde_t_ppt([...])

eit_forward_results.update_failed_results(...)

eit_forward_results.v_0([i_e, i_f])

eit_forward_results.v_eit([t, i_t, i_e, ...])

eit_forward_results.v_eit_idx([i_t, i_e, ...])

eit_forward_results.v_rec([t, i_e])

eit_forward_results.values()