Trial-aware neurodesign-plus 2.0 for fMRI experimental design optimisation
Project description
neurodesign-plus
neurodesign-plus is an extended and maintained fork of the original neurodesign package for fMRI experimental design optimisation.
In addition to the base package workflow, neurodesign-plus adds support for:
- fixed user-defined event orders via
order, - variable stimulus durations via
stimuli_durations, - transition-specific ITIs via
conditional_ITI, - probabilistic template-based ordering via
order_keys,order_probabilities, andorder_length.
Current version
Version 2.0 is a breaking release: experiments are now built from trials (each holding one or more events) instead of a flat event list, so a few options were renamed. 1.0.x scripts need these renames:
| 1.0.x | 2.0 |
|---|---|
stimuli_durations |
event_durations |
conditional_ITI |
event_transition_interval / inter_trial_interval |
order_keys / order_probabilities / order_length |
trial_templates / trial_template_probabilities / n_conceptual_trials |
Experiment, Design, and Optimisation are unchanged. See the migration
guide to update old code, or pin neurodesign-plus<2.0 to
keep the old behavior.
Installation
Install the published package with:
python -m pip install neurodesign-plus
Documentation
neurodesign-plusdocumentation: neurodesign-plus on Read the Docs- User guide: docs/index.md
- Installation notes: docs/installation.md
- Migration guide (version-1 to version-2 migration details): MIGRATION_2.0.md
- Technical manual: manuals/TECHNICAL_CHANGES.md
- Metrics guide: manuals/METRICS.md
- Tutorials: docs/tutorials.md
Current API Example
from pathlib import Path
import json
from neurodesign import Experiment, Optimisation, report
exp = Experiment(
TR=2.0,
n_trials=8,
P=[0.5, 0.5],
C=[[1, -1]],
rho=0.3,
n_stimuli=2,
event_durations=1.0,
trial_start_interval=0.5,
post_event_interval=0.2,
inter_trial_interval=2.0,
resolution=0.1,
seed=7,
)
optimisation = Optimisation(
experiment=exp,
weights=[0.0, 0.5, 0.25, 0.25],
preruncycles=1,
cycles=1,
optimisation="simulation",
G=2,
I=1,
outdes=1,
convergence=1,
seed=101,
folder=Path("output") / "readme_example",
)
optimisation.optimise()
design = optimisation.selected_design(0)
report.make_report(optimisation, Path("report.pdf"))
Path("schedule.json").write_text(
json.dumps(design.export_payload(), indent=2), encoding="utf-8"
)
Path("specification.json").write_text(
json.dumps(exp.export_specification(), indent=2),
encoding="utf-8",
)
Repository Layout
docs/ Sphinx documentation sources
manuals/ Included long-form manuals
neurodesign/ Package source code
tests/ Automated regression and release-audit tests
tutorials/ Executed tutorial notebooks
validation/ Validation runners and reproducibility helpers
Tutorials
The tutorial collection includes:
- three overview tutorials in
tutorials/, - four base-function tutorials in
tutorials/base_functions/, - four feature-focused tutorials in
tutorials/new_functions/.
The Read the Docs tutorials page is the best place to browse the current notebook set and their intended learning progression.
Credits
This project is a maintained fork of the original neurodesign package by Joke Durnez and the Neuropower team.
Author contributions (CRediT):
- Atharv A. Umap — Conceptualization, Software, Validation
- Caroline J. Charpentier — Project administration
- Valentin Guigon — Conceptualization, Methodology, Resources, Software, Supervision, Validation, Writing
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 neurodesign_plus-2.0.0.tar.gz.
File metadata
- Download URL: neurodesign_plus-2.0.0.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb74462c74f74f579b6c7813cb8b5a862150ca652043db4a1917a562a804e667
|
|
| MD5 |
a45ffa49a49616e7f18177e27929117b
|
|
| BLAKE2b-256 |
82b4d117e5c2a9386e979f57f79a324ace39dd538582c53683993bf757ce20b6
|
Provenance
The following attestation bundles were made for neurodesign_plus-2.0.0.tar.gz:
Publisher:
publish.yml on SLDlab/neurodesign-plus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neurodesign_plus-2.0.0.tar.gz -
Subject digest:
fb74462c74f74f579b6c7813cb8b5a862150ca652043db4a1917a562a804e667 - Sigstore transparency entry: 2206340867
- Sigstore integration time:
-
Permalink:
SLDlab/neurodesign-plus@447886bbbdf8ed2e63387b5fd0619fb7f04f8770 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/SLDlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@447886bbbdf8ed2e63387b5fd0619fb7f04f8770 -
Trigger Event:
release
-
Statement type:
File details
Details for the file neurodesign_plus-2.0.0-py3-none-any.whl.
File metadata
- Download URL: neurodesign_plus-2.0.0-py3-none-any.whl
- Upload date:
- Size: 146.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81d48dda387e9984f0dae5990d98ba423068a220af1e21986c29086787d5d365
|
|
| MD5 |
7d94a7ec919ccd1c9b787fb9c46254dd
|
|
| BLAKE2b-256 |
5dd212e4e0711027678b127bbd020b08397ee5abe6d6d621a8d98983edf49d17
|
Provenance
The following attestation bundles were made for neurodesign_plus-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on SLDlab/neurodesign-plus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neurodesign_plus-2.0.0-py3-none-any.whl -
Subject digest:
81d48dda387e9984f0dae5990d98ba423068a220af1e21986c29086787d5d365 - Sigstore transparency entry: 2206340871
- Sigstore integration time:
-
Permalink:
SLDlab/neurodesign-plus@447886bbbdf8ed2e63387b5fd0619fb7f04f8770 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/SLDlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@447886bbbdf8ed2e63387b5fd0619fb7f04f8770 -
Trigger Event:
release
-
Statement type: