jaxley.morphology.morph_connect#
- morph_connect(module_view1, module_view2)[source]#
Combines two morphologies into a single cell.
Both morphologies must have the same number of compartments per branch in all branches.
This function deletes all existing recordings, stimuli, trainable parameters, and channels.
- Parameters:
module_view1 – View of a
jx.Cell(). Must have been created with a command ending onloc(0.0)orloc(1.0). For example, the following are valid:cell.branch(0).loc(0.0),cell.branch(5).loc(0.0),cell.branch(5).loc(1.0). But those are not valid:cell.branch(0).comp(0)(uses.comp),cell.branch(5).loc(0.9)(does not useloc(0.0)orloc(1.0)).module_view2 – The view of a
jx.Cell(). Must follow the same rules asmodule_view1.
- Returns:
A
jx.Cellwhich is made up of both input cells.- Return type:
Example usage#
cell = jx.read_swc("path_to_swc_file.swc", ncomp=1) stub = jx.Cell() cell = morph_connect(cell.branch(0).loc(0.0), stub.branch(0).loc(0.0))