Timing misalignment with 776270

Open
#107 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start by reviewing the timing report in Discussion 105 and checking issue 803496 for the related trial records. Verify the SLAP2 start and stop times, the interpolated timestamps, and whether unexpected stop pulses require the session parameter; done means the timing is valid and the session can be repackaged.

Written by the indexing model from the issue text.

Description

Adding an issue to record what @maierav reported here

Context:
For synchronization we run the SLAP2 microscope in ~20s intervals and then send a quick stop and start pulse and record the harp times for these. We can retrieve an estimate of the timing by getting the slap2 start and stop times and linearly interpolating along with the number of recorded slap2 measurements. So far, we had a bug in Bonsai where it unreliably sends/records an additional stop pulse (or 2) beyond what is recorded in our slap2 trials. To combat this we need to intelligently determine when to remove these initial stop trials pulses.

The issue here:
I was deleting one additional stop pulse, so the stop trial times were shortly before the start trial times, so when interpolating the timestamps it generated negative timestamps.

The fix:
For this session I had to add a parameter to manually slice off the unexpected trial records. @jeromelecoq expects this is fixed in Bonsai for future sessions. It may be the case that 803496 has a similar bug, I will need to verify the trial times are correct and repackage with this parameter if they are not.

Dominant language
Python
Stars
28
Forks
14
Avg merge
1d 9h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AllenNeuralDynamics/openscope-community-predictive-processing

All issues in AllenNeuralDynamics/openscope-community-predictive-processing

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.