Skip to content

leonardopt/visual-memory-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual Memory Task

A jsPsych experiment for a delayed match-to-sample visual memory task using naturalistic image stimuli.

This repository contains the Stage 3 experiment infrastructure for a broader stimulus-development and validation pipeline.

Overview

Participants view naturalistic images, maintain them in memory across a delay, and then make a choice response between a target and a similar foil. The task is implemented in jsPsych and can be run locally for development or packaged for JATOS deployment.

Study Context

This project sits within a three-stage workflow:

  1. Stage 1: synthesis and model-based perceptual scaling of the stimulus set
  2. Stage 2: psychophysical validation via similarity judgments
  3. Stage 3: behavioral validation in a delayed match-to-sample memory task

This repository covers Stage 3.

Reference:

Pettini, L., Bogler, C., Doeller, C., & Haynes, J.-D. (2025). Synthesis and perceptual scaling of high-resolution naturalistic images using Stable Diffusion. Behavior Research Methods, 58(1), 24. https://doi.org/10.3758/s13428-025-02889-8

Repository Structure

  • src/: experiment logic and configuration
  • styles/: SCSS styles used by the task
  • assets/design_batches/: JSON design files used to assemble trials
  • assets/stimuli_task/: image stimuli used in the task
  • assets/ui/: consent form and instructional images

Requirements

  • Node.js
  • npm

The task is configured to require Google Chrome for participants at runtime.

Local Development

Install dependencies:

npm install

Start the local development server:

npm run start

Build the experiment:

npm run build

Build a JATOS package:

npm run jatos

Configuration

The main configuration lives in src/experiment_config.js.

By default, the public repository is safe to run locally:

  • backend integration is disabled
  • no live production endpoints are committed
  • the task falls back to a local default design file

Private Backend Setup

If you want to use your own private backend, inject runtime configuration before the app bundle loads:

<script>
  window.VISUAL_MEMORY_TASK_CONFIG = {
    backend: {
      enabled: true,
      getDesignUrl: "https://your-private-backend.example.com",
      sendAssignmentUrl: "https://your-private-backend.example.com/"
    }
  };
</script>
<script defer src="js/app.js"></script>

Important:

  • the config script must appear before js/app.js
  • this private config should live only in your deployment, not in the public repository
  • frontend configuration is not a true secret, so backend-side access controls are still recommended

Public Repo Safety

This repository is intentionally set up so that publishing it does not expose live backend endpoints in source control. For production use, prefer deployment-time configuration rather than hardcoding service URLs into the repo.

Notes Before Publishing or Reusing

  • Review the consent materials and institutional branding in assets/ui/
  • Large generated folders such as node_modules/, .jspsych-builder/, and packaged/ are ignored and should not be committed
  • The stimulus assets are large, so clone and hosting size should be considered
  • No open source license is currently included; add one if you want to grant reuse permissions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors