--- license: - cc-by-nc-sa-4.0 - other pretty_name: DiSCo replay pack tags: - diffusion-mri - monte-carlo - replay-pack - tractography-phantom --- # DiSCo as a replay pack The DiSCo substrate (Rafael-Patino, Girard, Truffet, Pizzolato, Caruyer, Thiran, *The diffusion-simulated connectivity (DiSCo) dataset*, Data in Brief 38 (2021) 107429, doi:10.1016/j.dib.2021.107429; data doi:10.17632/fgf86jdfg6.3) walked once and stored as a replay pack. Any acquisition a human scanner can play is then a replay of the same walk, voxel by voxel on the dataset's own 40³ grid of 25 µm voxels, and every replay carries a Monte-Carlo certificate. DiSCo published one acquisition of this substrate. This dataset is the substrate itself in replayable form: - The same 12,196 strands, two tubes per strand: the listed inner diameter, and the outer tube at 1/0.7 of it. - The dataset's diffusivity, 0.6 × 10⁻⁹ m²/s, in both pools: intra water inside the inner tube and extra water outside the outer one. - 321,138,027 walkers walked for 100 ms on 31,815 of the 64,000 voxels; the rest hold no water. - Every tier stored: positions in 256 bands, occupancy, wall contact (8 bands), and the myelin sheath's field along each path (12 channels, 32 modes). The time-segment layout of the same walk, at DiSCo's own seven timing classes, is a separate dataset: [SubstrateCommons/disco-time-segments](https://huggingface.co/datasets/SubstrateCommons/disco-time-segments). It is smaller and faster, but answers only those timings. ## What the pack is certified for This pack is certified for **any acquisition inside the envelope below**, not for a list of protocols. | | | |---|---| | Envelope | `connectome_2`: band 1280 Hz (256 bands per 100 ms window), G_max 0.5 T/m per axis, B₀ list 1.5, 3, 7 T (`replay_envelope.acquisition` in the header) | | Waveforms | any within the envelope: PGSE, OGSE, stimulated echo, arbitrary; up to 16 refocusing pulses; TE ≤ 100 ms | | Relaxation | T₂ and T₁ per pool, surface relaxivity ρ₂ ≤ 3 µm/s | | Field | B₀ of 1.5, 3 or 7 T in any direction, myelin χ up to 2 × 10⁻⁷ (isotropic and anisotropic) | | Floor | 1.003 %: the per-voxel standard error that the walker count was planned for | | Numerical error | ≤ 1.66 × 10⁻³ in the complex signal, under half the floor: truncation, quadrature, field read and quantisation together | The certificate lives in `disco/manifest.json` under `meta.fidelity`, term by term. It is inherited from an admission walk measured on the same engine, recipe and container (`inherited_from`). The per-voxel floor is measured from each voxel's own walkers at replay. ## Use me Install dmipy-sim from its main branch, where the reader lives. The dataset is public, so no login is needed: ``` pip install "git+https://github.com/dmrai-lab/dmipy-sim@main" "huggingface_hub>=0.25" ``` Open the pack by reference. Nothing is downloaded whole: every byte read is one the replay uses, fetched as HTTP range reads of the columnar layout under `disco/`. ```python import numpy as np from dmipy_sim.replay import ReplayPack from dmipy_sim import sequences from dmipy_sim.spec.tissue import Tissue pack = ReplayPack.open("hf://SubstrateCommons/disco-replay/disco") seq = sequences.pgse([[1, 0, 0], [0, 0, 1]], 0.0102, 0.0167, bvalues=[1e9, 3.094e9], TE=0.0535) # SI: s/m², s print(pack.plan(seq)) # bands, tiers and bytes, decided before any transfer view = pack.view(K=32, voxels=[(20, 20, 20)]) # one voxel's rows at 32 bands: an ordinary ReplayPack S = view.replay(seq) # bare diffusion, the dataset's own physics wm = Tissue(T2={"intra": 0.05, "extra": 0.055, "myelin": 0.01}, rho2=1e-6, chi_iso=-1e-7, chi_aniso=-1e-7) view = pack.view(K=32, modes=8, contact=True, voxels=[(20, 20, 20)]) # the tiers this physics needs S_3T = view.replay(seq, tissue=wm, scanner=3.0) # relaxation, wall contact and the sheath field at 3 T ``` `pack.plan(seq)` says how many bands and field modes an acquisition needs, and so how many bytes it reads. A clinical scanner reads only a prefix of the bands. ## Files | path | what | size | |---|---|---| | `disco/manifest.json` | the pack's header: substrate, walk, envelope, codec, certificate, provenance | 0.8 MB | | `disco/index.json` | the rows of each voxel and pool | 3.4 MB | | `disco/columns/` | the columns, split into parts of ≤ 1.3 GB | 294 GB | | `substrate/` | the strand files the walk read, and their source note | | | `disco/reference/DiSCo_gradients.*` | DiSCo's own gradient table, from which the time-segment classes were taken | | ## How it was made - **Walk:** dmipy-sim. Blocks of 99.5 µs with adaptive sub-steps, own-tube wall interaction, and the strand field read every 33 µs. The tiers were accumulated in the walk as band projections; no trajectory was stored. - **Planning:** walker counts per voxel and pool from a pilot at the class envelope, so that each voxel reaches the floor under any combination of the tiers. - **Assembly:** 704 shards, merged in block order into one pack. - **Checks:** the merged pack was replayed against the time-segment layout at 16 voxels and the seven timing classes. The worst disagreement was 2.2 × 10⁻⁵, against a combined bound of 3.0 × 10⁻³. ## Licence The replay pack is distributed under **CC BY-NC-SA 4.0**, or a commercial licence on request (`pack_license: CC-BY-NC-SA-4.0 OR LicenseRef-Commercial` in the header). The DiSCo substrate it was walked in is the DiSCo authors' work, CC BY 4.0 (`license` in the header). Cite both. ## Citation - Rafael-Patino J, Girard G, Truffet R, Pizzolato M, Caruyer E, Thiran J-P. The diffusion-simulated connectivity (DiSCo) dataset. Data in Brief 38 (2021) 107429. - Fick RHJ. Replayable Monte Carlo MRI: from persistent tissue microphysics to queryable virtual phantoms (in preparation, 2026). dmipy-sim, https://github.com/dmrai-lab/dmipy-sim.