Datasets

pulse2percept.datasets provides published psychophysical and video datasets from the bionic vision community. load_* functions read small bundled data; fetch_* functions download larger datasets on first use.

Loader

Reference

Contents

Related model

load_horsager2009()

[Horsager2009]

Argus I single- and paired-pulse thresholds, 2 subjects

Horsager2009Model

load_nanduri2012()

[Nanduri2012]

Argus I brightness and size ratings vs amplitude and frequency, 1 subject

Nanduri2012Model

load_greenwald2009()

[Greenwald2009]

Argus I brightness ratings and thresholds, 2 subjects

temporal models

load_perezfornos2012()

[PerezFornos2012]

Phosphene fading: joystick-reported brightness over time

temporal models

fetch_beyeler2019()

[Beyeler2019]

Phosphene drawings from Argus I and Argus II users (66 MB download)

AxonMapModel

fetch_han2021()

[Han2021]

Outdoor scene videos (303 MB download)

any model, as a VideoStimulus

The example gallery reproduces [Horsager2009], [Nanduri2012] and [Beyeler2019] from these loaders.

Tabular loaders return a pandas DataFrame and accept filters, so a subject or electrode can be selected without post-processing:

import pulse2percept as p2p

data = p2p.datasets.load_horsager2009(subjects='S1', electrodes='C3')

Pandas is required for tabular datasets; some datasets also require HDF5 via h5py.

Downloaded data

Fetched datasets are cached in ~/pulse2percept_data by default. Set the PULSE2PERCEPT_DATA environment variable or pass a data directory directly to a fetcher to use another location.

p2p.datasets.get_data_dir()
p2p.datasets.clear_data_dir()

clear_data_dir removes the cached files, so the next fetch downloads them again.