Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit docs for new OpenEphys.Miniscope package #23

Merged
merged 3 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.1"
<WorkflowBuilder Version="2.8.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p1="clr-namespace:OpenEphys.Bonsai.Miniscope;assembly=OpenEphys.Bonsai.Miniscope"
xmlns:p1="clr-namespace:OpenEphys.Miniscope;assembly=OpenEphys.Miniscope"
xmlns:wie="clr-namespace:Bonsai.Windows.Input;assembly=Bonsai.Windows.Input"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:ipy="clr-namespace:Bonsai.Scripting.IronPython;assembly=Bonsai.Scripting.IronPython"
Expand All @@ -11,11 +11,11 @@
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:UclaMiniscopeV4">
<p1:Index>1</p1:Index>
<p1:Index>0</p1:Index>
<p1:LedBrightness>0</p1:LedBrightness>
<p1:Focus>0</p1:Focus>
<p1:SensorGain>Medium</p1:SensorGain>
<p1:FramesPerSecond>Fps15</p1:FramesPerSecond>
<p1:SensorGain>Low</p1:SensorGain>
<p1:FramesPerSecond>Fps30</p1:FramesPerSecond>
<p1:LedRespectsTrigger>false</p1:LedRespectsTrigger>
</Combinator>
</Expression>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.1"
<WorkflowBuilder Version="2.8.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p1="clr-namespace:OpenEphys.Bonsai.Miniscope;assembly=OpenEphys.Bonsai.Miniscope"
xmlns:p1="clr-namespace:OpenEphys.Miniscope;assembly=OpenEphys.Miniscope"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:UclaMiniscopeV4">
<p1:Index>0</p1:Index>
<p1:Index>3</p1:Index>
<p1:LedBrightness>0</p1:LedBrightness>
<p1:Focus>0</p1:Focus>
<p1:SensorGain>Low</p1:SensorGain>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.1"
<WorkflowBuilder Version="2.8.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p1="clr-namespace:OpenEphys.Bonsai.Miniscope;assembly=OpenEphys.Bonsai.Miniscope"
xmlns:p1="clr-namespace:OpenEphys.Miniscope;assembly=OpenEphys.Miniscope"
xmlns:cv="clr-namespace:Bonsai.Vision;assembly=Bonsai.Vision"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:io="clr-namespace:Bonsai.IO;assembly=Bonsai.System"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.1"
<WorkflowBuilder Version="2.8.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p1="clr-namespace:OpenEphys.Bonsai.Miniscope;assembly=OpenEphys.Bonsai.Miniscope"
xmlns:p1="clr-namespace:OpenEphys.Miniscope;assembly=OpenEphys.Miniscope"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:UclaMiniscopeV4">
<p1:Index>0</p1:Index>
<p1:LedBrightness>20</p1:LedBrightness>
<p1:LedBrightness>0</p1:LedBrightness>
<p1:Focus>0</p1:Focus>
<p1:SensorGain>High</p1:SensorGain>
<p1:SensorGain>Low</p1:SensorGain>
<p1:FramesPerSecond>Fps30</p1:FramesPerSecond>
<p1:LedRespectsTrigger>true</p1:LedRespectsTrigger>
<p1:LedRespectsTrigger>false</p1:LedRespectsTrigger>
</Combinator>
</Expression>
<Expression xsi:type="rx:Condition">
Expand Down
Binary file modified source/_static/images/miniscope-daq_ucla-miniscope-v4.webp
Binary file not shown.
Binary file modified source/_static/images/uclaminiscopev4-properties.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
exclude_patterns = ["includes/*.rst"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
Expand Down Expand Up @@ -198,7 +198,7 @@
"navbar_end": ["navbar-icon-links"],
"navbar_align": "content",
"footer_start": ["copyright"],
"external_links": [{"name": "Open Ephys", "url": "https://open-ephys.org"},],
"external_links": [{"name": "Open Ephys", "url": "https://open-ephys.org"},],
'icon_links': [
dict(name='GitHub',
url='https://github.com/open-ephys/miniscope-docs',
Expand Down
7 changes: 7 additions & 0 deletions source/includes/set-index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#. Set the ``Index`` value by clicking on the :kbd:`...` dropdown available at the ``Index`` field that appears in the *Properties* pane after left-clicking the ``UCLAMiniscopeV4`` node.

#. Click :kbd:`Scan` and choose from one of the indices that appear. This might take time if many physical or virtual camera devices are connected to your computer.

#. Click :kbd:`Ok`.

.. note:: If there are multiple miniscopes connected to your PC (including laptop webcams), finding the correct index value might involve an iterative trial-and-error process. Try starting the workflow now [1]_ to confirm the selected index is correct.
1 change: 1 addition & 0 deletions source/includes/start-workflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Start a workflow by left-clicking the *Start* button (indicated by green triangle) at the top of the Bonsai workflow editor or pressing ``F5`` while the Bonsai workflow editor is the active window.
21 changes: 3 additions & 18 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,9 @@
Open Ephys Miniscope Documentation
##################################

.. grid::

.. grid-item::
:columns: 5
:child-align: center

.. image:: /_static/images/uclaminiscopev4-miniscopedaq-quick.svg

.. grid-item::
:columns: 7
:child-align: center

.. image:: /_static/images/uclaminiscopev4-data-clipped.webp

******************
Miniscope Overview
******************
.. image:: /_static/images/miniscope-daq_ucla-miniscope-v4.webp
:width: 100%
:align: center

.. todo:: make the below card look more like the other cards wrt where the title starts (fix aspect ratio of card's image)

Expand Down Expand Up @@ -73,7 +59,6 @@ Miniscope Overview

.. raw:: html

<br>
<div class="card-columns">
<a class="reference internal" href="ucla-miniscope-v4/quick/index.html#getting-started"><span class="std std-ref custom-card">
<div class="card text-center intro-card">
Expand Down
4 changes: 2 additions & 2 deletions source/ucla-miniscope-v4/developer/mods/spectral.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The UCLA Miniscope v4 as sold by Open Ephys is compatible with green indicators
Standard
********

470nm (blue) LED excitation light source (`LXZ1-PB01 <https://lumileds.com/wp-content/uploads/files/DS105.pdf>`__) to image a green indicator e.g. `GCaMP6f <https://www.fpbase.org/protein/gcamp6f/>`__:
470nm (blue) LED excitation light source (`LXZ1-PB01 <https://octopart.com/datasheet/lxz1-px01-lumileds-31228818>`__) to image a green indicator e.g. `GCaMP6f <https://www.fpbase.org/protein/gcamp6f/>`__:

.. figure:: /_static/images/gcamp6f.svg
:alt: plot of emission/excitation spectra of GCaMP6f
Expand Down Expand Up @@ -38,7 +38,7 @@ The standard UCLA Miniscope v4 is sold by Open Ephys in DIY kits and already ass
Lime
****

560nm (yellow-green) LED excitation light source (`LXZ1-PX01 <https://lumileds.com/wp-content/uploads/files/DS105.pdf>`__) to image a red indicator e.g. `jRGECO1a <https://www.fpbase.org/protein/jrgeco1a/>`__:
560nm (yellow-green) LED excitation light source (`LXZ1-PX01 <https://octopart.com/datasheet/lxz1-px01-lumileds-31228818>`__) to image a red indicator e.g. `jRGECO1a <https://www.fpbase.org/protein/jrgeco1a/>`__:

.. figure:: /_static/images/jrgeco1a.svg
:alt: plot of emission/excitation spectra of jRGECO1a
Expand Down
6 changes: 3 additions & 3 deletions source/ucla-miniscope-v4/quick/software.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ If you have not already done so,
#. Configure the *Package Source* field to *All* using the drop-down menu:

.. image:: /_static/images/bonsai-package-manager-package-source-dropdown.webp
:alt: screenshot of Bonsai package manager with the Package Source drop-down higlighted
:alt: screenshot of Bonsai package manager with the Package Source drop-down highlighted
:align: center
:height: 400px

#. Download and install the required Bonsai packages:

* Bonsai.StarterPack

* OpenEphys.Miniscope.Bonsai
* OpenEphys.Miniscope

For each one, search its name in the search bar, left-click its corresponding entry, and left-click the *Install* button. For example:

.. image:: /_static/images/bonsai-starterpack.webp
:alt: screenshot of Bonsai package manager with search bar higlighted
:alt: screenshot of Bonsai package manager with search bar highlighted
:align: center
:height: 400px

Expand Down
21 changes: 9 additions & 12 deletions source/ucla-miniscope-v4/quick/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ Interact with the UCLA Miniscope v4 Through Bonsai

.. grid-item::

#. Set the ``Index`` value to 0 by editing the ``Index`` field that appears in the *Properties* pane after left-clicking the ``UCLAMiniscopeV4`` node.

#. Test the selected ``Index`` value by starting the workflow [1]_ and double left-clicking the ``Image`` node. If the displayed video stream corresponds to that of your miniscope, proceed to the next step. Otherwise, increment the ``Index`` value by 1 and repeat this step.

.. note:: A device index specifies a camera device. If there are additional cameras connected to your PC (including laptop webcams), finding the correct index value might involve an iterative trial-and-error process.
.. include:: /includes/set-index.rst

#. Start the Bonsai workflow [1]_ and test various features:

Expand All @@ -39,14 +35,14 @@ Interact with the UCLA Miniscope v4 Through Bonsai
:Image Data: Double left-click the ``Image`` node. This displays a real-time visualization of image data from the sensor. Attenuate the sensor's exposure to ambient light or try imaging a target. Confirm that the ``Image`` node visualizer comports with expectations:

.. image:: /_static/images/image-demo.webp
:alt: screenshot of Bonsai package manager with search bar higlighted
:alt: animation of demonstrating miniscope data
:align: center
:height: 400px

:Orientation Data: Double left-click the ``Quaternion`` node. This displays a real-time visualization of quarternion data which represents the miniscope's orientation. Right-click the visualization, and left-click the drop-down menu. Set the value in the ``History Length`` field to 100. Reorient the UCLA Miniscope v4. Confirm the quarternion visualization responds accordingly:

.. image:: /_static/images/quarternion-demo.webp
:alt: screenshot of Bonsai package manager with search bar higlighted
:alt: animation of demonstrating quaternion data
:align: center
:height: 400px

Expand All @@ -63,7 +59,7 @@ Interact with the UCLA Miniscope v4 Through Bonsai
:Frame Rate: Change the ``FramesPerSecond`` value by left-clicking the corresponding field’s drop-down menu located in the *Properties* pane and selecting a different option. Frame rate and exposure-duration-per-frame are inversely related, so higher frame rates produce darker images. Use this information and look at the ``Image`` node visualizer to confirm that the frame rate adjusts according to the ``FramesPerSecond`` value.

.. image:: /_static/images/fps-demo.webp
:alt: screenshot of Bonsai package manager with search bar higlighted
:alt: animation of changing miniscope fps
:align: center
:height: 400px

Expand All @@ -72,24 +68,25 @@ Interact with the UCLA Miniscope v4 Through Bonsai
:Sensor Gain: Change the ``SensorGain`` value by left-clicking the corresponding field’s drop-down menu located in the *Properties* pane and selecting a different option. Look at the ``Image`` node visualizer to confirm that the sensor's gain is adjusted according to the value of ``SensorGain`` value.

.. image:: /_static/images/gain-demo.webp
:alt: screenshot of Bonsai package manager with search bar higlighted
:alt: animation of changing miniscope gain
:align: center
:height: 400px

:Excitation Light Intensity: Change the ``LEDBrightness`` value by left-clicking the corresponding field’s drop-down menu located in the *Properties* pane and sliding the scrollbar. Confirm that the intensity of the excitation light adjusts according to the ``LEDBrightness`` value.

.. image:: /_static/images/led-demo.webp
:alt: screenshot of Bonsai package manager with search bar higlighted
:alt: animation of changing miniscope excitation light intensity
:align: center
:height: 400px

:Dynamic Focusing: Place the assembled miniscope approximately its working distance away from an imaging target (e.g. a Kimwipe). Change the ``EWL`` value by left-clicking the corresponding field’s drop-down menu located in the *Properties* pane and selecting a different option. Look at the ``Image`` node visualizer moves in-and-out according to the ``EWL`` value.

.. image:: /_static/images/focus-demo.webp
:alt: screenshot of Bonsai package manager with search bar higlighted
:alt: animation of changing miniscope focus
:align: center
:height: 400px

If the imaging target does not enter the depth of focus, try readjusting the distance of the miniscope from the imaging target and performing the test again. If the working distance does not adjust, try reassembling the EWL module according to the *Assembly* instructions and repeating this part.

.. [1] Start a workflow by left-clicking the *Start* button (indicated by green triangle) at the top of the Bonsai workflow editor or pressing ``F5`` while the Bonsai workflow editor is the active window.
.. [1]
.. include:: /includes/start-workflow.rst
Loading