def test_total_volume_per_neurite(): vol = _nf.total_volume_per_neurite(NRN) nt.eq_(len(vol), 4) # calculate the volumes by hand and compare vol2 = [sum(_sf.section_volume(s) for s in n.iter_sections()) for n in NRN.neurites] nt.eq_(vol, vol2) # regression test ref_vol = [271.94122143951864, 281.24754646913954, 274.98039928781355, 276.73860261723024] assert_allclose(vol, ref_vol)
def test_total_volume_per_neurite(): vol = _nf.total_volume_per_neurite(NRN) assert len(vol) == 4 # calculate the volumes by hand and compare vol2 = [ sum(sectionfunc.section_volume(s) for s in n.iter_sections()) for n in NRN.neurites ] assert vol == vol2 # regression test ref_vol = [ 271.94122143951864, 281.24754646913954, 274.98039928781355, 276.73860261723024 ] assert np.allclose(vol, ref_vol)