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

get filtered_behavior_session_table has wrong session_type information #723

Closed
alexpiet opened this issue Mar 8, 2021 · 4 comments
Closed

Comments

@alexpiet
Copy link
Collaborator

alexpiet commented Mar 8, 2021

@matchings This is a distinct, but related issue to #722

Here, the problem is that the session type is simply WRONG for many sessions. I found these sessions by noticing there were sessions with ophys_session_id = NaN, yet had session_type = OPHYS_

t = loading.get_filtered_behavior_session_table(release_data_only=True)
bad_session_type = t[t.ophys_session_id.isnull() & t.session_type.str.startswith('OPHYS') &~t.session_type.str.startswith('OPHYS_0')]

Spot checking these sessions, when I load the session object the metadata and stimulus_presentations table are consistent with these sessions being training sessions EDIT: I think I had a bug in my code, and now checking these systematically, it looks like the metadata matches what is in the filtered table

@alexpiet
Copy link
Collaborator Author

alexpiet commented Mar 8, 2021

debugging this, it could be an issue inherited from the SDK. However these sessions all have the correct session type, but just have a nan ophys_session_id

cache = BehaviorProjectCache.from_lims(manifest = pgt.loading.get_manifest_path())
behavior_sessions = cache.get_behavior_session_table()
b = cache.get_behavior_session_table()
bad_sessions = b[b.ophys_session_id.isnull()&b.session_type.str.startswith('OPHYS_1')]
bad_sessions = bad_sessions.query('equipment_name in ["MESO.1","CAM2P.3","CAM2P.4","CAM2P.5"]') #table of 116 sessions

@alexpiet
Copy link
Collaborator Author

alexpiet commented Mar 8, 2021

Screen Shot 2021-03-08 at 9 57 47 AM

Checking the sessions obtained from the loading.get_filtered_behavior_session_table() function, these 5 have a mis-match

@alexpiet
Copy link
Collaborator Author

alexpiet commented Mar 8, 2021

Repeating the session check with more information. Note that these 5 mis matches are a separate issue from the main problem I'm describing

Screen Shot 2021-03-08 at 10 27 39 AM

@alexpiet
Copy link
Collaborator Author

alexpiet commented Mar 8, 2021

It appears all the sessions identified from loading.get_filtered_... are also identified from the sdk behavior_sessions table. This indicates this is a SDK issue. Therefore I am closing this issue.

@alexpiet alexpiet closed this as completed Mar 8, 2021
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

1 participant