nrv.ui

Description

User Interface - ui: end user pre- or post processing code

ui provides classes and functions for pre- (meshing for instance) or post-processing computations. Basic or recurent simulation encapuslated as function are also accessible.

Functions

search_threshold_dispatcher(search_func, ...)

Automatically dispatches any search threshold callable object on available cpu cores.

axon_AP_threshold(axon, amp_max, update_func)

Find the activation threshold of an axon with arbitrary stimulation settings.

axon_block_threshold(axon, amp_max, ...[, ...])

Find the block threshold of an axon with arbitrary stimulation settings.

firing_threshold_point_source(diameter, L, ...)

Find the firing threshold with point source approximation using binary search.

firing_threshold_from_axon(axon[, ...])

Find the firing threshold from a specified axon using binary search

para_firing_threshold(diameter, L, material, ...)

blocking_threshold_point_source(diameter, L, ...)

Find the blocking threshold with point source approximation using binary search.

blocking_threshold_from_axon(axon[, ...])

Find the blocking threshold with point source approximation using binary search.

para_blocking_threshold(diameter, L, ...[, ...])

remove_key(my_dict, key[, verbose])

Remove an item from a dictionary, usefull before saving files, as some results maybe heavy and are potentially useless after some steps of postprocessing.

remove_non_NoR_zones(my_dict, key)

Automatically remove values out of nodes of Ranvier for membrane voltage and associated quantities.

generate_axon_from_results(results)

generate a blank axon with the same dimensions as in the results

filter_freq(my_dict, my_key, freq[, Q])

Basic Filtering of quantities.

rasterize(my_dict, my_key[, t_start, ...])

Rasterize a membrane potential (or filtered or any quantity processed from membrane voltage), with spike detection.

AP_detection(Voltage, t, x, list_to_parse, ...)

Internal use only, spike detection just in time compiled to speed up the process

speed(my_dict[, position_key, t_start, ...])

Compute the velocity of a spike from rasterized data in a dictionary.

block(my_dict[, position_key, t_start, t_stop])

check if an axon is blocked or not.

max_spike_position(...[, spike_begin])

count_spike(onset_position)

spike counting, just in time compiled.

check_test_AP(results_sim)

Check if a test AP is correctely triggered during an axon simulation and if so return the trigger time

detect_start_extrastim(results_sim[, threshold])

Returns the starting time of extracellular stimulation from axon simulation results

extra_stim_properties(results_sim)

Return elect caracteristics (blocked, Onset response, ...)

axon_state(results_sim[, save, saving_file])

Return axon caracteristics (blocked, Onset response, ...) from axon simulation results

get_index_myelinated_sequence(results, n)

Returns the sequence

find_central_node_index(results)

Returns the index of the closer node from the center from a dictionnary results

compute_f_mem(results)

compute the cutoff frequency of the axon's membrane and add it to the simulation results dictionnary NB: The frequency is computed in [kHz]

get_myelin_properties(results)

compute the cutoff frequency of the axon's membrane and add it to the simulation results dictionnary NB: The frequency is computed in [kHz]

plot_Nav_states(ax, values[, title])

Plot the state machine for kinetic (Markov) Nav 1.1 to 1.9 values

default_PP(results)

Default postprocessing function.

rmv_keys(results[, keys_to_remove, keys_to_keep])

remove most of the results key to save computing memory.

is_recruited(results)

Evaluate if each fibre is recruited by a stimulation (see axon_results.is_recruited) and remove most of the axon_results keys to alliviate RAM usage.

is_blocked(results[, AP_start, freq, ...])

Evaluate the impact od a blocking stimulation on axon (see axon_results.block_summary) and remove most of the axon_results keys to alliviate RAM usage.

sample_g_mem(results[, t_start_rec, ...])

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

vmem_plot(results[, freq, save, fdir])

Plot and save the membrane potential along each axon of the fascicle

raster_plot(results[, freq, save, fdir])

Plot and save the raster plot along each axon of the fascicle.

ls_axons_results(dir_path)

return list of axons simulation result files

ls_csv(dir_path)

return list of axons simulation result files

rm_file(file_path[, verbose])

Delete file

rm_sim_dir(dir_path[, verbose])

Delete directory Warning: use with caution deleted files cannot be recovered

rm_sim_dir_from_results(results[, verbose])

Delete directory Warning: use with caution deleted files cannot be recovered

CAP_time_detection(Voltage, t[, t_stim, ...])

internal use, Return index in the time scale or time of the start and stop of a Compound Action Potentiel

fascicular_state(dir_path[, save, ...])

Return each axon caracteristics (blocked, Onset response, ...)

plot_fasc_state(facsicular_state, axes[, ...])

plot the fascicle in the Y-Z plane (transverse section)

mesh_from_electrode(elec[, mesh, Length, ...])

returns the corresponding mesh from a nrv.facsicle

mesh_from_extracellular_context(extracel_context)

returns the corresponding mesh from a nrv.facsicle

mesh_from_fascicle(fascicle[, mesh, Length, ...])

returns the corresponding mesh from a nrv.facsicle

mesh_from_nerve(nerve[, length, add_axons, ...])