rfick commited on
Commit
f028e95
·
verified ·
1 Parent(s): e103964

Card: cross-sections, analytic validation, B0 rotation, and a runnable reproduction snippet

Browse files
README.md CHANGED
@@ -15,6 +15,12 @@ acquisition can be computed afterwards without re-simulating.
15
  them under CC-BY-4.0. This dataset contributes the computation and a documented, self-certifying container.
16
  Meshes are used as published — full length, no cropping, smoothing or re-meshing.
17
 
 
 
 
 
 
 
18
  ## What you can replay
19
 
20
  A replay pack stores the walk, not a table of pre-computed signals, so the forward model is evaluated at
@@ -34,6 +40,7 @@ read time:
34
  packs/axonNN.rpk 29 replay packs (~71 MB each)
35
  field/axonNN.field.rpk 29 susceptibility field companions, masked (14–36 MB each)
36
  manifest.json per-substrate metadata + SHA-256
 
37
  ```
38
 
39
  Total 2.54 GiB. The field companions are stored **masked** — an axon meanders, so a bounding box around it
@@ -59,16 +66,83 @@ would incur is a property you can read, not one you have to trust.
59
  Quote the **per-axon** floor rather than a dataset-wide number: it spans 4× across the set because it
60
  tracks each substrate's own internal-gradient variance, not the compression.
61
 
62
- ## Seeding
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
64
- The intra-axonal pool is seeded by an **exact ray-parity containment test**. An earlier unpublished build
65
- used a nearest-triangle test whose sidedness is only reliable close to a surface; over a padded box it
66
- accepted 13.6% of its points outside the lumen, at a median 10.2 µm from a wall bounding a radius of at
67
- most 1.24 µm — roughly 15% of that intra pool was unrestricted free water. Those packs were never released.
68
 
69
- Confinement here, judged against independent ray parity rather than the seeding test: of 509 genuinely
70
- interior seeds, 1.4% lie outside at TE, and those end 0.07 µm beyond the wall — within the one-triangle
71
- accuracy of the test that measures them.
 
72
 
73
  ## Citation
74
 
 
15
  them under CC-BY-4.0. This dataset contributes the computation and a documented, self-certifying container.
16
  Meshes are used as published — full length, no cropping, smoothing or re-meshing.
17
 
18
+ ![axon cross-sections](figures/fig_substrate.png)
19
+
20
+ *Cross-sections of `axon06` along its length, plus a 3-D view. Axon (inner) and myelin (outer) surfaces as
21
+ published — the calibre and tortuosity vary along the fibre, which is the morphology under study.
22
+ Generated by `report_assets.fig_substrate`.*
23
+
24
  ## What you can replay
25
 
26
  A replay pack stores the walk, not a table of pre-computed signals, so the forward model is evaluated at
 
40
  packs/axonNN.rpk 29 replay packs (~71 MB each)
41
  field/axonNN.field.rpk 29 susceptibility field companions, masked (14–36 MB each)
42
  manifest.json per-substrate metadata + SHA-256
43
+ figures/ the figures on this page, and the scripts that make them
44
  ```
45
 
46
  Total 2.54 GiB. The field companions are stored **masked** — an axon meanders, so a bounding box around it
 
66
  Quote the **per-axon** floor rather than a dataset-wide number: it spans 4× across the set because it
67
  tracks each substrate's own internal-gradient variance, not the compression.
68
 
