Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions neuroshare/NeuralEntity.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from .Entity import Entity


class NeuralEntity(Entity):
"""Entity the represents timestamps of action potentials, i.e. spike times.
"""
Entity represent timestamps of action potentials, i.e. spike times.
Cutouts of the waveforms corresponding to spike data in a neural entity
might be found in a separate :class:`SegmentEntity` (cf. :func:`source_entity_id`).
"""
Expand All @@ -16,21 +16,27 @@ def probe_info(self):

@property
def source_entity_id(self):
"""[*Optional*] Id of the source entity of this spike, if any.
"""
[*Optional*] Id of the source entity of this spike, if any.
For example the spike waveform of the action potential corresponding
to this spike might have been recorded in a segment entity."""
to this spike might have been recorded in a segment entity.
"""
return self._info['SourceEntityID']

@property
def source_unit_id(self):
"""[*Optional*] unit id used in the source entity
(cf. :func:`source_entity_id`)"""
"""
[*Optional*] unit id used in the source entity
(cf. :func:`source_entity_id`)
"""
return self._info['SourceUnitID']

def get_data(self, index=0, count=-1):
"""Retrieve the spike times associated with this entity. A subset
"""
Retrieve the spike times associated with this entity. A subset
of the data can be requested via the ``index`` and ``count``
parameters."""
parameters.
"""
lib = self.file.library
if count < 0:
count = self.item_count
Expand Down