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
Index of the electrode axis in EIT arrays. |
|
Index of the frequency axis in EIT arrays when it exists. |
|
Indices of failed FEM time samples. |
|
Whether failed EIT samples have been identified. |
|
Whether forward EIT FEM data is available. |
|
Whether recording data coming from the nerve simulation is available. |
|
Returns True if the EIT simulation was run over multiple frequencies |
|
Returns True if the injections protocole contains more than one patern. |
|
number of electrodes |
|
number of frequency point |
|
number of drive partern point |
|
number of temporal point |
|
Index of the result axis in stacked arrays. |
|
return the shape of v_eit |
|
Index of the time axis in EIT arrays. |
|
Interpolator for the EIT electrode potentials. |
|
Interpolator for recorder voltages from the nerve simulation. |
Methods
|
Build a container aggregating several forward EIT simulations. |
|
Add one or several EIT results to the list. |
|
Estimate CAP duration from thresholded differential signals. |
|
Return the voltage variation relative to the baseline sample. |
|
Return the absolute differential EIT signal normalized by its maximum. |
|
Return the percentage differential EIT signal. |
|
Compute deviations from a reference result. |
|
Create a new dictionary with keys from iterable and values set to value. |
|
Return the value for key if key is in the dictionary, else default. |
|
Detect activity masks independently for each acquisition line. |
|
Return the CAP summary table with voltage metrics for all results. |
|
Build a CAP timing table for all stored results. |
|
Build a CAP table with voltage metrics for all stored results. |
|
Return CAP time-index groups for one or several results. |
|
Return global CAP index limits matching a dataframe query. |
Detect the global CAP window on the most responsive electrode. |
|
|
Extract a signal restricted to the detected CAP time window. |
|
Extract differential EIT traces described by a CAP dataframe. |
|
Build index arrays including the stacked result axis. |
Build a dataframe summarizing CAPs detected on recorder traces. |
|
|
Retrieve one signal family from the stacked result set. |
|
Convert a pair of time indices into a duration. |
|
Import recorder traces from a nerve simulation result. |
|
Return broadcasting indices ready for |
|
Load serialized EIT results into the current object. |
|
Compute the mean signal across the selected results. |
|
Plot stored or interpolated EIT-related signals. |
|
If the key is not found, return the default if given; otherwise, raise a KeyError. |
Remove and return a (key, value) pair as a 2-tuple. |
|
|
Return indices of results matching a query. |
|
Select results whose metadata matches a query. |
|
Insert key with a value of default if key is not in the dictionary. |
|
Compute the standard deviation across the selected results. |
|
Return the FEM time vector, optionally resampled. |
|
If E is present and has a .keys() method, then does: for k in E: 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] |
Refresh the cached CAP dataframe with voltage-derived metrics. |
|
Replace entries previously marked as failed. |
|
|
Return baseline EIT voltages for the selected stacked results. |
|
Return EIT voltages, either at stored or interpolated times. |
|
Extract raw stored EIT voltages using index-based selection. |
|
Return recorder voltages from the nerve simulation. |