Skip to content

Commit 071bbab

Browse files
committed
Update documentation
1 parent 3ccdd6c commit 071bbab

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

User-Manual/Recording-data/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,16 @@ <h3>Synchronizer<a class="headerlink" href="#synchronizer" title="Permalink to t
576576
<img alt="View of the synchronizer interface" src="../../_images/recordnode-05.png" />
577577
<p>Once the synchronizer has been configured, starting data acquisition will automatically start the synchronizer. Each sync channel monitor will change from gray to orange to indicate the synchronizer is running. Once a stream has been synchronized to the main clock, the corresponding sync channel monitor will turn green.</p>
578578
<img alt="View of the record node when synchronized" src="../../_images/recordnode-06.png" />
579+
</section>
580+
</section>
581+
<section id="aligning-continuous-and-event-data">
582+
<h2>Aligning continuous and event data<a class="headerlink" href="#aligning-continuous-and-event-data" title="Permalink to this heading">#</a></h2>
583+
<p>Within a given data stream, events and/or spikes can be aligned to samples in the continuous data by finding the index at which the sample numbers match. For example, if the continuous data sample numbers range from 100 to 1000, a TTL event that occurred at sample number 500, would be aligned with the 400th sample in the continuous data. The same principle applies to spikes. The matching index can also be found by subtracting the first continuous data sample number from the event’s sample number. Using the stream start sample numbers found in <code class="code docutils literal notranslate"><span class="pre">sync_messages.txt</span></code> is no longer recommended for this, as it is less accurate.</p>
584+
<p>In order to align events and continuous data from different streams, these streams must be synchronized first. If data streams have been synchronized online, the timestamps can be used without modification, as these represent global times in seconds. Since different streams are likely sampled at slightly different times, a method such as <code class="code docutils literal notranslate"><span class="pre">numpy.searchsorted</span></code> should be used to find the continuous data timestamp that most closely matches that of the event.</p>
585+
<p>If the streams were not synchronized online, they can be synchronized offline assuming all streams share at least one event line in common. See the <a class="reference internal" href="../../Tutorials/Data-Synchronization.html#datasynchronization"><span class="std std-ref">Synchronizing Data Streams</span></a> tutorial for more information about synchronizing data streams.</p>
579586
<div class="toctree-wrapper compound">
580587
</div>
581588
</section>
582-
</section>
583589
</section>
584590

585591

@@ -640,6 +646,7 @@ <h3>Synchronizer<a class="headerlink" href="#synchronizer" title="Permalink to t
640646
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#synchronizer">Synchronizer</a></li>
641647
</ul>
642648
</li>
649+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#aligning-continuous-and-event-data">Aligning continuous and event data</a></li>
643650
</ul>
644651
</nav></div>
645652

_sources/User-Manual/Recording-data/Binary-format.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,5 @@ Reading data in Matlab
133133
#######################
134134

135135
* Use the `open-ephys-matlab-tools` <https://github.com/open-ephys/open-ephys-matlab-tools>`__ library.
136+
137+

_sources/User-Manual/Recording-data/index.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ Once the synchronizer has been configured, starting data acquisition will automa
126126
.. image:: ../../_static/images/recordingdata/recordnode-06.png
127127
:alt: View of the record node when synchronized
128128

129+
Aligning continuous and event data
130+
####################################
131+
132+
Within a given data stream, events and/or spikes can be aligned to samples in the continuous data by finding the index at which the sample numbers match. For example, if the continuous data sample numbers range from 100 to 1000, a TTL event that occurred at sample number 500, would be aligned with the 400th sample in the continuous data. The same principle applies to spikes. The matching index can also be found by subtracting the first continuous data sample number from the event's sample number. Using the stream start sample numbers found in :code:`sync_messages.txt` is no longer recommended for this, as it is less accurate.
133+
134+
In order to align events and continuous data from different streams, these streams must be synchronized first. If data streams have been synchronized online, the timestamps can be used without modification, as these represent global times in seconds. Since different streams are likely sampled at slightly different times, a method such as :code:`numpy.searchsorted` should be used to find the continuous data timestamp that most closely matches that of the event.
135+
136+
If the streams were not synchronized online, they can be synchronized offline assuming all streams share at least one event line in common. See the :ref:`datasynchronization` tutorial for more information about synchronizing data streams.
129137

130138
.. _NumPy: https://numpy.org/
131139
.. _Neurodata Without Borders: https://www.nwb.org/

objects.inv

38 Bytes
Binary file not shown.

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)