AllenInstitute / AllenSDK

code for reading and processing Allen Institute for Brain Science data
https://allensdk.readthedocs.io/en/latest/
Other
343 stars 149 forks source link

experiment / session designations in SDK #1493

Open matchings opened 4 years ago

matchings commented 4 years ago

Describe the use case that is addressed by this feature.

Currently, to load an ophys dataset, the SDK function is cache.get_session_data(ophys_experiment_id). While this terminology is not problematic for Scientifica data where there is only 1 experiment (aka imaging plane) per session, it is inaccurate and confusing for Multiscope data, where there are 8 experiments (aka imaging planes) per session.

Describe the solution you'd like

cache.get_session_data() should be renamed to cache.get_experiment_data(), but continue to return what get_session_data() returns now - all the data streams for a single ophys imaging plane. F

cache.get_session_data() should/could return some kind of object that contains all 8 Multiscope experiments (aka imaging planes) for that session. However coming up with the architecture for a multi-plane session object is a second order activity, as it is not impeding ongoing analysis, and is part of a larger scope of work that requires further definition.

Describe alternatives you've considered

We can continue to work with cache.get_session_data() to get experiment level data, but it will continue to confuse users and requires effort to explain and keep straight.

Additional context

As the Visual Behavior team continues to ramp up analysis for the platform paper, more and more users will be engaging with the SDK, in particular with the Multiscope data. The SDK is already capable of loading many Multiscope data streams by default (ex: dff_traces, lick times etc), so it is useful for much of our analysis. Using the correct nomenclature for experiment vs. session level data will be very helpful as we onboard more internal users to the SDK.

Do you want to work on this issue?

Happy to discuss possible solutions & priorities on this topic.

wbwakeman commented 3 years ago

Above all, don't break all the code that already exists to access SDK. e.g. Visual Coding notebooks, etc...

matchings commented 3 years ago

Just thinking out loud here...one solution could be to adopt a “session” vs “imaging plane” language in the SDK. It would require us internally to mentally map session to experiment and experiment to imaging plane when using the SDK, but that might be an acceptable compromise to ensure that we don’t confuse users. But it would help to know where and how in the code the terms are used before deciding anything.