elephant.neo_tools.get_all_spiketrains

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

neo.ChannelIndex The container for the spiketrains.

Returns:
list

A neo.SpikeTrainList object of the unique neo.SpikeTrain objects in container.