neurogears / vestibular-vr

Closed-loop VR setup for Rancz Lab
2 stars 0 forks source link

Provide example data files as reference #55

Closed RoboDoig closed 1 week ago

RoboDoig commented 1 month ago

For working on some of the open issues (#53 #54) it would be beneficial to have some example logged data as a reference (in particular the HARP streams).

@EleonoraAmbrad could you provide some data from a run of the Main.bonsai trial logic workflow? This will be particularly useful as a reference for Filipe when implementing direct H1 --> H2 motor control.

EleonoraAmbrad commented 1 month ago

files sent via email (link to google drive folder)

EleonoraAmbrad commented 4 weeks ago

@RoboDoig asking for advice: I am looking at the data produced by the video writer node, the csv file VideoData1_1904-01-01T00-00-00.csv It looks like there is some substantial frame loss over time? or am I interpreting things wrong? Do we need to reduce frame rate?

RoboDoig commented 4 weeks ago

Hi @EleonoraAmbrad, what in the csv file is suggesting this? Is it just the number of frames or something in the frame timestamps?

EleonoraAmbrad commented 4 weeks ago

Hi @EleonoraAmbrad, what in the csv file is suggesting this? Is it just the number of frames or something in the frame timestamps?

Value.ChunkData.FrameID: these values are consecutive until a certain point (until frame 40), but then they are not anymore. Seems like every second frame is dropped after this, but it's not consistent (sometimes more or less than this). Does not seem to be the case for the other camera.

RoboDoig commented 4 weeks ago

Also doesn't seem to be the case in the last dataset I downloaded from the google drive (2024-05-10T14-22-41). Are both cameras set at the same frame rate / exposure time?

EleonoraAmbrad commented 4 weeks ago

on that specific file not, but if you look at VideoData1_1904-01-03T23-00-00.csv it happens there as well.

Yeah the cameras have the same frame rate and exp time, but in general this shouldn't be a problem right? (they are on different triggers now). One thing that comes to mind is that I have to keep SpinView software open to set the gain, could that be an issue?

RoboDoig commented 4 weeks ago

on that specific file not, but if you look at VideoData1_1904-01-03T23-00-00.csv it happens there as well.

On which dataset?

Yeah the cameras have the same frame rate and exp time, but in general this shouldn't be a problem right? (they are on different triggers now). One thing that comes to mind is that I have to keep SpinView software open to set the gain, could that be an issue?

Keeping the software open shouldn't be an issue.

Can you reproduce the missing frames reliably? If so what happens if you swap the trigger lines for the cameras?

EleonoraAmbrad commented 4 weeks ago

on that specific file not, but if you look at VideoData1_1904-01-03T23-00-00.csv it happens there as well.

On which dataset?

Yeah the cameras have the same frame rate and exp time, but in general this shouldn't be a problem right? (they are on different triggers now). One thing that comes to mind is that I have to keep SpinView software open to set the gain, could that be an issue?

Keeping the software open shouldn't be an issue.

Can you reproduce the missing frames reliably? If so what happens if you swap the trigger lines for the cameras?

sorry, on the 2024-05-10T14-20-05. I don't think the loss can be reliably reproduced because these recordings were all done on the same day with the same settings, I only changed sampling rate and exp time. I am not sure whether this reliably happens with increasing sampling rate, for example, or when setting a sample rate that is too high for what the exposure time allows. In any case it's strange that this happens only for 1 camera when both had the same sampling rate and exposure time. I will test this more systematically, swap the triggers and come back to you asap

EleonoraAmbrad commented 2 weeks ago

I uploaded some more files in the drive. these files were acquired with harp clock sync device (received this week) connected to h2, and h2 sending clock signal to h1.

in the last recorded files I see frame drops in both cameras even if I change the sampling rate and exposure time and swap the triggers.

another interesting behavior is that sometimes when I stop the workflow and restart it, the cameras are already triggered. stopping the workflow and restarting it solves the issue. not a big deal I guess, unless it's indicative of underlying trigger issues?

RoboDoig commented 1 week ago

Hi @EleonoraAmbrad I'm closing this issue as the original problem is resolved. Could you create a new issue for the camera trigger observation if it's still a problem?