def test_point_to_section_end(): cell = tested.get_NRN_cell(SIMPLE) assert (tested.point_to_section_end(cell.icell.all, [-8, 10, 0]) == 6) assert (tested.point_to_section_end(cell.icell.all, [-8, 10, 2]) == None) assert (tested.point_to_section_end(cell.icell.all, [-8, 10, 2], atol=10) == 3)
def test_point_to_section_end(): cell = tested.get_NRN_cell(SIMPLE) assert_equal(tested.point_to_section_end(cell.icell.all, [-8, 10, 0]), 6) assert_equal(tested.point_to_section_end(cell.icell.all, [-8, 10, 2]), None) assert_equal(tested.point_to_section_end(cell.icell.all, [-8, 10, 2], atol=10), 3)
def _to_be_isolated(morphology_path, point): """Convert a point position to NEURON section index and return cell name and id. Args: morphology_path (Path): path to morphology point (list/ndarray): 3d point """ cell = tested.get_NRN_cell(morphology_path) return tested.point_to_section_end(cell.icell.all, point)