imperial-rocks / README.md
rfick's picture
Squash history: one commit holding the current files
f9c02f1
|
Raw History Blame Contribute Delete
12.6 kB
---
license: cc-by-4.0
pretty_name: imperial-rocks
---
# SubstrateCommons/imperial-rocks
Micro-CT sand packs and a sandstone walked on their own voxels through the label-volume producer: the surface-relaxation reference outside the brain, replayed as a CPMG decay. Relaxation is not in the walk -- one pack answers every relaxivity.
The reference it reproduces is [Pore-scale simulation of NMR response](https://doi.org/10.1016/j.petrol.2009.05.013) (Journal of Petroleum Science and Engineering), on the same object: **grade B** by the rule of [dmipy-sim#459](https://github.com/dmrai-lab/dmipy-sim/issues/459).
**These packs disagree with the published number.** `LV60A`: replayed 487.74 against 512 printed in Talabi O (2008), Pore Scale Simulation of NMR Response in Porous Media, Imperial College London PhD thesis, Table 7-2, p. 63, the 'Micro-CT' column of Mean T2 (ms): 4.738% of it, 8.6 standard uncertainties. The publication states no uncertainty (none stated: Table 7-2 prints one figure per sample with no error bar and the thesis quotes none, so the gate's budget rests on our own standard error alone), so this disagreement cannot be failed on and is recorded instead. No gate check fails on this: the publication states no uncertainty to fail it against, so the disagreement is a recorded number rather than a verdict.
1 of the gate's 31 checks failed; **§ The gate** below names each one.
Every number on this card is read from a record in `records/` of this dataset, written by the stage that measured it (the reference-pack protocol, [dmipy-sim#482](https://github.com/dmrai-lab/dmipy-sim/issues/482)); none of it is transcribed, so this card, the gate and any paper read the same files.
## The packs
| pack | substrate | channels | K | band (Hz) | T | walkers | contact: floor / err / target | positions: floor / err / target | size | licence | commit |
|---|---|---|---|---|---|---|---|---|---|---|---|
| `imperial-rocks/f42a` | `imperial2007/f42a` | positions, boundary_local_time, compartment | 128 | 21.3 | 3 s | 45,000 | 0.00589 / 5.3e-10 / 0.005 _below target_ | 0.00916 / 6.1e-06 / 0.005 _below target_ | 648.3 MB | CC-BY-4.0 | 30ad9b9a |
| `imperial-rocks/lv60a` | `imperial2007/lv60a` | positions, boundary_local_time, compartment | 128 | 21.3 | 3 s | 45,000 | 0.00483 / 5.2e-10 / 0.005 **meets** | 0.00855 / 3.7e-06 / 0.005 _below target_ | 648.3 MB | CC-BY-4.0 | 30ad9b9a |
**The trade the design records:** the target floor 0.005 needs 135,019 walkers and the 60 GB memory budget allows 42,391 (measured: 1.40 MB resident per walker in the pack stage on this window). The design therefore sets 42,391 walkers; the tier that holds its target at that count is contact, and every tier's achieved floor is certified in the pack and shown on the card.
The save grid is 200 us over 3 s (15,001 saves): the MARAN2 train's inter-echo time (thesis §7.3), so every echo of the train Talabi compared against falls on a save. The window holds 15,000 echoes; a 32,000-echo (6.4 s) train is beyond it and is refused rather than truncated
| pack | walk | sub-steps | refused steps | wall time | peak resident | budget |
|---|---|---|---|---|---|---|
| `F42A` | 45,000 walkers (recorded, not re-walked) | 1 | 40 | 522 s | 57.8 GB | 60.0 GB |
| `LV60A` | 45,000 walkers (recorded, not re-walked) | 1 | 37 | 525 s | 57.8 GB | 60.0 GB |
* the pack was walked at 45,000 walkers where this design's pilot sets 42,391; the walk is not repeated, and what holds it to the budget is its own RECORDED peak of 57.8 GB rather than the pilot's projection
## What is inside
Three orthogonal cross-sections through the centre of each substrate, rendered from the spec the pack embeds by `dmipy_sim.spec.preview` -- the same membership test the walk uses, so the picture cannot show a substrate the walk does not have.
### F42A
![F42A](previews/f42a.png)
* surface kinds: label_volume; pools free, grain
* pixel 9.996 um, scale bar 500 um
* area fraction in the x-centre section: free 0.3462, grain 0.6538 (the spec's realisation: porosity 0.3306, surface_to_volume 4.443e+04)
### LV60A
![LV60A](previews/lv60a.png)
* surface kinds: label_volume; pools free, grain
* pixel 10 um, scale bar 500 um
* area fraction in the x-centre section: free 0.3672, grain 0.6328 (the spec's realisation: porosity 0.3688, surface_to_volume 5.982e+04)
## The reproduction
**Grade B.** a published number, but NOT on the released geometry -- crop is ours and changes it, so the grade is B rather than A.
Their sample: the same released micro-CT images: his 'Micro-CT' column is a random walk on these very volumes, on the central 300^3 section (App. A-1), and his 'Experiment' column is a CPMG measured on the sand the images are of (the same object).
| substrate | quantity | replayed (this pack) | our direct walk | theirs | from | vs direct | band | holds | vs theirs |
|---|---|---|---|---|---|---|---|---|---|
| F42A | T2_log_mean | **674.383 ms** | 679 (SE 0.20%, delta_method, 200,000 walkers) | 677 ms | Table 7-2, p. 63, the 'Micro-CT' column of Mean T2 (ms) | 0.680% (1.2 σ) | 3.02 σ = 1.704% | yes | 0.387% (0.69 σ), no uncertainty stated |
| LV60A | T2_log_mean | **487.74 ms** | 487.6 (SE 0.20%, delta_method, 200,000 walkers) | 512 ms | Table 7-2, p. 63, the 'Micro-CT' column of Mean T2 (ms) | 0.029% (0.052 σ) | 3.02 σ = 1.666% | yes | 4.738% (8.6 σ), no uncertainty stated |
The quantity is compared on the grid the reference record states, with the solver it states; the gate refuses a reproduction on any other grid, because the grid is part of the measurement.
**The free parameters, and whose they are:**
* `rho` = 4.1e-05 m/s -- **theirs** (thesis §7.6.2): fitted by him to his own LV60Y / F42Y CPMG; an effective value tied to his ~10 um voxel, because a segmentation's surface is the Manhattan area at that resolution, which is what both walks relax against
* `D0` = 2.07e-09 m^2/s -- **theirs** (thesis eq. 7.1): the brine's self-diffusion at 308 K, stated
* `T2B` = 3.1 s -- **theirs** (thesis eq. 7.2): the brine's bulk T2, stated; applied at replay, not in the walk
* `crop` = central 300^3 voxels -- **ours** (thesis App. A-1 states the size, not the offset): a central cube: over all 3,442,951 possible 300^3 crops of LV60A the porosity spans [0.3555, 0.3713] and his 0.377 is not reachable, so the offset is ours
* `T2 inversion` = non-negative least squares with a second-difference penalty, lam = 0.1 (t2_distribution) - -- **ours** (thesis App. A-3 (after Chen et al. 1999)): his is an unconstrained normal-equation solve with a fourth-derivative penalty on 100 points from 0.1 ms; ours is non-negative with a second-difference penalty on 60 points from 1 ms, so the log-mean is comparable to his Table 7-2 rather than computed the same way
* `surface rule` = exp(-2 (rho/D) d_perp) per reflection - -- **ours** (thesis §3.5 for his): he kills a walker at an attempted move into a grain voxel with probability 2 rho s / (3 D); this walk weights it per specular reflection. The two agree in the continuum limit
**Where each number comes from:**
> F42A -- Talabi O (2008), Pore Scale Simulation of NMR Response in Porous Media, Imperial College London PhD thesis, Table 7-2, p. 63, the 'Micro-CT' column of Mean T2 (ms) ([10.25560/4261](https://doi.org/10.25560/4261), resolved via datacite at 2026-09-26T23:36:23Z as 'Pore Scale Simulation of NMR Response in Porous Media'): `F42A 668 677 756 42.0 59.0 61.5 5.2 5.8 3.6`
> LV60A -- Talabi O (2008), Pore Scale Simulation of NMR Response in Porous Media, Imperial College London PhD thesis, Table 7-2, p. 63, the 'Micro-CT' column of Mean T2 (ms) ([10.25560/4261](https://doi.org/10.25560/4261), resolved via datacite at 2026-09-26T23:36:23Z as 'Pore Scale Simulation of NMR Response in Porous Media'): `LV60A 496 512 565 32.2 35.3 27.2 4.8 4.9 3.8`
**Caveats:**
* **LV60A_crop** -- Talabi's 0.377 porosity is not reachable on the released LV60A image: over all 3,442,951 possible 300^3 crops the porosity spans [0.3555, 0.3713]. The offset he used is not recorded in the thesis, and a central cube is what his other six samples' porosities support. That is the whole of LV60A's porosity gap, and it is not the walk.
* **band** -- This is a RELAXATION pack. Its 200 us save grid is 22x coarser than the #143 rule asks of a Connectom, deliberately: the acquisition it reproduces carries no gradient at all. What keeps that honest is the pack's own band -- 21.33 Hz over the walk at K = 128, small and stated -- and a consumer replaying a gradient beyond it is refused by waveform_band rather than served a wrong number.
* **inversion** -- The log-mean is the weakest link in this comparison, and every number here is on a 1 ms sampling of the decay. Measured on F42A, which still holds 3.3 % of its signal at 3 s: 674.4 ms at 1 ms sampling, 668.0 at 10 ms, 309.7 at 20 ms -- a truncated decay lets the regularised solve split amplitude between a short and a very long component. LV60A, down to 1.0 %, is 487.7 / 487.6 / 487.4 at the same three. Over lam in [0.003, 1] and five T2 grids the log-mean spans 3.1 % on LV60A and 4.2 % on Berea.
## The gate
Deterministic, reading only the records: 31 checks, 1 failed. The tolerance is the design record's terms in quadrature -- an analytic standard error, the reference's own stated uncertainty, and any measured systematic -- with no coverage factor and no resampled error bar.
| pack | verdict | checks | failures |
|---|---|---|---|
| `F42A` | **FAIL** | 12 | `F42A/tier-contact-holds-as-designed` |
| `LV60A` | **pass** | 12 | — |
The failures, as the gate states them:
* F42A/tier-contact-holds-as-designed: floor 0.00589 and codec error 5.28e-10 against the target 0.005; the design record predicted this tier would hold at 42,391 walkers and it does NOT: the pilot's scaling was falsified by the pack's own certificate
## Use me
One call that reproduces one number of the table above. It was EXECUTED when this card was built (15.4 s, ceiling 60 s), against the local file of the same sha256 as `packs/lv60a.rpk`, and printed:
```
T2 log-mean 487.7 ms
```
```python
import numpy as np
from dmipy_sim.replay import ReplayPack
from examples.validation.talabi_micro_ct_rocks import t2_distribution, log_mean_T2
pk = ReplayPack.load("hf://SubstrateCommons/imperial-rocks/packs/lv60a.rpk")
ell = pk.contact() # the stored wall-contact channel, per save
L = np.cumsum(np.asarray(ell, np.float64), axis=1) # the boundary local time
t = np.arange(pk.n_t) * pk.dt
S = np.exp(pk.nominal.rho / 2.07e-09 * L - t / 3.1).mean(axis=0) # pk.nominal IS Talabi's rho and T2B
every = round(1.0e-3 / pk.dt) # the 1 ms sampling the record states
g = np.logspace(-3, 1, 60)
print("T2 log-mean %.1f ms" % (1e3 * log_mean_T2(g, t2_distribution(t[every::every], S[every::every], g))))
```
## Reference and licences
* the reference: Pore-scale simulation of NMR response, <https://doi.org/10.1016/j.petrol.2009.05.013> -- **cited, never redistributed**. Dong & Blunt 2009 (Phys Rev E 80:036307) images, Imperial College 2007 collection on Figshare; Talabi 2008 (Imperial College PhD thesis) for the reference random walk and the measured CPMG, published as Talabi et al., J. Pet. Sci. Eng. 2009.
* `figshare-f42a`: <https://doi.org/10.6084/m9.figshare.1189259.v1> at Figshare record 10.6084/m9.figshare.1189259.v1 (v1) -- **CC-BY-4.0** (<https://creativecommons.org/licenses/by/4.0/>), the host's text copied verbatim to `records/licences/figshare-f42a-CC-BY-4.0.txt` (18653 characters, sha256 `9ba9550ad484`); `F42A.nhdr` (`8e9d3fd1de57`, 373 B), `F42A.raw` (`cbdf8a83aca0`, 91.1 MB)
* `figshare-lv60a`: <https://doi.org/10.6084/m9.figshare.1153795.v2> at Figshare record 10.6084/m9.figshare.1153795.v2 (v2) -- **CC-BY-4.0** (<https://creativecommons.org/licenses/by/4.0/>), the host's text copied verbatim to `records/licences/figshare-lv60a-CC-BY-4.0.txt` (18653 characters, sha256 `9ba9550ad484`); `LV60A.nhdr` (`974e6b1ea230`, 377 B), `LV60A.raw` (`5a30136d0461`, 91.1 MB)
* the packs: CC-BY-4.0 images; the thesis is CC-BY-ND and its numbers are cited, never redistributed; the packs are CC-BY-4.0
*Rendered by `dmipy_sim.replay.reference` from this dataset's `records/`. A bare republish of a pack regenerates the manifest-only card of `dmipy_sim.replay.publish` and drops this one; the protocol's publish stage writes this file last.*