Keep only abTEM expectation and regenerate detector measurements locally
Browse files- 4dstem/simulated_au_nanobeam_pg_dose1/README.md +81 -0
- 4dstem/simulated_au_nanobeam_pg_dose1/SHA256SUMS +6 -0
- 4dstem/simulated_au_nanobeam_pg_dose1/geometry.json +98 -0
- 4dstem/simulated_au_nanobeam_pg_dose1/meta.json +39 -0
- 4dstem/simulated_au_nanobeam_pg_dose1/noise-recipe.json +47 -0
- 4dstem/simulated_au_nanobeam_pg_dose1/truth-events-dose-1.0_data_000001.h5 +3 -0
- 4dstem/simulated_au_nanobeam_pg_dose1/truth-events-dose-1.0_master.h5 +3 -0
4dstem/simulated_au_nanobeam_pg_dose1/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Synthetic Au nanobeam: start with TV
|
| 2 |
+
|
| 3 |
+
Download **one noiseless abTEM scan**, not a collection of generated outputs.
|
| 4 |
+
The HDF5 master/data pair is about **121 MiB**: 32×32 scan positions,
|
| 5 |
+
192×192 detector pixels, dose-1 expected detected events in float32.
|
| 6 |
+
`geometry.json` supplies sampling and beam center; `noise-recipe.json` supplies
|
| 7 |
+
explicit synthetic parameters and random seeds. `SHA256SUMS` checks these inputs.
|
| 8 |
+
|
| 9 |
+
The tutorial generates its noisy observation, independent dark/flat exposures,
|
| 10 |
+
validity maps and `.pt` calibration artifacts **locally on CUDA**. Local
|
| 11 |
+
preparation took **1.2 s** on one RTX PRO 6000. Nothing is rounded to integer
|
| 12 |
+
counts before denoising. No measured experimental data or trained weights are
|
| 13 |
+
included. abTEM is not required to consume this precomputed expectation.
|
| 14 |
+
|
| 15 |
+
## Which tutorial first?
|
| 16 |
+
|
| 17 |
+
Use the matching Denova development checkout and its `docs/tutorials` directory:
|
| 18 |
+
|
| 19 |
+
1. **4dstem_2_tv.ipynb — recommended first.** About **36 s** for TV1 strength
|
| 20 |
+
selection/reconstruction, **42 s** across the original full notebook before
|
| 21 |
+
download. Local measurement preparation adds about 1.2 s. This measured
|
| 22 |
+
32×32 example ran under one minute; other GPUs, first-use compilation and
|
| 23 |
+
contention may take longer.
|
| 24 |
+
2. **4dstem_3_shine.ipynb — experimental comparison.** About **271 s (4½ min)**
|
| 25 |
+
for 64 epochs × 128 steps and reconstruction, **276 s** across all cells
|
| 26 |
+
before download/preparation. No pre-trained model is needed.
|
| 27 |
+
3. **4dstem_1_synthetic.ipynb — optional specimen regeneration.** About **12 s**
|
| 28 |
+
across code cells, including a **6.94 s** propagation/detector stage. This
|
| 29 |
+
requires abTEM, ASE, CuPy and the separate abtem-cuda accelerator.
|
| 30 |
+
|
| 31 |
+
Keep `synthetic_detector.py` beside the denoising notebooks. Install the
|
| 32 |
+
matching development code with `pip install -e '.[fourdstem]'`; a released
|
| 33 |
+
Denova version containing this revised API has not been verified. The tested
|
| 34 |
+
installed versions were QuantEM.GPU 0.0.1rc15 and QuantEM.Widget 0.0.1rc41.
|
| 35 |
+
|
| 36 |
+
```python
|
| 37 |
+
from quantem.widget.io import hub
|
| 38 |
+
from pathlib import Path
|
| 39 |
+
from synthetic_detector import prepare_measurements
|
| 40 |
+
|
| 41 |
+
source = Path(hub.download("simulated_au_nanobeam_pg_dose1", repo="bobleesj/quantem-data"))
|
| 42 |
+
data = prepare_measurements(source, Path("4dstem-results/inputs"))
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
The notebooks load the generated acquisition through QuantEM.GPU, let you
|
| 46 |
+
inspect a native scan rectangle in Show4DSTEM, independently fit detector
|
| 47 |
+
noise with `PoissonGaussian.calibrate`, show its maps and variance chart,
|
| 48 |
+
denoise, and compare truth/noisy/result at the same scan position. Truth and
|
| 49 |
+
generator parameters do not enter denoiser training or result selection.
|
| 50 |
+
Calibration `.pt` files and reconstruction outputs are saved locally.
|
| 51 |
+
|
| 52 |
+
## Measured quality: execution is not acceptance
|
| 53 |
+
|
| 54 |
+
On this new example, TV1 reduced ADU RMSE from **2.45 to 1.67**, but the
|
| 55 |
+
0–5% radial detector band failed the declared residual criteria. SHINE-PG
|
| 56 |
+
increased RMSE from **2.44 to 3.59**, with failures in both inner bands.
|
| 57 |
+
Both selectors returned `no_feasible_candidate`. The methods evaluate their
|
| 58 |
+
own processed masks; their RMSE rows are not a common-support ranking.
|
| 59 |
+
Use TV first for exploration, retain the failed audits, and do not infer
|
| 60 |
+
zero false peaks or scientific acceptance from a smooth image.
|
| 61 |
+
|
| 62 |
+
## What is and is not simulated?
|
| 63 |
+
|
| 64 |
+
300 kV, 0.622 mrad convergence, four static Au nanoparticles and a declared
|
| 65 |
+
25% diffuse Gaussian angular response (4 mrad SD). The background is
|
| 66 |
+
illustrative, not atomistic water/window scattering. Static-lattice and
|
| 67 |
+
infinite-projection assumptions require physical convergence studies.
|
| 68 |
+
Four accelerated patterns were bit-identical to native GPU abTEM; that
|
| 69 |
+
checks numerical execution, not experimental realism.
|
| 70 |
+
|
| 71 |
+
The local recipe draws independent Poisson events plus additive Gaussian
|
| 72 |
+
noise, with spatial gain, offset and four invalid detector pixels. Darks
|
| 73 |
+
and multilevel flats use separate seeds from the science observation.
|
| 74 |
+
This is a general positive-read-noise baseline, **not validated ARINA count-rate,
|
| 75 |
+
charge-sharing or covariance physics**, nor a reproduction of the frozen paper.
|
| 76 |
+
The older complete upload remains in version history; current downloads keep
|
| 77 |
+
only the reusable simulation input and small metadata.
|
| 78 |
+
|
| 79 |
+
Experimental inspiration: **Serin Lee and Andrew Barnum**,
|
| 80 |
+
[Au liquid-cell dataset](https://doi.org/10.5281/zenodo.18167694), CC BY 4.0.
|
| 81 |
+
Their experimental observations are not distributed here.
|
4dstem/simulated_au_nanobeam_pg_dose1/SHA256SUMS
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
da8d46245c5dd3c083dddf36a9a9aa6c9734ba380ff74421372d7d7d1927d4e1 README.md
|
| 2 |
+
a517d38291b837fad683051874e3ab8b7b82d09e1888e1f45ff08910f1d19e13 geometry.json
|
| 3 |
+
35095b4ea696cd4051bdd5882c18029915a9315a3a6e36823699f983d49b843f meta.json
|
| 4 |
+
6a355e059ab64cd3992b6fe998acc03f57c5a79e42b1915b497e75807ecd81ea noise-recipe.json
|
| 5 |
+
56b93a7558d0a22ece0701c1d8c3dd1b06d7d334c6ac603b7d623b537e9b34c5 truth-events-dose-1.0_data_000001.h5
|
| 6 |
+
0307c2b0f26ada4ee8ec21fe0c0810daad591c367cf584eb1b43b122f240c0b0 truth-events-dose-1.0_master.h5
|
4dstem/simulated_au_nanobeam_pg_dose1/geometry.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"scan_shape": [
|
| 3 |
+
32,
|
| 4 |
+
32
|
| 5 |
+
],
|
| 6 |
+
"detector_shape": [
|
| 7 |
+
192,
|
| 8 |
+
192
|
| 9 |
+
],
|
| 10 |
+
"detector_center": [
|
| 11 |
+
98.56053351439273,
|
| 12 |
+
100.36161400706591
|
| 13 |
+
],
|
| 14 |
+
"radius_100_percent": 96,
|
| 15 |
+
"scan_step_A": 6.875,
|
| 16 |
+
"cell_A": [
|
| 17 |
+
220,
|
| 18 |
+
220,
|
| 19 |
+
60
|
| 20 |
+
],
|
| 21 |
+
"energy_eV": 300000,
|
| 22 |
+
"semiangle_mrad": 0.622,
|
| 23 |
+
"defocus_A": 0,
|
| 24 |
+
"grid": [
|
| 25 |
+
1728,
|
| 26 |
+
1728
|
| 27 |
+
],
|
| 28 |
+
"slice_thickness_A": [
|
| 29 |
+
2.0,
|
| 30 |
+
2.0,
|
| 31 |
+
2.0,
|
| 32 |
+
2.0,
|
| 33 |
+
2.0,
|
| 34 |
+
2.0,
|
| 35 |
+
2.0,
|
| 36 |
+
2.0,
|
| 37 |
+
2.0,
|
| 38 |
+
2.0,
|
| 39 |
+
2.0,
|
| 40 |
+
2.0,
|
| 41 |
+
2.0,
|
| 42 |
+
2.0,
|
| 43 |
+
2.0,
|
| 44 |
+
2.0,
|
| 45 |
+
2.0,
|
| 46 |
+
2.0,
|
| 47 |
+
2.0,
|
| 48 |
+
2.0,
|
| 49 |
+
2.0,
|
| 50 |
+
2.0,
|
| 51 |
+
2.0,
|
| 52 |
+
2.0,
|
| 53 |
+
2.0,
|
| 54 |
+
2.0,
|
| 55 |
+
2.0,
|
| 56 |
+
2.0,
|
| 57 |
+
2.0,
|
| 58 |
+
2.0
|
| 59 |
+
],
|
| 60 |
+
"angular_sampling_mrad": 0.3579543435950485,
|
| 61 |
+
"detector_integration": "4x4 simulated angular samples; native 192x192 output",
|
| 62 |
+
"projection": "infinite",
|
| 63 |
+
"lattice": "static; no frozen phonon convergence",
|
| 64 |
+
"diffuse_fraction": 0.25,
|
| 65 |
+
"diffuse_sigma_mrad": 4,
|
| 66 |
+
"liquid_model": "assumed angular convolution, not atomistic liquid/window physics",
|
| 67 |
+
"abtem_parity": {
|
| 68 |
+
"bit_identical": true,
|
| 69 |
+
"max_abs_error": 0.0,
|
| 70 |
+
"relative_l2": 0.0
|
| 71 |
+
},
|
| 72 |
+
"scan_seconds": 6.936930592637509,
|
| 73 |
+
"timing_scope": "propagation, diffuse response, detector integration; excludes setup/parity",
|
| 74 |
+
"axis_convention": "abTEM x,y mapped to scan/detector row,col in this example",
|
| 75 |
+
"realism": "physically motivated synthetic; not validated ARINA or matched to Serin",
|
| 76 |
+
"relative_doses": [
|
| 77 |
+
1.0
|
| 78 |
+
],
|
| 79 |
+
"incident_events_per_position": 90000,
|
| 80 |
+
"science_seeds": [
|
| 81 |
+
1000
|
| 82 |
+
],
|
| 83 |
+
"calibration_seeds": {
|
| 84 |
+
"dark": 2000,
|
| 85 |
+
"flat": 2001,
|
| 86 |
+
"check": 2002
|
| 87 |
+
},
|
| 88 |
+
"noise_model": "independent Poisson arrivals plus additive Gaussian ADU",
|
| 89 |
+
"versions": {
|
| 90 |
+
"denova": "0.0.1.dev318+g0b24283c8",
|
| 91 |
+
"abtem": "1.0.9",
|
| 92 |
+
"quantem.gpu": "0.0.1rc15",
|
| 93 |
+
"cupy": "14.2.0",
|
| 94 |
+
"abtem_cuda_module_sha256": "3d7a59c30f32762dacfd482486ec32e25e1fc8e83792c52ac612b85820b10478"
|
| 95 |
+
},
|
| 96 |
+
"storage": "QuantEM.GPU bitshuffle/LZ4 HDF5; lossless float32; one dose-1 expectation",
|
| 97 |
+
"data_credit": "Serin Lee and Andrew Barnum, Zenodo 10.5281/zenodo.18167694 (inspiration only)"
|
| 98 |
+
}
|
4dstem/simulated_au_nanobeam_pg_dose1/meta.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "Synthetic Au nanobeam Poisson-Gaussian dose 1.0",
|
| 3 |
+
"source": "abTEM-cuda synthetic Au nanobeam scan; assumed independent Poisson-Gaussian detector; no experimental measurements",
|
| 4 |
+
"date": "2026-10-11",
|
| 5 |
+
"sample": "Four static Au nanoparticles and an illustrative diffuse angular response",
|
| 6 |
+
"shape": [
|
| 7 |
+
32,
|
| 8 |
+
32,
|
| 9 |
+
192,
|
| 10 |
+
192
|
| 11 |
+
],
|
| 12 |
+
"dtype": "float32",
|
| 13 |
+
"permission": {
|
| 14 |
+
"received": true,
|
| 15 |
+
"from": [
|
| 16 |
+
"bobleesj"
|
| 17 |
+
],
|
| 18 |
+
"collectors": [
|
| 19 |
+
"Synthetic generator; no microscope acquisition"
|
| 20 |
+
],
|
| 21 |
+
"date": "2026-10-11"
|
| 22 |
+
},
|
| 23 |
+
"sampling": [
|
| 24 |
+
6.875,
|
| 25 |
+
6.875,
|
| 26 |
+
0.3579543435950485,
|
| 27 |
+
0.3579543435950485
|
| 28 |
+
],
|
| 29 |
+
"units": [
|
| 30 |
+
"angstrom",
|
| 31 |
+
"angstrom",
|
| 32 |
+
"mrad",
|
| 33 |
+
"mrad"
|
| 34 |
+
],
|
| 35 |
+
"voltage_kV": 300,
|
| 36 |
+
"semiangle_mrad": 0.622,
|
| 37 |
+
"relative_dose": 1.0,
|
| 38 |
+
"credit": "Serin Lee and Andrew Barnum, DOI 10.5281/zenodo.18167694, experimental inspiration only"
|
| 39 |
+
}
|
4dstem/simulated_au_nanobeam_pg_dose1/noise-recipe.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"detector_shape": [
|
| 3 |
+
192,
|
| 4 |
+
192
|
| 5 |
+
],
|
| 6 |
+
"gain": 1.5,
|
| 7 |
+
"gain_modulation": 0.04,
|
| 8 |
+
"gain_row_scale": 13,
|
| 9 |
+
"gain_col_scale": 19,
|
| 10 |
+
"offset": 2,
|
| 11 |
+
"offset_modulation": 0.15,
|
| 12 |
+
"offset_row_scale": 21,
|
| 13 |
+
"read_noise_sd": 0.6,
|
| 14 |
+
"max_events": 32768,
|
| 15 |
+
"invalid_pixels": [
|
| 16 |
+
[
|
| 17 |
+
12,
|
| 18 |
+
22
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
30,
|
| 22 |
+
161
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
150,
|
| 26 |
+
32
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
177,
|
| 30 |
+
170
|
| 31 |
+
]
|
| 32 |
+
],
|
| 33 |
+
"science_seed": 1000,
|
| 34 |
+
"dark_seed": 2000,
|
| 35 |
+
"flat_seed": 2001,
|
| 36 |
+
"check_seed": 2002,
|
| 37 |
+
"dark_repeats": 512,
|
| 38 |
+
"flat_repeats": 256,
|
| 39 |
+
"check_repeats": 128,
|
| 40 |
+
"flat_levels": [
|
| 41 |
+
1.0,
|
| 42 |
+
16.0,
|
| 43 |
+
256.0,
|
| 44 |
+
4096.0,
|
| 45 |
+
32768.0
|
| 46 |
+
]
|
| 47 |
+
}
|
4dstem/simulated_au_nanobeam_pg_dose1/truth-events-dose-1.0_data_000001.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56b93a7558d0a22ece0701c1d8c3dd1b06d7d334c6ac603b7d623b537e9b34c5
|
| 3 |
+
size 126072312
|
4dstem/simulated_au_nanobeam_pg_dose1/truth-events-dose-1.0_master.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0307c2b0f26ada4ee8ec21fe0c0810daad591c367cf584eb1b43b122f240c0b0
|
| 3 |
+
size 8568
|