# Is there a universal code scheme for visual stimulation on the display

**URL:** <https://community.brain-map.org/t/is-there-a-universal-code-scheme-for-visual-stimulation-on-the-display/4487>\
**Category:** Technical\
**Tags:** experiment-design\
**Created:** [June 22, 2025, 10:18am UTC](https://community.brain-map.org/t/is-there-a-universal-code-scheme-for-visual-stimulation-on-the-display/4487 "2025-06-22T10:18:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caicai1010662](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/caicai1010662/32/2199_2.png) [@caicai1010662](https://community.brain-map.org/u/caicai1010662)\
**Post date:** [June 22, 2025, 10:18am UTC](https://community.brain-map.org/t/is-there-a-universal-code-scheme-for-visual-stimulation-on-the-display/4487/1 "2025-06-22T10:18:49Z")

</div>

Recently, we will do visual stimulation experiments on mice, but we do not have the basis for doing such experiments. We have prepared a dedicated display screen, but we lack a visual stimulation for testing. Is there a universal visual stimulation

---

<div class="post-metadata">

**Author:** ![corbettb](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@corbettb](https://community.brain-map.org/u/corbettb)\
**Post date:** [June 30, 2025, 7:25pm UTC](https://community.brain-map.org/t/is-there-a-universal-code-scheme-for-visual-stimulation-on-the-display/4487/2 "2025-06-30T19:25:01Z")

</div>

Hi,

There are many ways to generate visual stimuli (no one universal method). For the Allen Brain Observatory, we built our stimulus code on this python package: [https://www.psychopy.org/](https://www.psychopy.org/). Psychopy has many users and very helpful documentation and community boards. I might recommend starting there. If you’d like to get more detail about the stimuli shown in the brain observatory datasets, check out this post:

> [@How can I generate visual stimuli like those used in the Brain Observatory?](https://community.brain-map.org/t/how-can-i-generate-visual-stimuli-like-those-used-in-the-brain-observatory/33):
>
> You can use the AllenSDK ([http://alleninstitute.github.io/AllenSDK/](http://alleninstitute.github.io/AllenSDK/)) to access stimulus templates and/or parameters to recreate these stimuli with your favorite experimental control software. An example Jupyter notebook demonstrating how to access the Natural Scenes, Natural Movies, and Locally Sparse Noise stimuli used in the Brain Observatory: Visual Coding is available here: [http://alleninstitute.github.io/AllenSDK/\_static/examples/nb/brain\_observatory\_stimuli.html](http://alleninstitute.github.io/AllenSDK/_static/examples/nb/brain_observatory_stimuli.html) At this time, our stimul…

I hope that helps!

Cheers,  
Corbett
