-
Notifications
You must be signed in to change notification settings - Fork 6
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
ophys timestamp refactoring failing #645
Comments
More info: I get the same incorrect answer for all 8 experiments associated with this session using the code linked above. I have not been able to find any other experiments for which this is a problem. For a different experiment/session (session_id 954954402, experiment_id 958527481, also from mesoscope), I get the correct answer (48332) with or without this line of code. |
Here's what I believe to be true. @matchings, can you chime in on this?
So I'd like to propose that we simply remove this processing step and use the timestamps that come directly from the SDK. A PR is coming. |
I noticed a discrepancy in the ophys_timestamp count and the length of the dff_traces for all of the experiments associated with ophys_session_id 845842114 (ophys_experiment_ids
= [846546341, 846546326, 846546328, 846546335, 846546339, 846546337, 846546331, 846546333]).
In all cases, the timestamp vector is exactly 4000 frames longer than the dff_frames vector (timestamp length = 52274, dff_traces length = 48274).
I initially thought it was a data issue, but it turns out that the AllenSDK is returning the correct ophys_timestamps length. The refactoring in the VBA
BehaviorOphysDataset
seems to be introducing the error for this session.Details (for one of the eight experiments listed above):
Getting the timestamps directly from the SDK yields the correct timestamp length:
Returns:
48274
But getting the timestamps through VBA returns the incorrect value:
Returns:
52274
The incorrect value seems to be being overwritten here:
visual_behavior_analysis/visual_behavior/data_access/loading.py
Line 361 in f760874
Is it possible that this step of overwriting the ophys_timestamps was necessary before the SDK was set up to deal with mesoscope timestamps? Is it still necessary to do this?
The text was updated successfully, but these errors were encountered: