Aharoni-Lab / Miniscope-DAQ-QT-Software

Software for streaming and controlling neural and behavioral data from freely behaving animals
GNU General Public License v3.0
116 stars 29 forks source link

TTL fails to trigger recording for Minicam #67

Open blaingvt opened 8 months ago

blaingvt commented 8 months ago

Hi,

Is there a known issue with minicam failing to trigger?

My miniscope triggers as expected but the TTL trigger does not function for stand-alone minicam for me.

I posted in the google group and a few others have reached out to me across the world with the same issue.

Best, Brenton

sneakers-the-rat commented 8 months ago

Related to: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/issues/57 , but it seems like this is is for starting and stopping a recording with an external trigger, rather than emitting a pulse for every frame acquired?

We still need to set up issue templates to prompt for this, but what version of miniscope are you using? (ordinarily i would ask what version of the software too, but i think there is only one version?)

@fnsangiul confirms this is a bug in this software, not the DAQ or miniscope firmware.

From what I can tell, it works like this:

From there we're back into the main flow of starting and stopping recordings.

I can't actually debug this since we can't compile the software at the moment, but hopefully that's some information for the next person who comes by to debug until we can do the Qt6 update, and hopefully another lab member who knows more about the software than I do hops in here!

TsungChihTsai commented 8 months ago

I appreciate your response and the information you provided regarding the debugging constraints at the moment. I understand the challenges associated with the Qt6 update.

Given that you are currently unable to compile the software, does it mean there is no opportunity to address this issue? I would greatly appreciate it if you could.

At this moment, I would like to attempt resolving this issue using an alternative approach. The version I am currently using is Miniscope-DAQ-Software_build_v1_11.

My strategy is to seek your guidance on the specific folders where I should copy the files - "backend.cpp," "controlpanel.cpp," "ControlPanel.qml," "videodevice.cpp," and "videostreamocv.cpp" - within the Miniscope-DAQ-Software_build_v1_11 directory.

Could you please advise me on which specific folders I should copy these files to?

The folders under the Miniscope-DAQ-Software_build_v1_11 folder as below:

bearer deviceConfigs iconengines imageformats platforminputcontexts platforms qmltooling Qt QtGraphicalEffects QtQml QtQuick QtQuick.2 scenegraph Scripts styles translations userConfigs virtualkeyboard pycache

I sincerely thank you for your invaluable assistance for all of us.

Best,

Tsung-Chih

sneakers-the-rat commented 8 months ago

unfortunately I can't be of much further help at the moment - I didn't write the software and am mostly trying to steward it into retirement in order to replace it. It is technically possible to compile it as-is, but you will need some very specific versions of Qt and OpenCV, you can see more in the qt project file here: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/0fecb97cca82c694b1b40dde03cd759e23ad3224/source/Miniscope-DAQ-QT-Software.pro#L74-L106

so if you get ahold of those versions of things and modify those paths you might be able to compile it from the source folder using Qt Creator (for Qt5).

The other path would be to push through the Qt6 upgrade, which is almost completed, there was just one breaking change having to do with one of the qml classes that was removed in Qt6 without clear replacement. Further info is in this issue: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/issues/61 and in the feature-repro-build branch

blaingvt commented 8 months ago

I have a miniscope v4.4, which does trigger properly. This minicam does not trigger. Helpful to know that it is not firmware.

Is there any rough estimate of Qt6 upgrade release date? I plan to use alternative cameras/software until then but hope in the long run I will be able to use these minicams.

Best, Brenton

sneakers-the-rat commented 8 months ago

AHA! OK that clarifies things a lot - i'm new-ish in this lab and thought you were just referring to your miniscope as a minicam (it is a miniature camera!), my mistake.

This issue has a clear solution then - currently the control panel's switch is only connected to Miniscope devices: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/0fecb97cca82c694b1b40dde03cd759e23ad3224/source/backend.cpp#L641

