Skip to content

allen dataset: Create colab example with Allen demo dataset.#139

Open
abdelrahman725 wants to merge 1 commit into
sensorium-competition:mainfrom
abdelrahman725:allen-dataset-colab-example
Open

allen dataset: Create colab example with Allen demo dataset.#139
abdelrahman725 wants to merge 1 commit into
sensorium-competition:mainfrom
abdelrahman725:allen-dataset-colab-example

Conversation

@abdelrahman725

@abdelrahman725 abdelrahman725 commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Description

Create a google colab notebook to show case the whole pipline of downloading, exporting, and interpolating allen dataset.

Open In Colab

Follow up

Are there any visualizations you want in the notebook ? If yes, please explain why they are needed, this helps me learn really quickly while building !

Closes #102

@gitnotebooks

gitnotebooks Bot commented Mar 17, 2026

Copy link
Copy Markdown

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/sensorium-competition/experanto/pull/139

@codecov

codecov Bot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@abdelrahman725 abdelrahman725 force-pushed the allen-dataset-colab-example branch from 19b829d to 241f53f Compare March 17, 2026 05:03
Comment thread examples/allen_example.ipynb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Colab-oriented example notebook demonstrating how to export an Allen dataset via allen-exporter and then use Experanto to load and interpolate multiple modalities.

Changes:

  • Added examples/allen_example.ipynb with Micromamba-based setup for allensdk compatibility in Colab.
  • Added walkthrough code to export an Allen experiment, load it with experanto.Experiment, and run interpolation for all devices or a single device.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb
Comment thread examples/allen_example.ipynb Outdated
@schewskone schewskone self-requested a review March 17, 2026 08:16
@abdelrahman725 abdelrahman725 force-pushed the allen-dataset-colab-example branch from 241f53f to a19b38b Compare March 17, 2026 09:35
@abdelrahman725

Copy link
Copy Markdown
Contributor Author

Updates

Addressed only the relevant Copilot comments

@schewskone schewskone left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR, the colab setup and environment instantiation look good.
Please address the comments to make the example even more intuitive

Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb Outdated
Comment thread examples/allen_example.ipynb
@pollytur

Copy link
Copy Markdown
Contributor

@abdelrahman725 please merge current main in your branch :)
The recent changes from @schewskone might also help with the issue you have seen before

@abdelrahman725 abdelrahman725 force-pushed the allen-dataset-colab-example branch from a19b38b to e1d31b2 Compare April 6, 2026 15:42
@abdelrahman725

Copy link
Copy Markdown
Contributor Author

Updates

Addressed review comments.

I decided to leave eye_tracker and treadmill visualization, because I wanted first to make sure that the current visualizations are what's intended.

@abdelrahman725 abdelrahman725 force-pushed the allen-dataset-colab-example branch from e1d31b2 to 42e7c07 Compare April 6, 2026 21:48
@pollytur

pollytur commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

@abdelrahman725 please take a look on why the tests are failing. It's a bit suspicious cause adding a notebook should not change the tests but they were fine before. Maybe merging current main in there would be enough to solve.

Also please re-request review from me and Tom, when the PR is ready for another review

@pollytur

Copy link
Copy Markdown
Contributor

@abdelrahman725 we found the issue with the tests - its now fixed
Please merge current main in your branch - then tests should be fine and not fail anymore
Sorry about it

@abdelrahman725 abdelrahman725 force-pushed the allen-dataset-colab-example branch from 42e7c07 to 418c801 Compare April 14, 2026 10:43
@pollytur

Copy link
Copy Markdown
Contributor

@abdelrahman725 At the end of the notebook in sections Eye tracker Interpolation and Treadmill Interpolation there are still TODOs - could this please be addressed? do you need our input to address it somehow?

@abdelrahman725

Copy link
Copy Markdown
Contributor Author

@pollytur
I should proceed with the right visualizations for eye_tracker and treadmill after your review and an explanation for this:

please print shapes only and use plots for the rest

@abdelrahman725

Copy link
Copy Markdown
Contributor Author

@abdelrahman725 At the end of the notebook in sections Eye tracker Interpolation and Treadmill Interpolation there are still TODOs - could this please be addressed? do you need our input to address it somehow?

Yes, as I mentioned above, I'm not sure what "please print shapes only and use plots for the rest" means and for which devices ?

@pollytur

Copy link
Copy Markdown
Contributor

@abdelrahman725 At the end of the notebook in sections Eye tracker Interpolation and Treadmill Interpolation there are still TODOs - could this please be addressed? do you need our input to address it somehow?

