Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 7, 2024
1 parent 3ccdd6c commit 071bbab
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
9 changes: 8 additions & 1 deletion User-Manual/Recording-data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,16 @@ <h3>Synchronizer<a class="headerlink" href="#synchronizer" title="Permalink to t
<img alt="View of the synchronizer interface" src="../../_images/recordnode-05.png" />
<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>
<img alt="View of the record node when synchronized" src="../../_images/recordnode-06.png" />
</section>
</section>
<section id="aligning-continuous-and-event-data">
<h2>Aligning continuous and event data<a class="headerlink" href="#aligning-continuous-and-event-data" title="Permalink to this heading">#</a></h2>
<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>
<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>
<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>
<div class="toctree-wrapper compound">
</div>
</section>
</section>
</section>


Expand Down Expand Up @@ -640,6 +646,7 @@ <h3>Synchronizer<a class="headerlink" href="#synchronizer" title="Permalink to t
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#synchronizer">Synchronizer</a></li>
</ul>
</li>
<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>
</ul>
</nav></div>

Expand Down
2 changes: 2 additions & 0 deletions _sources/User-Manual/Recording-data/Binary-format.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ Reading data in Matlab
#######################

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


8 changes: 8 additions & 0 deletions _sources/User-Manual/Recording-data/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ Once the synchronizer has been configured, starting data acquisition will automa
.. image:: ../../_static/images/recordingdata/recordnode-06.png
:alt: View of the record node when synchronized

Aligning continuous and event data
####################################

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.

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.

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.

.. _NumPy: https://numpy.org/
.. _Neurodata Without Borders: https://www.nwb.org/
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 071bbab

Please sign in to comment.