Skip to content

Add module for aligning local timestamps to the Harp clock #38

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jsiegle
Copy link

@jsiegle jsiegle commented Oct 30, 2024

Re-opening after rebasing on main branch:

When acquiring data from a device that is not synchronized to the global Harp clock, Harp timestamps can be encoded as barcodes that are acquired by one of the device's digital input lines. This allows post-hoc synchronization with the Harp clock.

This PR adds a module that can decode the Harp times (in seconds) from set of digital line transitions acquired by a non-Harp device, and use this info to align any of that device's timestamps to the global Harp clock.

This is not directly related to reading data saved by Harp devices, but it's utility that will be needed for a wide range of experiments involving Harp.

@jsiegle
Copy link
Author

jsiegle commented Feb 26, 2025

Is there anything blocking getting this merged? We are using these alignment functions extensively now, and it would be great to be able to use the version of this package on PyPI.

@glopesdev
Copy link
Contributor

glopesdev commented Mar 21, 2025

@jsiegle we have been discussing also with @bruno-f-cruz that it would be nice to standardize this feature of clock downsampling more generally as part of the Harp clock synchronization protocol. This would be nice to potentially include as a general interoperability mechanism built into the clock synchronizer devices themselves (e.g. white rabbit, clock synchronizer) rather than in specific devices such as the Behavior board.

Because we don't know if anything in the current implementation might need to be adapted or changed when we agree on the clock downsampling spec, we were hoping to finalize that first before merging this PR into the analysis package.

I am really looking forward to finalizing this and having it as part of the library as soon as possible, as it is an increasingly important feature for people using the Harp ecosystem.

We will be benchmarking it ourselves over the next couple of weeks and I have also raised a proposal in harp-tech/protocol#128 for discussion on the next SRM.

@CLAassistant
Copy link

CLAassistant commented Jun 9, 2025

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

3 participants