So we need that to also iterate through behavior cameras and connect the signal. Ideally the way this would work would be that each camera has its own control panel, and the "main" control panel sends a given command to all the connected devices, that way you could both have all devices work in sync as well as have some of them behave differently. For now though we can just add the behavior cams to the things that receive that signal.

Is there any rough estimate of Qt6 upgrade release date?

I don't really have one, no :. The team(s) that would be making this are currently in the midst of a (very cool) new hardware cycle, and so once they freeze some designs there I imagine they will be returning to the software side. The Qt6 transition is really almost done on https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/tree/feature-repro-build , the last remaining thing is to fix the changes in TreeView from Qt5 vs TreeView from Qt6 in the TreeViewerJSON model, I just don't personally have time at the moment to handle it

blaingvt commented 8 months ago

That sounds like exactly what would make it work and would make the Qt6 upgrade less urgent.

Are you guys able to release an updated backend file to swap in or is this something you think I should try to figure out on my end?

Either way your communication and support are greatly appreciated Johnny.

Best, Brenton

On Fri, Jan 12, 2024 at 5:11 PM Jonny Saunders @.***> wrote:

AHA! OK that clarifies things a lot - i'm new-ish in this lab and thought you were just referring to your miniscope as a minicam (it is a miniature camera!), my mistake.

This issue has a clear solution then - currently the control panel's switch is only connected to Miniscope devices: https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/0fecb97cca82c694b1b40dde03cd759e23ad3224/source/backend.cpp#L641

So we need that to also iterate through behavior cameras and connect the signal. Ideally the way this would work would be that each camera has its own control panel, and the "main" control panel sends a given command to all the connected devices, that way you could both have all devices work in sync as well as have some of them behave differently. For now though we can just add the behavior cams to the things that receive that signal.

Is there any rough estimate of Qt6 upgrade release date?

I don't really have one, no :. The team(s) that would be making this are currently in the midst of a (very cool) new hardware cycle, and so once they freeze some designs there I imagine they will be returning to the software side. The Qt6 transition is really almost done on https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/tree/feature-repro-build , the last remaining thing is to fix the changes in TreeView from Qt5 https://doc.qt.io/qt-5/qml-qtquick-controls-treeview.html vs TreeView from Qt6 https://doc.qt.io/qt-6/qml-qtquick-treeview.html in the TreeViewerJSON https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/blob/0fecb97cca82c694b1b40dde03cd759e23ad3224/source/TreeViewerJSON.qml#L4 model, I just don't personally have time at the moment to handle it

— Reply to this email directly, view it on GitHub https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/issues/67#issuecomment-1890123441, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJDGMJCUUV2EQOZKS4MEPTYOG7KHAVCNFSM6AAAAABBWUK5C2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGEZDGNBUGE . You are receiving this because you authored the thread.Message ID: @.***>

ChucklesOnGitHub commented 5 months ago

Dear @blaingvt, it might be helpful to know that the MiniCAM is supported in Bonsai, including the Sync Out and Trigger In functionality, thanks to the work of Jon Newman who developed the nodes for Miniscopes and MiniCAMs: https://github.com/open-ephys/OpenEphys.Bonsai.Miniscope

blaingvt commented 5 months ago

Thanks a bunch for sharing this information Ceci!

On Wed, Apr 24, 2024 at 5:28 AM Ceci Herbert @.***> wrote:

Dear @blaingvt https://github.com/blaingvt, it might be helpful to know that the MiniCAM is supported in Bonsai, including the Sync Out and Trigger In functionality, thanks to the work of Jon Newman who developed the nodes for Miniscopes and MiniCAMs: https://github.com/open-ephys/OpenEphys.Bonsai.Miniscope

— Reply to this email directly, view it on GitHub https://github.com/Aharoni-Lab/Miniscope-DAQ-QT-Software/issues/67#issuecomment-2074628348, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJDGMICLLASLAA45SPTBTDY66CMJAVCNFSM6AAAAABBWUK5C2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZUGYZDQMZUHA . You are receiving this because you were mentioned.Message ID: @.***>