Yes, as I mentioned above, I'm not sure what "please print shapes only and use plots for the rest" means and for which devices ?

It means that Its nice to have plots of Eye tracker / Treadmill channels activity over time same as you have it above for neurons
At some point it had a bunch of numbers displayed in the cell output - which is not great, hence, I asked to print shapes only
Does it make sense now?

@pollytur

Copy link
Copy Markdown
Contributor

@abdelrahman725 like also here
its a bunch of numbers which make the output huge but not very meaningful.
Would be much better to print some shapes and maybe states / bynber of nans instead of displaying million of numbers
Or am I missing sth?
image

@pollytur

Copy link
Copy Markdown
Contributor

for printing both neurons activity and behaviour activities please use '-o' setting (e.g. ax.plot(times, responses[:, neuron_idx], '-o', linewidth=0.8, color='steelblue')) - this would help to see where the actual points are (not so easy with just a solid line)

@pollytur

pollytur commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

@schewskone you downloaded the Visual Coding 2P Allen dataset right? https://allenswdb.github.io/physiology/ophys/visual-coding/vc2p-background.html

There was no water licking or behaviour in there or was it?

@abdelrahman725 wait for @schewskone reply but I think the explanation you give at the top is for the wrong dataset (e.g. Visual behaviour while it should be Visual Coding one)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the first markdown there is

Cheat sheet
See this helpful [cheat sheet](https://github.com/trendinafrica/TReND-CaMinA/blob/main/notebooks/Zambia25/07-to-10-Mon-toThu-AllenTutorial/Visual%20Coding%202P%20Cheat%20Sheet%20October2018.pdf) from CAMINA school

Cheat sheet for what? Give 1 sentence context what would they found there

Also add brief explanations in most of the markdown sections

  • for example Download and export Allen dataset - what is the difference between download and export?
  • Load experiment - what happens there (e.g. data was downloaded in this folder and we are now loading it with the help of experanto) - yes, I know its trivial from a coding perspective but the goal of example notebooks is to extremely clear and self-explanatory
  • would be nice to have a comment on tiers split and what do these id mean here
Image

@abdelrahman725

abdelrahman725 commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

@abdelrahman725 like also here
its a bunch of numbers which make the output huge but not very meaningful.
Would be much better to print some shapes and maybe states / bynber of nans instead of displaying million of numbers
Or am I missing sth?

@pollytur I agree, I can print the shapes in "Interplate from all devices" cell and maybe other minimal states , but I prefer to include other details like nans into each correpsonding modality cell below and before plotting.

@pollytur

Copy link
Copy Markdown
Contributor

@abdelrahman725 like also here
its a bunch of numbers which make the output huge but not very meaningful.
Would be much better to print some shapes and maybe states / number of nans instead of displaying million of numbers
Or am I missing sth?

@pollytur I agree, I can print the shapes in "Interplate from all devices" cell and maybe other minimal states , but I prefer to include other details like nans into each correpsonding modality cell below and before plotting.

Sure, you are welcome to plot some details as suggested above. But this should be minimal meaningful prints instead of plain display of array parts

Comment thread examples/allen_example.ipynb
@schewskone

Copy link
Copy Markdown
Collaborator

Visual Behavior is the correct dataset not Visual Coding I'm not entirely sure about the difference but I followed the tutorials from here, which is for the Visual Behavior dataset.

@abdelrahman725 abdelrahman725 force-pushed the allen-dataset-colab-example branch 2 times, most recently from 3206407 to 0e72fc5 Compare April 21, 2026 00:20
@abdelrahman725

abdelrahman725 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

Updates

  • Addressed all review comments including Todos.
  • Removed the cheat sheet pdf (see below)
  • Each md section and code cell is updated and has clear and detailed explanation.

Thoughts

@pollytur, @schewskone

  1. I believe the correct experiment is Visual behaviour and not Visual coding. That linked pdf cheat sheet is for Visual coding, so I decided to remove it.

  2. About lick times and reward times: The visual behaviour experiment indeed mentions these in doc. However, I believe "lick times" and "reward" times were just ignored by allen-exporter during export ? that's why I can't see them in the exported and loaded experiment directory (allen_data/experiment_951980471). I mentiond this in the notebook.

  3. Is there any additional eye_tracker signal worth plotting in addition to the already plotted ones pupil_area, eye_area, pupil_center_x, pupil_center_y and likely_blink ?

@abdelrahman725 abdelrahman725 force-pushed the allen-dataset-colab-example branch from 0e72fc5 to d46401d Compare April 21, 2026 01:15
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

Successfully merging this pull request may close these issues.

Make a Colab example with Allen demo dataset

4 participants