Stimuli for vision science, as image arrays
Project description
Stimupy
A pure-Python package for creating new and existing visual stimuli commonly used in the study of contrast, brightness, lightness, and other aspects of visual perception.
- documentation: https://stimupy.readthedocs.io/en/latest/
- source code: https://github.com/computational-psychology/stimupy
stimupy has been designed to:
- generate (novel) visual stimuli in a reproducible, flexible, and easy way
- recreate exact stimuli as they have been used in prior vision research
- explore large parameter spaces to reveal relations between formerly unconnected stimuli
- provide classic stimulus sets (e.g. ModelFest), exactly as described in the original manuscripts (including experimental data)
- build new stimulus sets or benchmarks (e.g. for testing computational models),
and easily add them to
stimupy - support vision science by providing a large, openly-available and flexible battery of relevant stimulus functions
- unify and automate stimulus creation
- be FAIR: Findable, Accessible, Interoperable, and Reusable
Core features:
Stimupy has been designed to generate stimuli from code, so that they are reproducible, flexible, and easy.
-
basic visual stimulus components, such as basic shapes, wave gratings, Gaussians
-
visual noise textures, of different kinds,
-
many different parameterized visual stimuli
- Gabors, plaids, edges,
- a variety of so-called illusions (e.g. Simultaneous Brightness Contrast, White's illusion, Hermann grid, Ponzo illusion), and many more
-
exact replications of stimuli previously published (e.g. ModelFest) as described in their respective papers
-
all stimuli are fully parameterizable
- with interpretable parameters that are familiar and relevant to vision scientists (e.g. visual angle, spatial frequency, target placements).
- This also makes it possible to explore stimulus parameter spaces which might reveal relations between formerly unconnected stimuli
-
stimuli are composable/composed:
stimulitend to be composed from severalcomponents, and these provided building blocks and masks can be used to assemble more complicated geometries
-
flexible output structures
- generated stimuli are Python
dictionary- mutable data structures (compared to objects), so they allow the user to add additional information easily (e.g. stimulus descriptions, stimulus masks, experimental data).
- containing the stimulus-image as a NumPy-array,
- makes images fully interoperable using common NumPy tooling (rather than, e.g., an OpenGL texture),
- together with other useful stimulus-specific information (e.g. (target) masks, sizes etc.).
- generated stimuli are Python
-
modular and therefore easy to extend with new stimulus functions, and new stimulus sets
-
utility functions for stimulus import, export, manipulation (e.g. contrast, size), or plotting
-
application-oriented documentation documentation, including interactive demonstrations of stimulus functions
-
unit and integration tests
See the documentation for more details
Citing stimupy
If you use stimupy for your scientific work, please cite the paper as:
Schmittwilken, L., Maertens, M., & Vincent, J. (2023). stimupy: A Python package for creating stimuli in vision science. Journal of Open Source Software, 8(86), 5321. https://doi.org/10.21105/joss.05321
Here is a BibTeX entry for this reference:
@article{Schmittwilken2023,
doi = {10.21105/joss.05321},
url = {https://doi.org/10.21105/joss.05321},
year = {2023},
publisher = {The Open Journal},
volume = {8},
number = {86},
pages = {5321},
author = {Lynn Schmittwilken and Marianne Maertens and Joris Vincent},
title = {stimupy: A Python package for creating stimuli in vision science},
journal = {Journal of Open Source Software}
}
Your stimulus (set) is not here?
Given the modular nature of the package, any stimulus or stimulus set not currently available, can be easily added. Open an issue and let us know what you'd like to see added.
If you want to contribute yourself, see contributing
Installation
pip can install stimupy directly PyPI:
pip install stimupy
OR (for developers), install from source:
-
Clone the repository from GitHub:
git clone git@github.com:computational-psychology/stimupy.git
-
stimupycan then be installed using pip. From top-level directory run:pip install .
to install to your local python library.
To install in developer/editable mode: pip install -e . at the root directory.
This makes changes to files immediately usable,
rather than having to reinstall the package after every change.
Dependencies
Dependencies should be automatically installed (at least using pip).
stimupys required dependencies are:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stimupy-1.2.0.tar.gz.
File metadata
- Download URL: stimupy-1.2.0.tar.gz
- Upload date:
- Size: 219.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
027cb7e50094251316897b87043adf088dad4e8cf9dc0f7e33d2ae38c9b7128e
|
|
| MD5 |
aec96fee11a6a9f3ef8808eaa33163f7
|
|
| BLAKE2b-256 |
4cf512e211d6dc586b6677654fbbab8d65b5e1dd1e37ebd1ee77b1963d062cdb
|
Provenance
The following attestation bundles were made for stimupy-1.2.0.tar.gz:
Publisher:
release.yml on computational-psychology/stimupy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stimupy-1.2.0.tar.gz -
Subject digest:
027cb7e50094251316897b87043adf088dad4e8cf9dc0f7e33d2ae38c9b7128e - Sigstore transparency entry: 427360745
- Sigstore integration time:
-
Permalink:
computational-psychology/stimupy@349dfe9a5c7eb6692567548436130a82a1ea6b67 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/computational-psychology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@349dfe9a5c7eb6692567548436130a82a1ea6b67 -
Trigger Event:
release
-
Statement type:
File details
Details for the file stimupy-1.2.0-py3-none-any.whl.
File metadata
- Download URL: stimupy-1.2.0-py3-none-any.whl
- Upload date:
- Size: 271.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a5142bf65457a405a982f4ff7b6dfa3c5bf6f36eb315faa85e354ceb14b19b3
|
|
| MD5 |
b7ce0ea60a2eb714d3a419d8d999e450
|
|
| BLAKE2b-256 |
9db9304588242f27ae9f367b8d75134d324831d72cbd0d741154144bb04ffb27
|
Provenance
The following attestation bundles were made for stimupy-1.2.0-py3-none-any.whl:
Publisher:
release.yml on computational-psychology/stimupy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stimupy-1.2.0-py3-none-any.whl -
Subject digest:
9a5142bf65457a405a982f4ff7b6dfa3c5bf6f36eb315faa85e354ceb14b19b3 - Sigstore transparency entry: 427360747
- Sigstore integration time:
-
Permalink:
computational-psychology/stimupy@349dfe9a5c7eb6692567548436130a82a1ea6b67 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/computational-psychology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@349dfe9a5c7eb6692567548436130a82a1ea6b67 -
Trigger Event:
release
-
Statement type: