Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
meta: struct<rpk_schema_version: string, id: string, compression: struct<method: string, K: int64, walker_ (... 5383 chars omitted)
  child 0, rpk_schema_version: string
  child 1, id: string
  child 2, compression: struct<method: string, K: int64, walker_preserving: bool, container: list<item: struct<bands: list<i (... 954 chars omitted)
      child 0, method: string
      child 1, K: int64
      child 2, walker_preserving: bool
      child 3, container: list<item: struct<bands: list<item: int64>, bits: int64>>
          child 0, item: struct<bands: list<item: int64>, bits: int64>
              child 0, bands: list<item: int64>
                  child 0, item: int64
              child 1, bits: int64
      child 4, temporal_bandwidth_hz: int64
      child 5, channels: struct<compartment: struct<channel: string, columns: list<item: struct<name: string, kind: string>>> (... 507 chars omitted)
          child 0, compartment: struct<channel: string, columns: list<item: struct<name: string, kind: string>>>
              child 0, channel: string
              child 1, columns: list<item: struct<name: string, kind: string>>
                  child 0, item: struct<name: string, kind: string>
                      child 0, name: string
                      child 1, kind: string
          child 1, boundary_local_time: struct<channel: string, mode: string, T: double, K: int64, dtype: string, container: list<item: stru (... 43 chars omitted)
              child 0, channel: string
     
...
: struct<dtype: string, shape: list<item: int64>, per_row: bool, parts: list<item: struct<file: string (... 50 chars omitted)
      child 0, dtype: string
      child 1, shape: list<item: int64>
          child 0, item: int64
      child 2, per_row: bool
      child 3, parts: list<item: struct<file: string, rows: null, data_offset: int64, nbytes: int64>>
          child 0, item: struct<file: string, rows: null, data_offset: int64, nbytes: int64>
              child 0, file: string
              child 1, rows: null
              child 2, data_offset: int64
              child 3, nbytes: int64
path_groups: list<item: int64>
  child 0, item: int64
rows: list<item: struct<ijk: list<item: int64>, pool: int64, start: int64, end: int64>>
  child 0, item: struct<ijk: list<item: int64>, pool: int64, start: int64, end: int64>
      child 0, ijk: list<item: int64>
          child 0, item: int64
      child 1, pool: int64
      child 2, start: int64
      child 3, end: int64
grid: struct<shape: list<item: int64>, voxel_size_m: list<item: double>, origin_m: list<item: double>, iso (... 60 chars omitted)
  child 0, shape: list<item: int64>
      child 0, item: int64
  child 1, voxel_size_m: list<item: double>
      child 0, item: double
  child 2, origin_m: list<item: double>
      child 0, item: double
  child 3, isocenter_m: list<item: double>
      child 0, item: double
  child 4, frame: string
  child 5, attach: string
band_groups: list<item: int64>
  child 0, item: int64
n_rows: int64
to
{'grid': {'shape': List(Value('int64')), 'voxel_size_m': List(Value('float64')), 'origin_m': List(Value('float64')), 'isocenter_m': List(Value('float64')), 'frame': Value('string'), 'attach': Value('string')}, 'n_rows': Value('int64'), 'band_groups': List(Value('int64')), 'path_groups': List(Value('int64')), 'rows': List({'ijk': List(Value('int64')), 'pool': Value('int64'), 'start': Value('int64'), 'end': Value('int64')})}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3052, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              meta: struct<rpk_schema_version: string, id: string, compression: struct<method: string, K: int64, walker_ (... 5383 chars omitted)
                child 0, rpk_schema_version: string
                child 1, id: string
                child 2, compression: struct<method: string, K: int64, walker_preserving: bool, container: list<item: struct<bands: list<i (... 954 chars omitted)
                    child 0, method: string
                    child 1, K: int64
                    child 2, walker_preserving: bool
                    child 3, container: list<item: struct<bands: list<item: int64>, bits: int64>>
                        child 0, item: struct<bands: list<item: int64>, bits: int64>
                            child 0, bands: list<item: int64>
                                child 0, item: int64
                            child 1, bits: int64
                    child 4, temporal_bandwidth_hz: int64
                    child 5, channels: struct<compartment: struct<channel: string, columns: list<item: struct<name: string, kind: string>>> (... 507 chars omitted)
                        child 0, compartment: struct<channel: string, columns: list<item: struct<name: string, kind: string>>>
                            child 0, channel: string
                            child 1, columns: list<item: struct<name: string, kind: string>>
                                child 0, item: struct<name: string, kind: string>
                                    child 0, name: string
                                    child 1, kind: string
                        child 1, boundary_local_time: struct<channel: string, mode: string, T: double, K: int64, dtype: string, container: list<item: stru (... 43 chars omitted)
                            child 0, channel: string
                   
              ...
              : struct<dtype: string, shape: list<item: int64>, per_row: bool, parts: list<item: struct<file: string (... 50 chars omitted)
                    child 0, dtype: string
                    child 1, shape: list<item: int64>
                        child 0, item: int64
                    child 2, per_row: bool
                    child 3, parts: list<item: struct<file: string, rows: null, data_offset: int64, nbytes: int64>>
                        child 0, item: struct<file: string, rows: null, data_offset: int64, nbytes: int64>
                            child 0, file: string
                            child 1, rows: null
                            child 2, data_offset: int64
                            child 3, nbytes: int64
              path_groups: list<item: int64>
                child 0, item: int64
              rows: list<item: struct<ijk: list<item: int64>, pool: int64, start: int64, end: int64>>
                child 0, item: struct<ijk: list<item: int64>, pool: int64, start: int64, end: int64>
                    child 0, ijk: list<item: int64>
                        child 0, item: int64
                    child 1, pool: int64
                    child 2, start: int64
                    child 3, end: int64
              grid: struct<shape: list<item: int64>, voxel_size_m: list<item: double>, origin_m: list<item: double>, iso (... 60 chars omitted)
                child 0, shape: list<item: int64>
                    child 0, item: int64
                child 1, voxel_size_m: list<item: double>
                    child 0, item: double
                child 2, origin_m: list<item: double>
                    child 0, item: double
                child 3, isocenter_m: list<item: double>
                    child 0, item: double
                child 4, frame: string
                child 5, attach: string
              band_groups: list<item: int64>
                child 0, item: int64
              n_rows: int64
              to
              {'grid': {'shape': List(Value('int64')), 'voxel_size_m': List(Value('float64')), 'origin_m': List(Value('float64')), 'isocenter_m': List(Value('float64')), 'frame': Value('string'), 'attach': Value('string')}, 'n_rows': Value('int64'), 'band_groups': List(Value('int64')), 'path_groups': List(Value('int64')), 'rows': List({'ijk': List(Value('int64')), 'pool': Value('int64'), 'start': Value('int64'), 'end': Value('int64')})}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

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. It is smaller and faster, but answers only those timings.

What the pack is certified for

This pack is certified for any acquisition in the class below, not for a list of protocols.

Scanner class Connectome 2.0: G_max 0.5 T/m, slew 600 T/m/s
Waveforms any within the class: 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/.

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.
Downloads last month
309

Spaces using SubstrateCommons/disco-replay 2