Skip to content

Commit

Permalink
Merge pull request #36 from anjaldoshi/latency-histogram-docs
Browse files Browse the repository at this point in the history
Add Latency histogram docs
  • Loading branch information
jsiegle authored Jan 18, 2024
2 parents 1d8a0a2 + 28ae6b3 commit 90ce883
Show file tree
Hide file tree
Showing 6 changed files with 722 additions and 3 deletions.
7 changes: 6 additions & 1 deletion source/Tutorials/How-To-Make-Your-Own-Plugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,18 @@ When you're finished, the file should look like this:

|
Next, rename the source files:
Next, rename the source files to match the name of your plugin

* :code:`ProcessorPlugin.h` --> :code:`TTLEventGenerator.h`
* :code:`ProcessorPlugin.cpp` --> :code:`TTLEventGenerator.cpp`
* :code:`ProcessorPluginEditor.h` --> :code:`TTLEventGeneratorEditor.h`
* :code:`ProcessorPluginEditor.cpp` --> :code:`TTLEventGeneratorEditor.cpp`

and update the class names inside each file to match the new names:

* :code:`ProcessorPlugin` --> :code:`TTLEventGenerator`
* :code:`ProcessorPluginEditor` --> :code:`TTLEventGeneratorEditor`

Finally, update the include inside :code:`OpenEphysLib.cpp` from :code:`#include "ProcessorPlugin.h"` to :code:`#include "TTLEventGenerator.h"`.

Compiling your plugin
Expand Down
53 changes: 53 additions & 0 deletions source/User-Manual/Plugins/Latency-Histogram.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. _latencyhistogram:
.. role:: raw-html-m2r(raw)
:format: html


#########################
Latency Histogram
#########################

.. image:: ../../_static/images/plugins/latencyhistogram/latencyhistogram-01.png
:alt: Annotated Latency Histogram interface


.. csv-table:: Displays latencies between events on two TTL lines as a histogram.
:widths: 18, 80

"*Plugin Type*", "Sink"
"*Platforms*", "Windows, Linux, macOS"
"*Built in?*", "No"
"*Key Developers*", "Josh Siegle"
"*Source Code*", "https://github.com/open-ephys-plugins/latency-histogram"


Installing and upgrading
==========================

The Latency Histogram plugin is not included by default in the Open Ephys GUI. To install, use **ctrl-P** or **⌘P** to open the Plugin Installer, browse to the "Latency Histogram" plugin, and click the "Install" button.

The Plugin Installer also allows you to upgrade to the latest version of this plugin, if it's already installed.


Plugin configuration
======================

The following parameters can be modified in the plugin editor:

- **TTL A** - The event line to use as the first reference.
- **TTL B** - The event line to use as the second reference.

The following actions can be performed inside the Histogram view by right-clicking anywhere inside the view.

- **Clear** - Clears the histogram display and its values
- **Save values** - Saves the histogram statistics to a JSON file

Plugin usage
======================

Select the two TTL event lines for which you want to calculate the latency. The histogram will display the latency between the two TTL lines in milliseconds. The histogram will be updated in real time as events are received. You can see the count of any bin and the range of that bin by hovering over the respective histogram bar. You can clear the plot at any time by right-clicking inside the plot and selecting "Clear". You can also save the histogram statistics to a JSON file by right-clicking inside the plot and selecting "Save values".

|


2 changes: 1 addition & 1 deletion source/User-Manual/Plugins/Network-Events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ TTL Events

The primary purpose of the Network Events module is to add TTL events to one or more of the GUI's data streams via a remote connection. This makes it straightforward to store event times and trigger outputs from external software, such as Python or Matlab scripts.

:code:`TTL [Line=0-255] [State=0/1]` – Sends an **ON** (1) or **OFF** (0) TTL event on the specified TTL line.
:code:`TTL [Line=1-256] [State=0/1]` – Sends an **ON** (1) or **OFF** (0) TTL event on the specified TTL line.

Other commands
---------------
Expand Down
3 changes: 2 additions & 1 deletion source/User-Manual/Plugins/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Officially supported Filter plugins: :ref:`bandpassfilter`, :ref:`channelmap`, :

**Sinks** send data to an external source, such as a display, stimulator, etc., without altering the underlying data streams. Data should pass through Sinks unchanged.

Officially supported Sink plugins: :ref:`arduinooutput`, :ref:`datasnapshot`, :ref:`eventbroadcaster`, :ref:`falconoutput`, :ref:`lfpviewer`, :ref:`multibandintegrator`, :ref:`onlinepsth`, :ref:`probeviewer`,:ref:`pulsepal`, :ref:`riveroutput`, :ref:`spectrumviewer`, :ref:`spikeviewer`, :ref:`zmqinterface`
Officially supported Sink plugins: :ref:`arduinooutput`, :ref:`datasnapshot`, :ref:`eventbroadcaster`, :ref:`falconoutput`, :ref:`latencyhistogram`, :ref:`lfpviewer`, :ref:`multibandintegrator`, :ref:`onlinepsth`, :ref:`probeviewer`, :ref:`pulsepal`, :ref:`riveroutput`, :ref:`spectrumviewer`, :ref:`spikeviewer`, :ref:`zmqinterface`

**Utilities** perform miscellaneous functions related to the signal chain.

Expand Down Expand Up @@ -140,6 +140,7 @@ To remove a plugin, simply click the "Uninstall" button. This will delete the pl
Falcon-Output
File-Reader
Intan-RHD-USB
Latency-Histogram
LFP-Viewer
LSL-Inlet
MATLAB-Interface
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 90ce883

Please sign in to comment.