morphio 2.5.0__tar.gz → 2.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {MorphIO-2.5.0 → MorphIO-2.5.1}/MorphIO.egg-info/PKG-INFO +1 -1
- {MorphIO-2.5.0 → MorphIO-2.5.1}/MorphIO.egg-info/SOURCES.txt +2 -1
- {MorphIO-2.5.0 → MorphIO-2.5.1}/PKG-INFO +1 -1
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/morphologyHDF5.cpp +8 -5
- MorphIO-2.5.1/tests/data/h5/v2/no-metadata.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_3_h5.py +21 -14
- {MorphIO-2.5.0 → MorphIO-2.5.1}/.clang-format +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/.github/workflows/clang_format_check.yaml +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/.github/workflows/publish-sdist-wheels.yml +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/.github/workflows/run-tests.yml +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/.gitignore +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/.gitmodules +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/.travis.yml +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/3rdparty/CMakeLists.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/CHANGLOG.md +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/CMake/CompilerFlags.cmake +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/CMake/MorphIOConfig.cmake +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/CMakeLists.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/CONTRIBUTING.md +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/COPYING +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/COPYING.LESSER +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/MANIFEST.in +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/MorphIO.egg-info/dependency_links.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/MorphIO.egg-info/not-zip-safe +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/MorphIO.egg-info/requires.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/MorphIO.egg-info/top_level.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/README.md +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/CMakeLists.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_enums.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_immutable.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_immutable.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_misc.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_misc.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_mutable.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_mutable.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_vasculature.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bind_vasculature.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bindings_utils.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/bindings_utils.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/binds/python/morphio.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/ci/check_clang_format.sh +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/ci/cpp_test.sh +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/ci/python_test.sh +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/doc/BBPLOGO350.jpg +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/doc/specification.md +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/doc/specification_neurolucida.md +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/examples/getting_started.ipynb +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/examples/getting_started_mutable.ipynb +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/enums.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/errorMessages.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/exceptions.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/glial_cell.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mito_section.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mitochondria.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/morphology.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/endoplasmic_reticulum.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/glial_cell.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/mito_section.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/mitochondria.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/modifiers.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/morphology.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/section.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/soma.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/mut/writers.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/properties.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/section.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/section_base.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/section_base.tpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/section_iterators.hpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/shared_utils.tpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/soma.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/tools.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/types.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/vasc/iterators.hpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/vasc/properties.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/vasc/section.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/vasc/vasculature.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/vector_types.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/include/morphio/version.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/morphio/__init__.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/morphio/mut/__init__.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/morphio/vasculature/__init__.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/scripts/check-clang-format-all +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/setup.cfg +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/setup.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/CMakeLists.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/enums.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/errorMessages.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/glial_cell.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mito_section.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mitochondria.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/morphology.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/endoplasmic_reticulum.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/glial_cell.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/mito_section.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/mitochondria.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/modifiers.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/morphology.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/section.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/soma.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/mut/writers.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/properties.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/lex.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/morphologyASC.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/morphologyASC.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/morphologyHDF5.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/morphologySWC.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/morphologySWC.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/utilsHDF5.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/vasculatureHDF5.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/readers/vasculatureHDF5.h +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/section.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/soma.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/vasc/properties.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/vasc/section.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/vasc/vasculature.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/vector_utils.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/src/version.cpp.in +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/CMakeLists.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/__init__.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/contrib/catch.hpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/astrocyte.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/circle_contour.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/complexe.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/disconnected_neurite.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/merged.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/Neuron.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/endoplasmic-reticulum.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/mitochondria.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/monodim.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/simple-broken-section-type.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/simple-negative-section-type.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/simple.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/soma_no_neurites.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v1/two_child_unmerged.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/v2/Neuron.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/vasculature-broken-section-type.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/vasculature1.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/h5/vasculature2.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/iterators.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/mono-type.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/multiple_point_section.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/multiple_soma.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/nested_single_children.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/neurite_wrong_root_point.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/nrn-order-already-sorted.h5 +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/nrn_ordering.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/reversed_NRN_neurite_order.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/simple.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/simple.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/simple2.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/soma_cylinders.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/soma_multiple_frustums.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/soma_single_frustum.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/soma_three_points_cylinder.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/spine.asc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/data/three_point_soma.swc +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/main.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/requirement_tests.txt +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_0_API.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_10_vasculature.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_1_swc.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_2_neurolucida.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_4_immut.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_5_mut.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_6_writers.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_7_modifiers.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_8_all_morphologies.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_9_surfaces.py +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/test_morphology.cpp +0 -0
- {MorphIO-2.5.0 → MorphIO-2.5.1}/tests/utils.py +0 -0
|
@@ -141,6 +141,8 @@ void MorphologyHDF5::_resolveV1() {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
bool MorphologyHDF5::_readV11Metadata() {
|
|
144
|
+
uint32_t family;
|
|
145
|
+
|
|
144
146
|
try {
|
|
145
147
|
HighFive::SilenceHDF5 silence;
|
|
146
148
|
const auto metadata = _group.getGroup(_g_metadata);
|
|
@@ -151,12 +153,8 @@ bool MorphologyHDF5::_readV11Metadata() {
|
|
|
151
153
|
if (version[0] != 1 || version[1] != 1)
|
|
152
154
|
return false;
|
|
153
155
|
|
|
154
|
-
_properties._cellLevel._version = MORPHOLOGY_VERSION_H5_1_1;
|
|
155
|
-
|
|
156
156
|
const auto familyAttr = metadata.getAttribute(_a_family);
|
|
157
|
-
uint32_t family;
|
|
158
157
|
familyAttr.read(family);
|
|
159
|
-
_properties._cellLevel._cellFamily = static_cast<CellFamily>(family);
|
|
160
158
|
} catch (const HighFive::GroupException&) {
|
|
161
159
|
return false;
|
|
162
160
|
} catch (const HighFive::Exception& e) {
|
|
@@ -166,6 +164,8 @@ bool MorphologyHDF5::_readV11Metadata() {
|
|
|
166
164
|
throw morphio::RawDataError("Error reading morphology " + _uri + " metadata." + e.what());
|
|
167
165
|
}
|
|
168
166
|
|
|
167
|
+
_properties._cellLevel._version = MORPHOLOGY_VERSION_H5_1_1;
|
|
168
|
+
_properties._cellLevel._cellFamily = static_cast<CellFamily>(family);
|
|
169
169
|
_resolveV1();
|
|
170
170
|
return true;
|
|
171
171
|
}
|
|
@@ -176,8 +176,10 @@ bool MorphologyHDF5::_readV2Metadata() {
|
|
|
176
176
|
const auto root = _group.getGroup(_g_root);
|
|
177
177
|
const auto attr = root.getAttribute(_a_version);
|
|
178
178
|
attr.read(_properties._cellLevel._version);
|
|
179
|
-
if (_properties.version() == MORPHOLOGY_VERSION_H5_2)
|
|
179
|
+
if (_properties.version() == MORPHOLOGY_VERSION_H5_2) {
|
|
180
|
+
_properties._cellLevel._cellFamily = CellFamily::NEURON;
|
|
180
181
|
return true;
|
|
182
|
+
}
|
|
181
183
|
} catch (const HighFive::Exception&) {
|
|
182
184
|
}
|
|
183
185
|
|
|
@@ -185,6 +187,7 @@ bool MorphologyHDF5::_readV2Metadata() {
|
|
|
185
187
|
HighFive::SilenceHDF5 silence;
|
|
186
188
|
_group.getGroup(_g_root);
|
|
187
189
|
_properties._cellLevel._version = MORPHOLOGY_VERSION_H5_2;
|
|
190
|
+
_properties._cellLevel._cellFamily = CellFamily::NEURON;
|
|
188
191
|
return true;
|
|
189
192
|
} catch (const HighFive::Exception&) {
|
|
190
193
|
return false;
|
|
Binary file
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from itertools import chain, repeat
|
|
3
|
+
from pathlib import Path
|
|
3
4
|
|
|
5
|
+
from morphio import (CellFamily, Morphology, MorphologyVersion, RawDataError, SectionType,
|
|
6
|
+
ostream_redirect)
|
|
4
7
|
from nose.tools import assert_equal, assert_raises
|
|
5
8
|
from numpy.testing import assert_array_equal
|
|
6
9
|
|
|
7
|
-
from
|
|
8
|
-
ostream_redirect)
|
|
9
|
-
from . utils import captured_output
|
|
10
|
+
from .utils import captured_output
|
|
10
11
|
|
|
11
|
-
_path =
|
|
12
|
-
H5_PATH =
|
|
13
|
-
H5V1_PATH =
|
|
14
|
-
H5V2_PATH =
|
|
12
|
+
_path = Path(os.path.dirname(os.path.abspath(__file__)), "data")
|
|
13
|
+
H5_PATH = Path(_path, 'h5')
|
|
14
|
+
H5V1_PATH = Path(H5_PATH, 'v1')
|
|
15
|
+
H5V2_PATH = Path(H5_PATH, 'v2')
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
def test_v1():
|
|
18
|
-
n = Morphology(
|
|
19
|
+
n = Morphology(H5V1_PATH / 'simple.h5')
|
|
19
20
|
assert_equal(len(n.root_sections), 2)
|
|
20
21
|
assert_equal(n.root_sections[0].type, 3)
|
|
21
22
|
assert_equal(n.root_sections[1].type, 2)
|
|
22
23
|
|
|
23
|
-
n = Morphology(
|
|
24
|
+
n = Morphology(H5V1_PATH / 'Neuron.h5')
|
|
24
25
|
assert_equal(n.version, MorphologyVersion.MORPHOLOGY_VERSION_H5_1)
|
|
25
26
|
|
|
26
27
|
assert_equal(len(n.sections), 84)
|
|
@@ -47,15 +48,15 @@ def test_v1():
|
|
|
47
48
|
|
|
48
49
|
def test_wrong_section_type():
|
|
49
50
|
with assert_raises(RawDataError) as cm:
|
|
50
|
-
Morphology(
|
|
51
|
+
Morphology(H5V1_PATH / 'simple-broken-section-type.h5')
|
|
51
52
|
assert_equal(str(cm.exception).strip(), 'Unsupported section type: 9')
|
|
52
53
|
|
|
53
54
|
with assert_raises(RawDataError) as cm:
|
|
54
|
-
Morphology(
|
|
55
|
+
Morphology(H5V1_PATH / 'simple-negative-section-type.h5')
|
|
55
56
|
assert_equal(str(cm.exception).strip(), 'Unsupported section type: -2')
|
|
56
57
|
|
|
57
58
|
def test_v2():
|
|
58
|
-
n = Morphology(
|
|
59
|
+
n = Morphology(H5V2_PATH / 'Neuron.h5')
|
|
59
60
|
assert_equal(n.version, MorphologyVersion.MORPHOLOGY_VERSION_H5_2)
|
|
60
61
|
|
|
61
62
|
|
|
@@ -66,9 +67,15 @@ def test_v2():
|
|
|
66
67
|
assert_equal(len(list(n.iter())), 85)
|
|
67
68
|
assert_equal(len(n.points), 926)
|
|
68
69
|
assert_equal(len(n.sections), 85)
|
|
70
|
+
assert_equal(n.cell_family, CellFamily.NEURON)
|
|
71
|
+
|
|
72
|
+
def test_v2_without_cellfamily_info():
|
|
73
|
+
'''This H5v2 cell has no metadata but we check that the correct CellFamily type is set'''
|
|
74
|
+
n = Morphology(H5V2_PATH / 'no-metadata.h5')
|
|
75
|
+
assert_equal(n.cell_family, CellFamily.NEURON)
|
|
69
76
|
|
|
70
77
|
def test_soma_no_neurite():
|
|
71
|
-
n = Morphology(
|
|
78
|
+
n = Morphology(H5V1_PATH / 'soma_no_neurites.h5')
|
|
72
79
|
|
|
73
80
|
assert_array_equal(n.soma.points,
|
|
74
81
|
[[ 0., 0., 0.],
|
|
@@ -83,5 +90,5 @@ def test_soma_no_neurite():
|
|
|
83
90
|
def test_single_children():
|
|
84
91
|
with captured_output() as (_, _):
|
|
85
92
|
with ostream_redirect(stdout=True, stderr=True):
|
|
86
|
-
neuron = Morphology(
|
|
93
|
+
neuron = Morphology(H5V1_PATH / 'two_child_unmerged.h5')
|
|
87
94
|
assert_equal(len(list(neuron.iter())), 3)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|