get_samples_index
- nrv.eit.utils.get_samples_index(results: nerve_results, n_pts: int, alpha: float = 0.001, t_iclamp: float = 1, d_iclamp: float = 0.2, n_pts_min=None) ndarray[source]
Selects sample indices from nerve simulation results to achieve adaptative sampling along the arc length of the signal.
Note
For now, the sampling indexes are computed from the analytical recorder’s variation, i.e. proximity between indexes is proportionnal to the time derivative of the recoeder’s values.
Warning
In future version, the previous note might be extended to the global variation of conductivity in axons’ membrane in the nerve (instead of only analytical recorder).
- Parameters:
results (nerve_results) – The results object containing simulation recordings and time points.
n_pts (int) – The desired number of sample points.
alpha (float, optional) – Regularization parameter for arc length calculation (default is 0.001).
t_iclamp (float, optional) – Start time of the current clamp artifact to be removed (default is 1).
d_iclamp (float, optional) – Duration of the current clamp artifact to be removed (default is 0.2).
n_pts_min (int, optional) – Minimum number of sample points to return. If not specified, defaults to n_pts.
- Returns:
Array of indices corresponding to selected sample points, distributed homogeneously along the arc length of the signal.
- Return type:
np.ndarray
Note
Removes the effect of current clamp artifact from the signal before sampling.