AllenInstitute/visual_behavior_analysis

'session_type' missing for some sessions in cache.behavior_session_table

Closed this issue · 3 comments

The session_type attribute is missing for some, but not all, sessions in the cache.behavior_session_table. Here's an example where it's missing:

import visual_behavior.data_access.loading as loading

cache = loading.get_visual_behavior_cache()
behavior_session_table = cache.get_behavior_session_table().reset_index()
filtered_ophys_experiment_table = loading.get_filtered_ophys_experiment_table()

ophys_session_id = 1046147323
print(behavior_session_table.query('ophys_session_id == {}'.format(ophys_session_id)).iloc[0]['session_type'])
print(filtered_ophys_experiment_table.query('ophys_session_id == {}'.format(ophys_session_id)).iloc[0]['session_type'])

nan
OPHYS_4_images_B

However, for a different ophys_session_id, both tables return a session_type:

ophys_session_id = 1053696498
print(behavior_session_table.query('ophys_session_id == {}'.format(ophys_session_id)).iloc[0]['session_type'])
print(filtered_ophys_experiment_table.query('ophys_session_id == {}'.format(ophys_session_id)).iloc[0]['session_type'])

OPHYS_2_images_A_passive
OPHYS_2_images_A_passive

Why is this attribute missing for some sessions, but not others?

@matchings suspects that the issue is originating with the SDK functions that generate the behavior_session_table.

Looks like @matchings was correct that it was an SDK/LIMS issue. @wbwakeman has a solution in mind. Closing this issue.