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

Photometry sync events mismatch #12

Open
ikharitonov opened this issue Oct 4, 2024 · 0 comments
Open

Photometry sync events mismatch #12

ikharitonov opened this issue Oct 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ikharitonov
Copy link
Owner

For some datasets the number of events (rows) in OnixDigital log and in Events.csv (from photometry folder) does not match. This is problematic because a linear fit between the two is used in harp_resources.process.calculate_conversions_second_approach() function, to synchronise the data (note: in the future when HARP hardware clock is implemented this step is likely to be needed still, because photometry software events will not be HARP timestamped).

One of the resulting issues is the failing data extraction for these datasets.

This mismatch supposedly happens due to either of the two gets stopped (and/or started?) earlier within Bonsai. It's not explicitly confirmed how consistent this behaviour is across the datasets - this is probably the first thing to handle.

One feature of the randomly generated sync signal is that the inter-timestamp periods, although offset, can be matched between the two files. This can help solve the problem.

Proposed solution 1:
Analyse all datasets and apply a common assumption to handle this. E.g. always cut of the beginning of longer signal.

Proposed solution 2:
Possibly overcomplicated, but general solution is to determine the offset by matching the inter-timestamp periods, e.g. using a convolution. Then cut according to offset.

@ikharitonov ikharitonov added the bug Something isn't working label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant