Tools to manipulate Neo objects.
elephant.neo_tools.
extract_neo_attrs
(obj, parents=True, child_first=True, skip_array=False, skip_none=False)[source]¶Given a neo object, return a dictionary of attributes and annotations.
Parameters: | obj : neo object parents : bool, optional
child_first : bool, optional
skip_array : bool, optional
skip_none : bool, optional
|
---|---|
Returns: | dict
|
elephant.neo_tools.
get_all_epochs
(container)[source]¶Get all neo.Epoch objects from a container.
The objects can be any list, dict, or other iterable or mapping containing epochs, as well as any neo object that can hold epochs: neo.Block and neo.Segment.
Containers are searched recursively, so the objects can be nested (such as a list of blocks).
Parameters: | container : list, tuple, iterable, dict, neo Block, neo Segment
|
---|---|
Returns: | list
|
elephant.neo_tools.
get_all_events
(container)[source]¶Get all neo.Event objects from a container.
The objects can be any list, dict, or other iterable or mapping containing events, as well as any neo object that can hold events: neo.Block and neo.Segment.
Containers are searched recursively, so the objects can be nested (such as a list of blocks).
Parameters: | container : list, tuple, iterable, dict, neo Block, neo Segment
|
---|---|
Returns: | list
|
elephant.neo_tools.
get_all_spiketrains
(container)[source]¶Get all neo.Spiketrain objects from a container.
The objects can be any list, dict, or other iterable or mapping containing spiketrains, as well as any neo object that can hold spiketrains: neo.Block, neo.ChannelIndex, neo.Unit, and neo.Segment.
Containers are searched recursively, so the objects can be nested (such as a list of blocks).
Parameters: | container : list, tuple, iterable, dict,
|
---|---|
Returns: | list
|