Delete denoise/03_generate_abtem.ipynb
Browse files- denoise/03_generate_abtem.ipynb +0 -311
denoise/03_generate_abtem.ipynb
DELETED
|
@@ -1,311 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"cells": [
|
| 3 |
-
{
|
| 4 |
-
"cell_type": "markdown",
|
| 5 |
-
"metadata": {},
|
| 6 |
-
"source": [
|
| 7 |
-
"# 3. Generate the optional abTEM specimen\n",
|
| 8 |
-
"\n",
|
| 9 |
-
"**Question.** If the specimen is unchanged, what disappears first when fewer electrons are measured?\n",
|
| 10 |
-
"\n",
|
| 11 |
-
"**What you will learn.** Generate Au diffraction with abTEM-cuda, add a declared liquid-inspired diffuse response, draw a dose-1.0 observation, then independently recover one reusable detector calibration. Optional doses 0.8, 0.6 and 0.4 reuse the same specimen.\n",
|
| 12 |
-
"\n",
|
| 13 |
-
"**Before you run it.** Predict whether lowering dose changes expected spot positions, absolute noise, relative noise, or all three. This tutorial generates data only; TV and SHINE have separate notebooks. It is physically motivated, not a validated ARINA simulator or a reproduction of the frozen paper benchmark.\n",
|
| 14 |
-
"\n",
|
| 15 |
-
"**Typical run time.** About 12 s across the code cells in the tested 32×32 example on one RTX PRO 6000 GPU, excluding kernel startup. Propagation, diffuse response and detector integration took about 7 s. Noise draws reuse the same noiseless scan. GPU contention and first-use compilation affect timing.\n",
|
| 16 |
-
"\n",
|
| 17 |
-
"## Environment\n",
|
| 18 |
-
"Use a CUDA environment with Denova's `fourdstem` extra, abTEM, ASE and CuPy. The optional `abtem-cuda` accelerator is a local repository, not an assumed PyPI package; install the reviewed checkout according to its README. The shipped `abtem_nanobeam.py` is tutorial support for GPU potential construction and bounded propagation, not a Denova solver.\n",
|
| 19 |
-
"\n",
|
| 20 |
-
"Open this notebook in its `docs/tutorials/` directory so its neighboring support module is importable. Check `nvidia-smi`, then launch the kernel with `CUDA_VISIBLE_DEVICES=0`. CPU orchestration/atomic coordinates and file export are allowed; potential, propagation, noise and calibration arithmetic stay on GPU 0.\n",
|
| 21 |
-
"\n",
|
| 22 |
-
"The shared tutorial example uses one relative dose, 1.0. To compare dose dependence, extend `DOSES` after validating the single-dose workflow. TV and SHINE can instead download the shared bundle, so this generation notebook is optional for denoising users.\n"
|
| 23 |
-
],
|
| 24 |
-
"id": "0e935b49"
|
| 25 |
-
},
|
| 26 |
-
{
|
| 27 |
-
"cell_type": "code",
|
| 28 |
-
"metadata": {},
|
| 29 |
-
"source": [
|
| 30 |
-
"from pathlib import Path\n",
|
| 31 |
-
"from hashlib import sha256\n",
|
| 32 |
-
"import json\n",
|
| 33 |
-
"from importlib.metadata import version\n",
|
| 34 |
-
"import pandas as pd\n",
|
| 35 |
-
"import torch\n",
|
| 36 |
-
"import cupy as cp\n",
|
| 37 |
-
"import abtem_cuda\n",
|
| 38 |
-
"import quantem.widget as qw\n",
|
| 39 |
-
"from quantem.gpu import io as qio\n",
|
| 40 |
-
"from ase.io import write as write_atoms\n",
|
| 41 |
-
"from abtem_nanobeam import generate_diffraction\n",
|
| 42 |
-
"from synthetic_detector import RECIPE, detector_model\n",
|
| 43 |
-
"from denova.noise import PoissonGaussian\n",
|
| 44 |
-
"from denova.fourdstem import simulate\n",
|
| 45 |
-
"\n",
|
| 46 |
-
"DATA = Path(\"4dstem-tutorial\")\n",
|
| 47 |
-
"SCAN_SIDE = 32\n",
|
| 48 |
-
"DOSES = (1.0,) # Optional dose study: (1.0, 0.8, 0.6, 0.4)\n",
|
| 49 |
-
"INCIDENT_EVENTS = 90000\n",
|
| 50 |
-
"DATA.mkdir(exist_ok=True)\n",
|
| 51 |
-
"qw.profile()"
|
| 52 |
-
],
|
| 53 |
-
"execution_count": null,
|
| 54 |
-
"outputs": [],
|
| 55 |
-
"id": "8dd165e1"
|
| 56 |
-
},
|
| 57 |
-
{
|
| 58 |
-
"cell_type": "markdown",
|
| 59 |
-
"metadata": {},
|
| 60 |
-
"source": [
|
| 61 |
-
"## What remains fixed while dose changes?\n",
|
| 62 |
-
"Four static Au spheres span [001], [011], [111] and a general orientation. The beam is 300 kV with 0.622 mrad convergence. The 220×220 Å cell is scanned directly on a 32×32 grid; set `SCAN_SIDE=64` for a denser scan, without interpolating scan positions. The final detector is 192×192.\n",
|
| 63 |
-
"\n",
|
| 64 |
-
"A declared 25% diffuse angular response with 4 mrad width represents an **illustrative liquid-like background**. It is not atomistic water/window scattering and is not fitted to Serin's measurements. The retained infinite-projection, static-lattice approximation also needs convergence checks before quantitative materials claims.\n",
|
| 65 |
-
"\n",
|
| 66 |
-
"The helper first compares four accelerated Au patterns with native GPU abTEM and stops if they are not bit-identical. This checks numerical execution, not physical realism."
|
| 67 |
-
],
|
| 68 |
-
"id": "b23a7626"
|
| 69 |
-
},
|
| 70 |
-
{
|
| 71 |
-
"cell_type": "code",
|
| 72 |
-
"metadata": {},
|
| 73 |
-
"source": [
|
| 74 |
-
"probability_cp, atoms, geometry = generate_diffraction(\n",
|
| 75 |
-
" scan_side=SCAN_SIDE, diffuse_fraction=0.25, diffuse_sigma_mrad=4,\n",
|
| 76 |
-
")\n",
|
| 77 |
-
"probability_t = torch.from_dlpack(probability_cp)\n",
|
| 78 |
-
"truth1_t = probability_t * INCIDENT_EVENTS\n",
|
| 79 |
-
"write_atoms(DATA / \"au-scene.extxyz\", atoms)\n",
|
| 80 |
-
"pd.DataFrame([geometry[\"abtem_parity\"]])"
|
| 81 |
-
],
|
| 82 |
-
"execution_count": null,
|
| 83 |
-
"outputs": [],
|
| 84 |
-
"id": "f0f4d4c0"
|
| 85 |
-
},
|
| 86 |
-
{
|
| 87 |
-
"cell_type": "code",
|
| 88 |
-
"metadata": {},
|
| 89 |
-
"source": [
|
| 90 |
-
"qw.Show4DSTEM(truth1_t)"
|
| 91 |
-
],
|
| 92 |
-
"execution_count": null,
|
| 93 |
-
"outputs": [],
|
| 94 |
-
"id": "b3818506"
|
| 95 |
-
},
|
| 96 |
-
{
|
| 97 |
-
"cell_type": "markdown",
|
| 98 |
-
"metadata": {},
|
| 99 |
-
"source": [
|
| 100 |
-
"## What should a lower-dose observation look like?\n",
|
| 101 |
-
"Select different particles and liquid-like positions in the viewer. The noiseless intensity scales with dose; spot positions do not move. The expected signal is $u_d=d\\,u_1$.\n",
|
| 102 |
-
"\n",
|
| 103 |
-
"`INCIDENT_EVENTS` is an assumed incident count per probe position. The detector captures only part of the scattered intensity: we do **not** renormalize each cropped pattern to unit sum. This is relative dose, not a measured experimental electrons/Ų calibration.\n",
|
| 104 |
-
"\n",
|
| 105 |
-
"The synthetic detector below has gain, pedestal and positive Gaussian read noise. These parameters are declared assumptions, not recovered ARINA parameters. The four invalid detector pixels remain separately masked; zero observations elsewhere are valid."
|
| 106 |
-
],
|
| 107 |
-
"id": "02ca40ef"
|
| 108 |
-
},
|
| 109 |
-
{
|
| 110 |
-
"cell_type": "code",
|
| 111 |
-
"metadata": {},
|
| 112 |
-
"source": [
|
| 113 |
-
"known = detector_model(RECIPE)\n",
|
| 114 |
-
"valid_t = known.valid\n",
|
| 115 |
-
"known.save(DATA / \"generator-only.pt\")\n",
|
| 116 |
-
"(DATA / \"noise-recipe.json\").write_text(json.dumps(RECIPE, indent=2) + \"\\n\")\n",
|
| 117 |
-
"observations = {\n",
|
| 118 |
-
" dose: simulate(dose * truth1_t, noise=known, seed=1000 + index)\n",
|
| 119 |
-
" for index, dose in enumerate(DOSES)\n",
|
| 120 |
-
"}"
|
| 121 |
-
],
|
| 122 |
-
"execution_count": null,
|
| 123 |
-
"outputs": [],
|
| 124 |
-
"id": "057672d9"
|
| 125 |
-
},
|
| 126 |
-
{
|
| 127 |
-
"cell_type": "code",
|
| 128 |
-
"metadata": {},
|
| 129 |
-
"source": [
|
| 130 |
-
"qw.Show4DSTEM(torch.stack(list(observations.values())), view_mode=\"multiple\",\n",
|
| 131 |
-
" frame_labels=[f\"Relative dose {dose:.1f}\" for dose in DOSES])"
|
| 132 |
-
],
|
| 133 |
-
"execution_count": null,
|
| 134 |
-
"outputs": [],
|
| 135 |
-
"id": "dd58eb8d"
|
| 136 |
-
},
|
| 137 |
-
{
|
| 138 |
-
"cell_type": "markdown",
|
| 139 |
-
"metadata": {},
|
| 140 |
-
"source": [
|
| 141 |
-
"## Observe first, then explain the noise\n",
|
| 142 |
-
"**Observe.** Compare the same detector region and scan position at each dose. Do faint spots become harder to distinguish? Does the diffuse region contain more zero or below-pedestal values? Change contrast consistently across panels.\n",
|
| 143 |
-
"\n",
|
| 144 |
-
"The simulator draws counting noise before read noise:\n",
|
| 145 |
-
"$$K_d\\sim\\mathrm{Poisson}(d u_1),\\qquad Y_d=b+\\alpha K_d+\\epsilon,\\quad\\epsilon\\sim\\mathcal N(0,s^2).$$\n",
|
| 146 |
-
"Thus $\\operatorname{Var}(Y_d)=\\alpha^2d u_1+s^2$. Absolute shot fluctuations fall with dose, but fractional uncertainty grows; the read-noise term does not shrink. Each dose has a fresh noise draw, rather than a rescaled noisy image. Signed ADU are preserved, with no clipping or integer rounding.\n",
|
| 147 |
-
"\n",
|
| 148 |
-
"## How would we discover those detector parameters independently?\n",
|
| 149 |
-
"In real work, blank the beam for repeated dark frames, then acquire repeated stable flats at several illumination levels in the **same detector mode**. Do not estimate detector noise from particle-to-particle differences. Here distinct seeds separate these calibration exposures from all science observations."
|
| 150 |
-
],
|
| 151 |
-
"id": "3127219c"
|
| 152 |
-
},
|
| 153 |
-
{
|
| 154 |
-
"cell_type": "code",
|
| 155 |
-
"metadata": {},
|
| 156 |
-
"source": [
|
| 157 |
-
"dark_t = simulate(torch.zeros((512, 192, 192), device=\"cuda\"), noise=known, seed=2000)\n",
|
| 158 |
-
"levels_t = torch.tensor([1., 16., 256., 4096., 32768.], device=\"cuda\")\n",
|
| 159 |
-
"flats_t = simulate(levels_t[:, None, None, None].expand(-1, 256, 192, 192),\n",
|
| 160 |
-
" noise=known, seed=2001)\n",
|
| 161 |
-
"qio.save(DATA / \"dark_master.h5\", dark_t[None],\n",
|
| 162 |
-
" metadata={\"exposure_axes\": \"dark_set, repeat, detector_row, detector_col\"})\n",
|
| 163 |
-
"qio.save(DATA / \"flats_master.h5\", flats_t,\n",
|
| 164 |
-
" metadata={\"exposure_axes\": \"illumination_level, repeat, detector_row, detector_col\"})\n",
|
| 165 |
-
"torch.save(valid_t, DATA / \"detector-valid.pt\")\n",
|
| 166 |
-
"noise = PoissonGaussian.calibrate(DATA / \"flats_master.h5\", dark=DATA / \"dark_master.h5\", valid=valid_t)\n",
|
| 167 |
-
"noise.save(DATA / \"detector-calibration.pt\")\n",
|
| 168 |
-
"noise.plot()"
|
| 169 |
-
],
|
| 170 |
-
"execution_count": null,
|
| 171 |
-
"outputs": [],
|
| 172 |
-
"id": "3de99cb2"
|
| 173 |
-
},
|
| 174 |
-
{
|
| 175 |
-
"cell_type": "markdown",
|
| 176 |
-
"metadata": {},
|
| 177 |
-
"source": [
|
| 178 |
-
"## Does the calibration predict new repeated measurements?\n",
|
| 179 |
-
"Dark means estimate offset; dark variance estimates read variance. At each detector pixel the slope of flat variance versus dark-subtracted mean estimates gain. Calibration maps are frozen before either denoiser runs.\n",
|
| 180 |
-
"\n",
|
| 181 |
-
"The difference of two independent flats cancels their fixed mean and has twice the single-frame variance. Test that on another, held-out sequence. The mean used in the prediction comes from calibration flats, not from the specimen or its truth.\n",
|
| 182 |
-
"\n",
|
| 183 |
-
"The preceding chart shows offset, read-noise SD, gain and the photon-transfer curve. Points are averages of **temporal variance at each valid pixel**; spatial intensity variation is not treated as noise. The line averages the pixelwise fitted predictions. Dark frames alone cannot determine gain. QuantEM.GPU loads the saved exposures in encoded form, and Denova combines bounded repeat blocks on CUDA."
|
| 184 |
-
],
|
| 185 |
-
"id": "88da925a"
|
| 186 |
-
},
|
| 187 |
-
{
|
| 188 |
-
"cell_type": "code",
|
| 189 |
-
"metadata": {},
|
| 190 |
-
"source": [
|
| 191 |
-
"check_t = simulate(levels_t[:, None, None, None].expand(-1, 128, 192, 192),\n",
|
| 192 |
-
" noise=known, seed=2002)\n",
|
| 193 |
-
"qio.save(DATA / \"check-flats_master.h5\", check_t,\n",
|
| 194 |
-
" metadata={\"purpose\": \"independent calibration validation\"})\n",
|
| 195 |
-
"expected_t = noise.electrons(flats_t.mean(1)).clamp_min(0)\n",
|
| 196 |
-
"variance_t = noise.variance(expected_t)\n",
|
| 197 |
-
"z_t = (check_t[:, 0::2] - check_t[:, 1::2]) / (2 * variance_t[:, None]).sqrt()\n",
|
| 198 |
-
"calibration_check = pd.DataFrame({\n",
|
| 199 |
-
" \"flat_level_events\": levels_t.cpu().tolist(),\n",
|
| 200 |
-
" \"pair_difference_mean_square\": z_t[..., valid_t].square().mean((1, 2)).cpu().tolist(),\n",
|
| 201 |
-
"})\n",
|
| 202 |
-
"for direction, left_t, right_t, pairs_t in (\n",
|
| 203 |
-
" (\"row\", z_t[..., :-1, :], z_t[..., 1:, :], valid_t[:-1, :] & valid_t[1:, :]),\n",
|
| 204 |
-
" (\"col\", z_t[..., :, :-1], z_t[..., :, 1:], valid_t[:, :-1] & valid_t[:, 1:]),\n",
|
| 205 |
-
"):\n",
|
| 206 |
-
" left_t = left_t[..., pairs_t].flatten(1)\n",
|
| 207 |
-
" right_t = right_t[..., pairs_t].flatten(1)\n",
|
| 208 |
-
" left_t = left_t - left_t.mean(1, keepdim=True)\n",
|
| 209 |
-
" right_t = right_t - right_t.mean(1, keepdim=True)\n",
|
| 210 |
-
" rho_t = (left_t * right_t).mean(1) / (\n",
|
| 211 |
-
" left_t.square().mean(1) * right_t.square().mean(1)\n",
|
| 212 |
-
" ).sqrt()\n",
|
| 213 |
-
" calibration_check[f\"detector_{direction}_lag1_correlation\"] = rho_t.cpu().tolist()\n",
|
| 214 |
-
"calibration_check"
|
| 215 |
-
],
|
| 216 |
-
"execution_count": null,
|
| 217 |
-
"outputs": [],
|
| 218 |
-
"id": "b5b12e9d"
|
| 219 |
-
},
|
| 220 |
-
{
|
| 221 |
-
"cell_type": "markdown",
|
| 222 |
-
"metadata": {},
|
| 223 |
-
"source": [
|
| 224 |
-
"**Observe.** Do all levels give mean-square residuals near one? This is a finite-repeat check, not a guarantee of calibration. Inspect row/column structure as well; unstable illumination, count-rate correction or correlated noise can invalidate the independent Poisson–Gaussian law. The demonstration repeat counts are not a validated acquisition minimum.\n",
|
| 225 |
-
"\n",
|
| 226 |
-
"The API fits the slope through the independently estimated dark-variance intercept:\n",
|
| 227 |
-
"$$m_{\\ell j}=\\bar F_{\\ell j}-\\bar D_j,\\qquad\n",
|
| 228 |
-
"\\hat\\alpha_j=\\frac{\\sum_\\ell m_{\\ell j}(v_{F,\\ell j}-v_{D,j})}{\\sum_\\ell m_{\\ell j}^2}.$$\n",
|
| 229 |
-
"The read-noise parameter $s_j$ is a **standard deviation**. In event units $\\sigma_{0,j}=s_j/\\alpha_j$ and the shot-variance slope is one.\n",
|
| 230 |
-
"\n",
|
| 231 |
-
"## Save once, reuse across both methods\n",
|
| 232 |
-
"QuantEM.GPU compresses the CUDA arrays directly to HDF5, with no full host-array copy. Keep each `*_master.h5` with its `*_data_*.h5` shards. Measurements and calibration exposures retain float32 values exactly, including signed fluctuations. A plain integer cast would change the noise model.\n",
|
| 233 |
-
"\n",
|
| 234 |
-
"Only one dose-1 expectation is stored. Each denoiser later constructs the dose-specific ADU truth from that expectation and the generator maps, **after selection**. Optional additional doses share that expectation but require independent observations; rescaling a noisy image would give the wrong variance. File sizes below are measured when you run the cell; no compression ratio is assumed.\n"
|
| 235 |
-
],
|
| 236 |
-
"id": "5b764f2e"
|
| 237 |
-
},
|
| 238 |
-
{
|
| 239 |
-
"cell_type": "code",
|
| 240 |
-
"metadata": {},
|
| 241 |
-
"source": [
|
| 242 |
-
"axis_metadata = {\n",
|
| 243 |
-
" \"sampling\": [geometry[\"scan_step_A\"]] * 2 + [geometry[\"angular_sampling_mrad\"]] * 2,\n",
|
| 244 |
-
" \"units\": [\"angstrom\", \"angstrom\", \"mrad\", \"mrad\"],\n",
|
| 245 |
-
" \"origin\": [0., 0., *[-value * geometry[\"angular_sampling_mrad\"]\n",
|
| 246 |
-
" for value in geometry[\"detector_center\"]]],\n",
|
| 247 |
-
" \"calibration_source\": \"Synthetic geometry; not experimental hardware calibration\",\n",
|
| 248 |
-
"}\n",
|
| 249 |
-
"storage_rows = []\n",
|
| 250 |
-
"volumes = {f\"dose-{dose:.1f}\": observations[dose] for dose in DOSES}\n",
|
| 251 |
-
"volumes[\"truth-events-dose-1.0\"] = truth1_t\n",
|
| 252 |
-
"for name, values_t in volumes.items():\n",
|
| 253 |
-
" master = DATA / f\"{name}_master.h5\"\n",
|
| 254 |
-
" qio.save(master, values_t, metadata={**axis_metadata, \"intensity_units\": \"events\" if name.startswith(\"truth\") else \"ADU\"})\n",
|
| 255 |
-
" stored_bytes = master.stat().st_size + sum(p.stat().st_size for p in DATA.glob(f\"{name}_data_*.h5\"))\n",
|
| 256 |
-
" storage_rows.append({\"volume\": name, \"raw_MiB\": values_t.numel() * values_t.element_size() / 2**20,\n",
|
| 257 |
-
" \"stored_MiB\": stored_bytes / 2**20})\n",
|
| 258 |
-
"geometry.update(\n",
|
| 259 |
-
" relative_doses=list(DOSES), incident_events_per_position=INCIDENT_EVENTS,\n",
|
| 260 |
-
" science_seeds=[1000 + index for index in range(len(DOSES))],\n",
|
| 261 |
-
" calibration_seeds={\"dark\": 2000, \"flat\": 2001, \"check\": 2002},\n",
|
| 262 |
-
" noise_model=\"independent Poisson arrivals plus additive Gaussian ADU\",\n",
|
| 263 |
-
" versions={**{name: version(name) for name in (\"denova\", \"abtem\", \"quantem.gpu\")},\n",
|
| 264 |
-
" \"cupy\": cp.__version__,\n",
|
| 265 |
-
" \"abtem_cuda_module_sha256\": sha256(Path(abtem_cuda.__file__).read_bytes()).hexdigest()},\n",
|
| 266 |
-
" storage=\"QuantEM.GPU bitshuffle/LZ4 HDF5; lossless float32; one dose-1 expectation\",\n",
|
| 267 |
-
" data_credit=\"Serin Lee and Andrew Barnum, Zenodo 10.5281/zenodo.18167694 (inspiration only)\",\n",
|
| 268 |
-
")\n",
|
| 269 |
-
"(DATA / \"geometry.json\").write_text(json.dumps(geometry, indent=2) + \"\\n\")\n",
|
| 270 |
-
"calibration_check.to_csv(DATA / \"calibration-check.csv\", index=False)\n",
|
| 271 |
-
"pd.DataFrame(storage_rows)"
|
| 272 |
-
],
|
| 273 |
-
"execution_count": null,
|
| 274 |
-
"outputs": [],
|
| 275 |
-
"id": "5ef70d66"
|
| 276 |
-
},
|
| 277 |
-
{
|
| 278 |
-
"cell_type": "markdown",
|
| 279 |
-
"metadata": {},
|
| 280 |
-
"source": [
|
| 281 |
-
"## Answer\n",
|
| 282 |
-
"One simulated specimen supplies the fixed diffraction expectation. Dose controls independent electron arrivals; detector response stays fixed. Independent dark/flat sequences recover a reusable noise model, then new flat repeats challenge it. The TV and SHINE notebooks read the **same** observations and calibration exposures, fit the same model automatically, and plot it before denoising.\n",
|
| 283 |
-
"\n",
|
| 284 |
-
"Next: `01_tv.ipynb` and `02_shine.ipynb`. Neither uses `generator-only.pt` or synthetic truth to select its result.\n",
|
| 285 |
-
"\n",
|
| 286 |
-
"The tutorial does not model nonlinear count-rate correction, charge sharing, drift, liquid dynamics or thermal convergence. Native ARINA is an electron counter with nominal zero readout noise; this positive-Gaussian model is a general baseline, not verified ARINA physics. Do not invent a Gaussian floor to fit zero dark counts. Quantitative transfer needs independently measured detector statistics and physical simulation validation.\n",
|
| 287 |
-
"\n",
|
| 288 |
-
"Credit for the motivating experimental reference: **Serin Lee and Andrew Barnum**, [Zenodo 10.5281/zenodo.18167694](https://doi.org/10.5281/zenodo.18167694), CC BY 4.0. No experimental measurements are distributed in this tutorial.\n",
|
| 289 |
-
"For sharing, upload only the noiseless event master/data pair, `geometry.json` and `noise-recipe.json`. The TV/SHINE tutorials regenerate observations and calibration exposures locally; `.pt` artifacts stay local.\n"
|
| 290 |
-
],
|
| 291 |
-
"id": "0db10bbb"
|
| 292 |
-
}
|
| 293 |
-
],
|
| 294 |
-
"metadata": {
|
| 295 |
-
"denova": {
|
| 296 |
-
"role": "reader-tutorial",
|
| 297 |
-
"run_all": true
|
| 298 |
-
},
|
| 299 |
-
"kernelspec": {
|
| 300 |
-
"display_name": "live-env",
|
| 301 |
-
"language": "python",
|
| 302 |
-
"name": "python3"
|
| 303 |
-
},
|
| 304 |
-
"language_info": {
|
| 305 |
-
"name": "python",
|
| 306 |
-
"version": "3.14.6"
|
| 307 |
-
}
|
| 308 |
-
},
|
| 309 |
-
"nbformat": 4,
|
| 310 |
-
"nbformat_minor": 5
|
| 311 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|