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

The number of start times must equal the number of Harp times #8

Open
yonibrowning opened this issue Feb 13, 2025 · 3 comments
Open

Comments

@yonibrowning
Copy link
Contributor

I get a timestamp error on one of the files I am trying to time sync. Any thoughts on what is going wrong here?

Traceback (most recent call last):
  File "C:\Users\yoni.browning\OneDrive - Allen Institute\Documents\GitHub\aind-ephys-rig-qc\src\aind_ephys_rig_qc\generate_report.py", line 361, in <module>
    generate_qc_report(directory, **parameters)
  File "C:\Users\yoni.browning\OneDrive - Allen Institute\Documents\GitHub\aind-ephys-rig-qc\src\aind_ephys_rig_qc\generate_report.py", line 92, in generate_qc_report
    align_timestamps(
  File "C:\Users\yoni.browning\OneDrive - Allen Institute\Documents\GitHub\aind-ephys-rig-qc\src\aind_ephys_rig_qc\temporal_alignment.py", line 645, in align_timestamps
    ts = align_timestamps_to_anchor_points(
  File "C:\Users\yoni.browning\Anaconda3\envs\aind-ephys-rig-qc\lib\site-packages\harp\clock.py", line 36, in align_timestamps_to_anchor_points
    raise ValueError(
ValueError: The number of start times must equal the number of Harp times
@yonibrowning
Copy link
Contributor Author

For some clarification: its specific to just one recording (754372_2025-01-15_16-40-18), 5/6 of the others I have tested worked fine.

@jsiegle
Copy link
Collaborator

jsiegle commented Feb 13, 2025

It's likely that one of the Harp barcodes got cut off at the beginning or end of the recording for that one stream. We need to make the alignment algorithm robust to that case.

@jsiegle
Copy link
Collaborator

jsiegle commented Feb 14, 2025

It looks like there are about 14 seconds of this recording where the Harp barcodes were corrupted. Not sure what the cause was, but data outside that interval should be recoverable. I can manually generate aligned timestamps for this session, but will have to think more about how to deal with this case more generally.

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