snudda.utils.cut¶
- class snudda.utils.cut.SnuddaCut(network_file, cut_equation='z>0', out_file_name=None, plot_only=False, show_plot=True)[source]¶
Cuts part of the volume, to simulate creating a slice of tissue, or other cut.
Constructor.
- Parameters
network_file (str) – Path to network file
cut_equation (str) – Cut equation, e.g. “z>0”
out_file_name (str) – Path to new network file
plot_only (bool) – Only create a plot of cut
show_plot (bool) – Show plot on screen
- filter_neurons_synapses(neuron_id, keep_flag=None, data_type='synapses')[source]¶
Filter synapse matrix, to only keep those synapses that belong to neuronID.
- Parameters
neuron_id – Neuron ID to keep
keep_flag – Which synapses are available to pick from
data_type – “synapses” or “gapJunctions”
- Returns
bool array with which synapses to keep
- Return type
keep_flag
- plot_cut(include_synapses=True, include_gap_junctions=True, show_plot=True)[source]¶
Plot the cut to verify it is what we want.
- Parameters
include_synapses (bool) – Plot synapses?
include_gap_junctions (bool) – Plot gap junctions?
show_plot (bool) – Plot, or just write to file?
- soma_inside(cut_equation_lambda)[source]¶
Check if soma are inside cut_equation_lambda. Returns a boolean numpy array.