open-ephys / bonsai-miniscope

Bonsai package for controlling and acquiring data from head-borne miniscopes for calcium imaging.
https://open-ephys.github.io/miniscope-docs/index.html
MIT License
0 stars 2 forks source link

issue triggering two miniscopes and a pointgrey behavioral camera at 30fps #10

Open ChucklesOnGitHub opened 4 months ago

ChucklesOnGitHub commented 4 months ago

User describes an issue getting reliable 30fps in a setup with two miniscopes and a pointgrey camera being triggered by pycontrol.

Setup: two miniscopes each connected to a BNC port of the pycontrol (BNC-1 and BNC-2). point grey camera connected to a Port (Port-1) to the same pycontrol board. In pycontrol, runs a simple task that sends a HIGH constant TTL pulse (3.3V) for all the devices. To record the videos, I am using a Bonsai workflow (attached). In this workflow, point grey, miniscope 1 and miniscope 2 are configured in a trigger mode, so when the TTL from pycontrol arrives the records start. Ideally, I aim to have the videos from all these different devices at 30FPS. But when connecting two miniscopes at once they don't reach 30 FPS, as per these tests:

1) Both miniscopes and PG camera at 30FPS --> miniscopes doesn't reach 30FPS, PG camera reaches 30FPS 2) Both miniscopes at 25FPS and PG camera at 30FPS --> both miniscopes reach 25FPS and PG camera reaches 30FPS 3) One miniscope at 30FPS and PG camera at 30FPS --> miniscope and PG reach 30FPS

Testing both miniscopes in the Miniscope-DAQ-qt software result: both reach the 30FPS when they are either in trigger mode or not, suggesting this is not a problem with the computer capacity.

Ca2+ imaging - test.zip

NataliacMadeira commented 4 months ago

I attached the csv files with the recorded timestamps of test#1. I'm using a computer with the following specs: 13th Gen Intel(R) Core(TM) i9-13900KF 3.00 GHz; RAM: 64GB

camera1_test9.csv mini_2_test92024-07-02T13_30_02.csv mini1_test92024-07-02T13_30_02.csv

jonnew commented 3 months ago

@NataliacMadeira A couple clarifying questions:

  1. "Testing both miniscopes in the Miniscope-DAQ-qt software result: both reach the 30FPS when they are either in trigger mode or not, suggesting this is not a problem with the computer capacity."
    • If you comment out (Ctrl-D) the pointgre/flycapture portion of the workflow, do the Miniscopes then function at 30 Hz?
    • Does the pointgrey camera plug into a standard USB port or a PCIe-to-USB receiver card provided by pointgrey?
  2. When you use the Miniscope GUI, do you acquire a three cameras in the GUI?
  3. Can you examine the trigger outputs in the problematic case to see if there is data loss between the DAQ and the host computer (e.g. the pin is toggling at 30 Hz) but data in the computer is going at 24.