69
+ ## Is the physics right?
70
+
71
+ Against an **exact** answer, not against another simulation. For an infinite coaxial hollow cylinder the
72
+ field inside the lumen is **exactly zero** at every orientation, and the sheath field is closed-form
73
+ `ΔB/B₀ = χ[−1/6 + ½(R_i²/r²)cos 2φ]`. Any deviation is discretisation error with no fitting freedom.
74
+
75
+ ![analytic validation](figures/fig_analytic_validation.png)
76
+
77
+ | | measured | exact |
78
+ |---|---|---|
79
+ | lumen field | **0.131%** of χ·B₀ | 0 |
80
+ | sheath amplitude | **0.9996×** analytic | 1 |
81
+ | sheath structure | **\|corr\| 0.9995** | 1 |
82
+
83
+ This is a permanent gate in the generator's test suite (`test_susceptibility_field_oracle.py`), not a
84
+ one-off check. It is what pins the **absolute** field amplitude — a hard binary myelin source rings into
85
+ the lumen at ~2.6% of χ·B₀ through the non-decaying dipole kernel, which would silently inflate
86
+ intra-axonal dephasing; partial-volume occupancy suppresses it to ~0.1%.
87
+
88
+ ## Susceptibility dephasing vs B₀ orientation
89
+
90
+ ![B0 rotation](figures/fig_b0_rotation.png)
91
+
92
+ Intra-axonal spin-echo signal at b = 0 as B₀ rotates from parallel to the fibre (0°) to perpendicular
93
+ (90°) — no diffusion weighting, so this isolates the susceptibility dephasing. Every one of the 29 axons
94
+ is shown.
95
+
96
+ The angular dependence matches the source study in shape (both minimise at 90°). The **magnitude differs**:
97
+ contrast 0.037 here against 0.015 published, i.e. ~2.4× more attenuation at 90°. That comparison, and the
98
+ field-solver question it raises, is analysed separately rather than resolved on this page — note only that
99
+ the two are validated against different references, and the closed-form check above is the one with an
100
+ exact answer.
101
+
102
+ ## Reproduce the curve yourself
103
+
104
+ The figure above is not stored — it is **computed from one pack at read time**. This is the whole point of
105
+ the format, so here it is in full:
106
+
107
+ ```python
108
+ import numpy as np
109
+ from huggingface_hub import hf_hub_download
110
+ from dmipy_sim import bank
111
+ from dmipy_sim.bank import read_rpk
112
+
113
+ path = hf_hub_download("SubstrateCommons/winther-g6-axons", "packs/axon06.rpk",
114
+ repo_type="dataset")
115
+ pk = read_rpk(path)
116
+ TE = (pk.n_t - 1) * pk.dt
117
+
118
+ class B0Only: # b = 0: isolate the susceptibility dephasing
119
+ G = np.zeros((1, pk.n_t, 3))
120
+ dt = pk.dt
121
+
122
+ signal = []
123
+ for deg in (0, 15, 30, 45, 60, 75, 90):
124
+ t = np.deg2rad(deg)
125
+ s = bank.replay_susc(pk, B0Only, b0_dir=[np.sin(t), 0.0, np.cos(t)],
126
+ B0=7.0, chi_iso=1.06e-6, refocus_time=TE / 2,
127
+ relaxation=False, complex_signal=True, compartment=1)
128
+ signal.append(float(np.real(s[0])))
129
+
130
+ print([round(x, 4) for x in signal])
131
+ # [0.9243, 0.9337, 0.9457, 0.9462, 0.9322, 0.9159, 0.9121]
132
+ ```
133
+
134
+ Nothing in that loop was decided when the pack was built. `B0=7.0` could be 3, `chi_iso` could be anything
135
+ including an anisotropic component, `compartment=1` could be the myelin pool, `B0Only.G` could be any
136
+ gradient waveform you like, and `refocus_time` places the spin echo wherever you want it. Each is a
137
+ parameter of the **replay**, not of the simulation — which is why one 71 MB file answers a question nobody
138
+ asked when it was written. Requires `pip install dmipy-sim`.
139
 
140
+ ## Seeding and confinement
 
 
 
141
 
142
+ The intra-axonal pool is seeded by an **exact ray-parity containment test**, and confinement is verified
143
+ against independent ray parity rather than against the seeding test itself: of 509 genuinely interior
144
+ seeds, 1.4% lie outside the surface at TE, and those end 0.07 µm beyond the wall — within the
145
+ one-triangle accuracy of the test that measures them.
146
 
147
  ## Citation
148
 
figures/fig_analytic_validation.png ADDED

Git LFS Details

  • SHA256: 8ccaa8c8f23826529c563d5b347a2d62d6971bf426425bafb80fb1137e313fc9
  • Pointer size: 131 Bytes
  • Size of remote file: 106 kB
figures/fig_b0_rotation.png ADDED

Git LFS Details

  • SHA256: 92a0035b6ee093a95053940248afd0407f06dcb5714850daacec3076396557b3
  • Pointer size: 131 Bytes
  • Size of remote file: 209 kB
figures/fig_substrate.png ADDED

Git LFS Details

  • SHA256: 28bbfb30c179219c2eed3b0d6f5825731362eebbd443515e91e98a3b91d64573
  • Pointer size: 131 Bytes
  • Size of remote file: 113 kB