Helper library and interactive anywidgets for the DartBrains fMRI course
Project description
dartbrains-tools
Helper library and interactive anywidgets for the DartBrains fMRI course. Extracted from the book repo so the widgets and helpers can be installed standalone — including in molab and pyodide/WASM marimo notebooks.
Install
pip install dartbrains-tools
# Optional: include marimo for notebook_utils.youtube()
pip install "dartbrains-tools[notebook]"
Modules
dartbrains_tools.data— load the Pinel Localizer dataset from the Hugging Face Hub.dartbrains_tools.mr_simulations— Bloch equation solvers, signal generators, HRF, and Plotly visualization helpers.dartbrains_tools.mr_widgets— 10 anywidgets for interactive MR physics teaching (PrecessionWidget,SpinEnsembleWidget,KSpaceWidget,ConvolutionWidget,EncodingWidget,CompassWidget,NetMagnetizationWidget,TransformCubeWidget,CostFunctionWidget,SmoothingWidget).dartbrains_tools.notebook_utils— small marimo helpers (youtube).
Quick start
from dartbrains_tools.mr_widgets import PrecessionWidget
w = PrecessionWidget(b0=3.0, flip_angle=90.0)
w # Interactive 3D Three.js animation in any anywidget host.
from dartbrains_tools.data import get_subjects, get_file, load_events
subjects = get_subjects()
bold = get_file("S01", "bold")
events = load_events("S01")
Development
git clone https://github.com/ljchang/dartbrains-tools
cd dartbrains-tools
uv sync
uv run pytest
uv build
License
MIT. The parent course materials at dartbrains remain CC-BY-SA-4.0; this companion library is permissive so it can be reused in any downstream project.
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 dartbrains_tools-0.1.2.tar.gz.
File metadata
- Download URL: dartbrains_tools-0.1.2.tar.gz
- Upload date:
- Size: 38.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56dc3ffcb6d3e91709c8d47d79cecadbf362a5a1bdfcc63c618ff5ab19e6b760
|
|
| MD5 |
49228bbf85dfca17795d21543042ab78
|
|
| BLAKE2b-256 |
8da07e218a0751059cf64c7de491b9e18321240c0833608188673cb027521eee
|
Provenance
The following attestation bundles were made for dartbrains_tools-0.1.2.tar.gz:
Publisher:
publish.yml on ljchang/dartbrains-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dartbrains_tools-0.1.2.tar.gz -
Subject digest:
56dc3ffcb6d3e91709c8d47d79cecadbf362a5a1bdfcc63c618ff5ab19e6b760 - Sigstore transparency entry: 1404726226
- Sigstore integration time:
-
Permalink:
ljchang/dartbrains-tools@6a3d0109a5ce1c57a8aa1e0d72285c35035a45d1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ljchang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a3d0109a5ce1c57a8aa1e0d72285c35035a45d1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dartbrains_tools-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dartbrains_tools-0.1.2-py3-none-any.whl
- Upload date:
- Size: 46.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd2d6971e54294597d6a7c834db5651412d241ce6e257ad18ab868813432485b
|
|
| MD5 |
3479c90ebfa39517958c9a8dd3a0180d
|
|
| BLAKE2b-256 |
154e6641e6c5677a9ce207db56ce0d2152811463e72c171c07884c6189075b4c
|
Provenance
The following attestation bundles were made for dartbrains_tools-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on ljchang/dartbrains-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dartbrains_tools-0.1.2-py3-none-any.whl -
Subject digest:
fd2d6971e54294597d6a7c834db5651412d241ce6e257ad18ab868813432485b - Sigstore transparency entry: 1404726335
- Sigstore integration time:
-
Permalink:
ljchang/dartbrains-tools@6a3d0109a5ce1c57a8aa1e0d72285c35035a45d1 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ljchang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a3d0109a5ce1c57a8aa1e0d72285c35035a45d1 -
Trigger Event:
push
-
Statement type: