Phosphene pattern learning experiment comparing Symbol vs Pixel encoding.
human_experiment/
├── generate_stimuli.py # Export phosphene images from trained encoders
├── experiment.html # jsPsych experiment (open in browser)
├── analyze_results.py # Statistical analysis of collected data
├── stimuli/ # Generated phosphene images (after running generate_stimuli.py)
│ ├── symbol/ # Symbol-encoded patterns
│ ├── pixel/ # Pixel-encoded patterns
│ └── manifest.json # Stimulus metadata
├── data/ # Raw CSV data from participants
└── figures/ # Analysis output figures
Run on the server where trained models exist:
cd human_experiment
python3 generate_stimuli.py
This exports 200 phosphene images per condition (8 classes x 25 samples).
Option A - Local (simplest):
cd human_experiment
python3 -m http.server 8000
# Open browser: http://localhost:8000/experiment.html?condition=symbol&pid=P001
Option B - GitHub Pages (for remote participants):
Each participant gets ONE link (between-subject design):
experiment.html?condition=symbol&pid=P001experiment.html?condition=pixel&pid=P002Assign participants randomly. Use odd PIDs for symbol, even for pixel (or any scheme).
Aim for 10-20 per group (20-40 total). Each session takes ~25 minutes.
After completion, participants download a CSV file automatically. Collect these files.
Put all CSV files in data/, then:
python analyze_results.py --data-dir data/
Outputs:
figures/learning_curves.png - Learning curves with 95% CIfigures/test_accuracy.png - Box plot with t-testfigures/stats.json - Full statistical resultsThe experiment includes:
Exclude participants with:
This experiment requires ethics approval. Key points for your application: