sample_g_mem

nrv.ui.sample_g_mem(results: axon_results, t_start_rec: float = 0, t_stop_rec: float = -1, sample_dt: None | float = None, x_bounds: None | float | tuple[float] = None) axon_results[source]

Undersample the membrane coductivity (results["g_mem"]) key and remove most of the axon_results keys to alliviate RAM usage.

Note

Only the following keys kept by the fuction
  • g_mem

  • x_rec

  • rec

  • Nseg_per_sec

  • axon_path_type

  • t_sim

Parameters:
  • results (axon_results) – results of the axon simulation.

  • t_start_rec (float, optional) – Lower time at whitch g_mem should be stored, by default 0

  • t_stop_rec (float, optional) – Upper time at whitch g_mem should be stored, by default -1

  • sample_dt (None | float, optional) – Time sample rate at which g_mem should be stored if None simulation dt is kept, by default None

  • x_bounds (None | tuple[float], optional) –

    x-positions where to store g_mem, possible option:
    • float: The values of g_mem are only stored at the nearest position in x_rec.

    • tupple: g_mem values are stored for all positions included between the two boundaries.

    • None (default): g_mem values are stored for all positions.

Warning

sample_dt should be at multiple of the simulation dt to allow a correct undersampling. If the not sample_dt choosen will be the closer multiple of dt.

Returns:

updated results.

Return type:

axon_results