elephant.neo_tools.get_all_epochs

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:
containerlist, tuple, iterable, dict, neo.Block, neo.Segment

The container for the epochs.

Returns:
list

A list of the unique neo.Epoch objects in container.