Examples
Here you'll find several examples for designing full studies using reVISitPy. Each of the examples takes advantage of the revisitpy_server
and a Jupyter notebook environment. While neither of these are necessary to create complex configuration files, they are the quickest ways to get started with reVISitPy and the best way to create a closed-feedback loop for quick iterations of your study design.
Using The Examples Repository
If you're looking for a more hands-on approach to working with these examples, you can find each of these examples in the reVISitPy examples repository. We suggest using uv with this repository since it is the simplest way to get started.
Once you have uv
installed and the repository successfully cloned, navigate to the repository and run the following:
uv sync
This will initialize a virtual environment with all of the necessary packages for the repository (including revisitpy
and revisitpy_server
). Then, when running any of the examples, you just need to choose the ipykernel
associated with your virtual environment (by default, this is the .venv
directory).
📄️ Simple HTML Study
Here we will get familiar with the syntax of the reVISitPy package. To do this, we'll recreate the config for the simple html study here. We'll start by first creating the study metadata and the UI configuration.
📄️ Enhancing The Simple HTML Study
In the previous example, we went over creating the configuration file shown here. While that example is still a valid use case for the revisitpy package, this may be a configuration that is simpler to write in standard JSON. In this example, we'll go over a use case which more readily requires the revisitpy package.
📄️ Correlation Visualization JND Example Study
In this example, we'll create a full two-alternative forced choice (2AFC) study for visualizations of correlated data (from [1]), using vega components. We'll use numpy and scipy to generate a dataset, pandas to create a well-structured data frame, and the revisitpy package to tie it all together.