biophysics_fittingutils

utils

Utility functions for biophysics fitting.

This module contains utilities and convenience methods for: - Selection sections - Reading out Vm at a section - Multiprocessing

Classes

Undemonize

A class used to resolve AssertionError: daemonic processes are not allowed to have children

VariableThatDoesNotGetPickled

A variable that does not get pickled.

Functions

connected_to_structure_beyond(cell, sec, beyond_dist, beyond_struct, n_children_required)

Checks if a Cell section is connected to a structure

get_inner_sec_dist_dict(cell, beyond_dist, beyond_struct, n_children_required)

Get sections that connect to specific structures beyond a minimum distance.

get_inner_section_at_distance(cell, dist, beyond_dist, beyond_struct)

Get sections that connect to specific structures at a particular distance.

get_main_bifurcation_section(cell)

Get the main bifurcation section of a cell

augment_cell_with_detailed_labels(cell)

Augment section labels to discriminate the tuft, oblique, trunk and basal dendrites.

tVec(cell)

Convenience method to convert a py:attr:~single_cell_parser.cell.Cell.tVec to a numpy array.

vmSoma(cell)

Convenience method to extract the soma voltage trace from a cell

vmMax(cell)

Calculate the maximum voltage of a cell at any timepoint, at any dendrite.

vmApical(cell, dist)

Fetch the membrane voltage of the apical dendrite at a certain distance from the soma.

vmApical_position(cell, dist)

Fetch the exact location on the apical dendrite at a certain distance from the soma.

run_cloudpickled_remotely(queue)

Unserialize a function and its arguments, run it, and serialize the output.

execute_in_child_process(fun)

Execute a function in a child process.

pool_helper(callable_partial)

Unserialize a function and its arguments, run it, and serialize the output.

execute_in_child_process_kept_alive(fun)

Execute a function in a child process, keeping the process alive.