neurom.features¶
NeuroM, lightweight and fast.
Examples
Obtain some morphometrics >>> import neurom >>> from neurom import features >>> m = neurom.load_morphology(“tests/data/swc/Neuron.swc”) >>> ap_seg_len = features.get(‘segment_lengths’, m, neurite_type=neurom.APICAL_DENDRITE) >>> ax_sec_len = features.get(‘section_lengths’, m, neurite_type=neurom.AXON)
Functions
|
Feature decorator to automatically register the feature in the appropriate namespace. |
|
Obtain a feature from a set of morphology objects. |
Classes
|
The level of morphology abstraction that feature applies to. |
- class neurom.features.NameSpace(value)¶
The level of morphology abstraction that feature applies to.
- neurom.features.feature(shape, namespace: NameSpace, name=None)¶
Feature decorator to automatically register the feature in the appropriate namespace.
This decorator also ensures that the results of the features are casted to built-in types.
- Parameters:
shape (tuple) – the expected shape of the feature values
namespace (str) – a namespace, see
NameSpace
name (str) – name of the feature, used to access the feature via neurom.features.get().
- neurom.features.get(feature_name, obj, **kwargs)¶
Obtain a feature from a set of morphology objects.
Features can be either Neurite, Morphology or Population features. For Neurite features see
neurom.features.neurite
. For Morphology features seeneurom.features.morphology
. For Population features seeneurom.features.population
.- Parameters:
feature_name (str) – feature to extract
obj – a morphology, a morphology population or a neurite tree
kwargs – parameters to forward to underlying worker functions
- Returns:
feature value as a list or a single number.
- Return type:
List|float