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
18 changes: 9 additions & 9 deletions neuroshare/AnalogEntity.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

from .Entity import Entity


class AnalogEntity(Entity):
""":class:`Entity` that represents continuously sampled, i.e. digitized, analog data.
Examples are waveforms recorded via an electrode (microelectrodes, EKG, EEG).
"""
:class:Entity that represents continuously sampled, i.e. digitized, analog data.
Examples are waveform recorded via an electrode (micro-electrodes, EKG, EEG).
Actual data can be accessed via the :func:`get_data` function.
.. note:: data may contain gaps (e.g. when no data is recorded between trails)
:note:: data may contain gaps (e.g. when no data is recorded between trails)
"""
def __init__(self, nsfile, eid, info):
super(AnalogEntity, self).__init__(eid, nsfile, info)
Expand Down Expand Up @@ -92,12 +91,13 @@ def probe_info(self):
return self._info['ProbeInfo']

def get_data(self, index=0, count=-1):
"""Retrieve raw data from file starting at ``index`` up to ``count`` elements.
"""Retrieve raw data from file starting at "index" up to "count" elements.
If no parameters are given retrieves all available data.

Returns a tuple with three elements containing the raw data ``[0]``, the timestamp
of each data point ``[1]`` and how many of the data values are continuous ``[2]``.
Example use: ``data, times, count = analog1.get_data()``
Returns a tuple with three elements containing the raw data [0],
the timestamp of each data point [1] and
how many of the data values are continuous [2].
Example: data, times, count = analog1.get_data()

Raw data and timestamp data are return as :class:`numpy.ndarray`.
"""
Expand Down