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

Absolute_time alignment error #49

Closed
ZhixiaoSu opened this issue Oct 31, 2024 · 3 comments
Closed

Absolute_time alignment error #49

ZhixiaoSu opened this issue Oct 31, 2024 · 3 comments
Assignees

Comments

@ZhixiaoSu
Copy link
Collaborator

Describe the bug
Absolute time in the dataframe was supposed to be aligned to go cue of first trial, but is now aligned to the start of the first trial. In behavior control, a trial starts with and ITI, followed by a no lick window and then go cue comes.

To Reproduce
Steps to reproduce the behavior:
Please check this line:
https://github.com/AllenNeuralDynamics/aind-dynamic-foraging-data-utils/blob/main/src/aind_dynamic_foraging_data_utils/nwb_utils.py#L332

Expected behavior
Time is aligned to first go cue.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: codeocean, ubuntu
  • Browser: chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@alexpiet
Copy link
Collaborator

Oof! good catch. This is probably my fault. Lets double check to make sure we are aligning everything to the start of the first go cue, and not the start of the first trial (FIP, events, trials table)

@rachelstephlee
Copy link
Collaborator

rachelstephlee commented Oct 31, 2024

I've tracked the line that got messed up:

    t0 = df_ses_trials.start_time[0]
    absolute_time = df_ses_trials['goCue_start_time'] - t0

Alex is actively fixing this via this PR: #50

@rachelstephlee
Copy link
Collaborator

closed with #50

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

3 participants