eit_results_list

class nrv.eit.results.eit_results_list(dt: float | None = 0.001, t_sim: float | None = None, results: list[eit_forward_results] | eit_forward_results | str = None, include_rec: bool = False)[source]

Container for multiple EIT forward simulation results, enabling batch analysis, comparison, and post-processing.

This class extends eit_forward_results to handle a list of EIT results, providing unified access to temporal, electrode, frequency, and protocol axes across all simulations. It supports adding results from files, objects, or lists, and offers methods for filtering, slicing, and statistical analysis.

Parameters:
  • dt (float, optional) – Time step for resampling all results (default: 0.001).

  • t_sim (float or None, optional) – Total simulation time. If None, inferred from first result.

  • results (list of eit_forward_results, eit_forward_results, or str, optional) – Initial results to add (can be a list, single object, or filename).

  • include_rec (bool, optional) – If True, include analytical nerve recordings in the container.

Note

  • Results can be added from files, objects, or lists, and are automatically resampled to a common time axis.

  • Provides batch post-processing and statistical analysis tools for EIT simulations.

  • CAP detection and analysis methods are extended to handle multiple results.

  • Useful for comparing different simulation conditions, protocols, or geometries.

Example

>>> res_list = eit_results_list(dt=0.001)
>>> res_list.add_results([res1, res2, res3])
>>> mean_v = res_list.mean(which="v_eit")
>>> cap_times = res_list.get_cap_i_t(thr=0.1)
>>> error = res_list.error(which="v_eit", i_res_ref=0)

Attributes

eit_results_list.e_axis

Index of the electrode axis in EIT arrays.

eit_results_list.f_axis

Index of the frequency axis in EIT arrays when it exists.

eit_results_list.fail_results

Indices of failed FEM time samples.

eit_results_list.has_failed_test

Whether failed EIT samples have been identified.

eit_results_list.has_fem_res

Whether forward EIT FEM data is available.

eit_results_list.has_nerve_res

Whether recording data coming from the nerve simulation is available.

eit_results_list.is_multi_freqs

Returns True if the EIT simulation was run over multiple frequencies

eit_results_list.is_multi_patern

Returns True if the injections protocole contains more than one patern.

eit_results_list.n_e

number of electrodes

eit_results_list.n_f

number of frequency point

eit_results_list.n_p

number of drive partern point

eit_results_list.n_t

number of temporal point

eit_results_list.r_axis

Index of the result axis in stacked arrays.

eit_results_list.shape

return the shape of v_eit

eit_results_list.t_axis

Index of the time axis in EIT arrays.

eit_results_list.v_eit_interp

Interpolator for the EIT electrode potentials.

eit_results_list.v_rec_interp

Interpolator for recorder voltages from the nerve simulation.

Methods

eit_results_list.__init__([dt, t_sim, ...])

Build a container aggregating several forward EIT simulations.

eit_results_list.add_results(results[, ...])

Add one or several EIT results to the list.

eit_results_list.cap_duration([alpha, ...])

Estimate CAP duration from thresholded differential signals.

eit_results_list.clear()

eit_results_list.copy()

eit_results_list.dv_eit([t, i_t, i_e, i_f, ...])

Return the voltage variation relative to the baseline sample.

eit_results_list.dv_eit_normalized([t, i_t, ...])

Return the absolute differential EIT signal normalized by its maximum.

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

Return the percentage differential EIT signal.

eit_results_list.error([which, abs_err, ...])

Compute deviations from a reference result.

eit_results_list.fromkeys(iterable[, value])

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

eit_results_list.get(key[, default])

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

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

Detect activity masks independently for each acquisition line.

eit_results_list.get_acap_ppt([thr, ...])

Return the CAP summary table with voltage metrics for all results.

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

Build a CAP timing table for all stored results.

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

Build a CAP table with voltage metrics for all stored results.

eit_results_list.get_cap_i_t([thr, i_res])

Return CAP time-index groups for one or several results.

eit_results_list.get_cap_i_t_lim([thr, ...])

Return global CAP index limits matching a dataframe query.

eit_results_list.get_cap_mask([thr])

Detect the global CAP window on the most responsive electrode.

eit_results_list.get_cap_res([thr, ...])

Extract a signal restricted to the detected CAP time window.

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

Extract differential EIT traces described by a CAP dataframe.

eit_results_list.get_idxs([i_res, i_t, i_e, ...])

Build index arrays including the stacked result axis.

eit_results_list.get_reccap_ppt([thr])

Build a dataframe summarizing CAPs detected on recorder traces.

eit_results_list.get_res([which, i_res, t, ...])

Retrieve one signal family from the stacked result set.

eit_results_list.i_t_duration(i_t_start, ...)

Convert a pair of time indices into a duration.

eit_results_list.incorporate_nerve_res(nerve_res)

Import recorder traces from a nerve simulation result.

eit_results_list.items()

eit_results_list.ix_([i_t, i_e, i_f, i_p, n_t])

Return broadcasting indices ready for numpy advanced indexing.

eit_results_list.keys()

eit_results_list.load(data)

Load serialized EIT results into the current object.

eit_results_list.mean([which, i_res, t, ...])

Compute the mean signal across the selected results.

eit_results_list.plot(ax[, which, t, i_t, ...])

Plot stored or interpolated EIT-related signals.

eit_results_list.pop(k[,d])

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

eit_results_list.popitem()

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

eit_results_list.res_argwhere(to_check)

Return indices of results matching a query.

eit_results_list.res_where(to_check)

Select results whose metadata matches a query.

eit_results_list.setdefault(key[, default])

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

eit_results_list.std([which, i_res, t, i_t, ...])

Compute the standard deviation across the selected results.

eit_results_list.t([dt, i_f])

Return the FEM time vector, optionally resampled.

eit_results_list.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_results_list.update_acap_inde_t_ppt([...])

Refresh the cached CAP dataframe with voltage-derived metrics.

eit_results_list.update_failed_results(...)

Replace entries previously marked as failed.

eit_results_list.v_0([i_e, i_f, i_p])

Return baseline EIT voltages for the selected stacked results.

eit_results_list.v_eit([t, i_t, i_e, i_f, i_p])

Return EIT voltages, either at stored or interpolated times.

eit_results_list.v_eit_idx([i_t, i_e, i_f, ...])

Extract raw stored EIT voltages using index-based selection.

eit_results_list.v_rec([t, i_e])

Return recorder voltages from the nerve simulation.

eit_results_list.values()