'session_type' missing for some sessions in cache.behavior_session_table
Closed this issue · 3 comments
dougollerenshaw commented
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?
dougollerenshaw commented
@matchings suspects that the issue is originating with the SDK functions that generate the behavior_session_table.
dougollerenshaw commented
AllenSDK issue created:
AllenInstitute/AllenSDK#1772
dougollerenshaw commented
Looks like @matchings was correct that it was an SDK/LIMS issue. @wbwakeman has a solution in mind. Closing this issue.