kushalkolar / serenity

Realtime analysis & visualization of calcium imaging data
GNU General Public License v3.0
1 stars 0 forks source link

req-reply, attempt 2 #23

Open kushalkolar opened 1 year ago

kushalkolar commented 1 year ago

This is working perfectly to send frames along with arduino relayed trigger. Timing are just as good as https://github.com/kushalkolar/serenity/pull/20#issuecomment-1524948270 .

No frames are ever duplicated, can check with len({f for f in vid}) where vid is a LazyTiff.

histogram of np.ptp(np.diff(timestamps)) download

Can also get trigger info download

and trial index for each frame based on the trigger download

Used a stopwatch to measure that the timing are correct with scanimage frame indices shown on the GUI, it seems to be correct. However it seems like each 25s wavesurfer sweep is actually ~25.3 with a delay of ~0.3s between sweeps, need to verify this. Or the real framerate of scanimage isn't really 30.04 but slightly lower

Last thing to do is OnACID actor, thoughts here: https://github.com/kushalkolar/serenity/pull/20#issuecomment-1528750450