sample_nerve_results

nrv.eit.utils.sample_nerve_results(results: nerve_results, n_pts: int, alpha: float = 0.001, t_iclamp: float = 1, d_iclamp: float = 0.2, keys_to_sample='g_mem') nerve_results[source]

Samples specific keys from nerve simulation results at selected time points.

Note

By contrast with the sample_keys()-function, this one must be call after the nerve simulation on the whole nerve_results.

Parameters:
  • results (nerve_results) – The nerve simulation results object containing axon population properties and results.

  • n_pts (int) – Number of time points to sample from the results.

  • alpha (float, optional) – Threshold parameter used for sample index selection (default is 0.001).

  • t_iclamp (float, optional) – Time of current clamp onset in milliseconds (default is 1).

  • d_iclamp (float, optional) – Duration of current clamp in milliseconds (default is 0.2).

  • keys_to_sample (str or list of str, optional) – Keys of the results to sample (default is “g_mem”).

Returns:

The updated nerve_results object with sampled keys at selected time points.

Return type:

nerve_results

Note

This function modifies the input results object in place by sampling the specified keys for each axon at the selected time indices.