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

LED doesn't turn on for the first frame for triggered recordings #19

Open
wmau opened this issue Sep 9, 2020 · 3 comments
Open

LED doesn't turn on for the first frame for triggered recordings #19

wmau opened this issue Sep 9, 2020 · 3 comments

Comments

@wmau
Copy link

wmau commented Sep 9, 2020

This is a minor complaint but it looks like it takes a frame or two for the LED to turn on once the recording has been triggered by an external source, so the first frame is black. Currently I can work around this by manually turning on the LED via the GUI slider after enabling external triggering.

@daharoni
Copy link
Member

daharoni commented Sep 9, 2020

I hadn't thought about this but makes sense. New commands sent to a Miniscope are only executed at the end of each frame. The software toggles on recording and sends the command to turn on the LED at the same time. The first recorded frame is sent from the Miniscope before the Miniscope executes the command to turn on the LED.

I will modify the code to throw out received frames before the LED command is sent and executed. Does this seem like a good solution?

@daharoni
Copy link
Member

daharoni commented Sep 9, 2020

Another reason for the delay is the DAQ only sends the external trigger state to the software at the end of each frame acquisition.

I guess the proper way of handling all this is to handle triggering the LED and recording in the DAQ hardware and not in the software. This is a little bit trickier to implement but I will try to get around to it sometime soon.

@wmau
Copy link
Author

wmau commented Sep 11, 2020

Either of those sound like fine solutions, though the second one sounds ideal. It is also not a huge deal because I can similarly throw out the first frame during post-processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants