diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ca79ca5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67668ac..8a67e25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,3 +58,14 @@ jobs: top=$(grep -m1 -E '^## [0-9]+\.[0-9]+\.[0-9]+' CHANGELOG.md | sed -E 's/^## ([0-9]+\.[0-9]+\.[0-9]+).*/\1/') tag=${GITHUB_REF_NAME#v} [ "$top" = "$tag" ] || { echo "CHANGELOG top is $top, tag is $tag"; exit 1; } + + private-refs: + name: No private references + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Scan tracked files + run: | + if git grep -n -I -E '_archive|CLAUDE\.md|memcap|macEM-suite|setup-python-refs' -- ':!.gitignore' ':!.github/workflows/ci.yml'; then + echo "Private references above; this repo is public."; exit 1 + fi diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5b6dc77..8ae3a5f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ # published to GitHub Pages at https://mac4dstem.github.io/DiffractoKit/documentation/ on every tag. # On a pull request the site is built and uploaded as an artifact only, so a broken catalog fails before the tag. # -# No swift-docc-plugin: the kit takes no package dependencies (CLAUDE.md). `xcodebuild docbuild` builds the archives +# No swift-docc-plugin: the kit takes no package dependencies. `xcodebuild docbuild` builds the archives # from the package's own schemes; `docc merge` (Xcode 16+) joins them. Needs Pages enabled with source "GitHub Actions" # (repository Settings > Pages). Copied from CuboKit's pattern; the module list is read from the .docc catalogs. name: Docs diff --git a/CHANGELOG.md b/CHANGELOG.md index e23bda3..92121df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -137,7 +137,7 @@ The one numeric piece mac4DSTEM still carried that belongs here. No existing num mac4DSTEM: build `radiiPerPosition` from its Bragg vectors (distance of each peak from the origin) and delete `KnownCrystalQCalibration.estimate` (keep the app's `QCalibrationEstimate` façade or typealias to the kit's). -Not moved, by design: `ACOMCrystalSymmetry` / `OrientationMap` / `MetalACOMMatcher` (app, per its CLAUDE.md); the open phase-matching, ACOM-mirror and CIF-symmetry items are diagnose-first behaviour questions, not missing code. +Not moved, by design: `ACOMCrystalSymmetry` / `OrientationMap` / `MetalACOMMatcher` (app, by the app's own design); the open phase-matching, ACOM-mirror and CIF-symmetry items are diagnose-first behaviour questions, not missing code. ## 0.7.1 (2026-10-21) diff --git a/Tests/DiffractoOrientationTests/Fixtures/slice-4-pins.json b/Tests/DiffractoOrientationTests/Fixtures/slice-4-pins.json index 996bad7..8d8b7e8 100644 --- a/Tests/DiffractoOrientationTests/Fixtures/slice-4-pins.json +++ b/Tests/DiffractoOrientationTests/Fixtures/slice-4-pins.json @@ -1104,7 +1104,7 @@ "scipy_gimbal_warning_by_Phi":{"0":[true,true,true],"1e-10":[true,true,true],"1e-3":[false,false,false],"1e-5":[false,false,false],"1e-6":[false,false,false],"1e-7":[true,false,true],"1e-9":[true,true,true],"2e-8":[true,true,true],"5e-8":[true,true,true],"5e-9":[true,true,true],"9e-8":[true,true,true],"pi":[true,true,true],"pi-1e-10":[true,true,true],"pi-1e-5":[false,false,false],"pi-1e-9":[true,true,true],"pi-5e-9":[true,true,true]}}, "frame":{"definition":"e1 = normalise(n x r), e2 = n x e1, r = x-hat if |n_x| < 0.9 else y-hat, n the Cartesian zone axis from the real lattice rows; q = (g.e1, g.e2); py4DSTEM: parse_orientation(zone_axis_lattice), p = (g.x', g.y')"}, "frame_matrix_cases":{"cases":[{"B":[0.0,-1.0,6.123233995736766e-17,1.0,3.749399456654644e-33,6.123233995736766e-17,-6.123233995736766e-17,6.123233995736766e-17,1.0],"angle":0.0,"label":"frame-Al[0,0,1]","matrix":[0.0,-1.0,6.123233995736766e-17,1.0,3.749399456654644e-33,6.123233995736766e-17,-6.123233995736766e-17,6.123233995736766e-17,1.0]},{"B":[0.0,-1.0000000000000002,8.659560562354933e-17,0.7071067811865476,6.123233995736766e-17,0.7071067811865476,-0.7071067811865476,6.123233995736766e-17,0.7071067811865476],"angle":1.5707963267948966,"label":"frame-Al[0,1,1]","matrix":[1.0000000000000002,-6.123233995736767e-17,8.659560562354933e-17,-1.793453714559299e-17,0.7071067811865476,0.7071067811865476,-1.0453014276914232e-16,-0.7071067811865476,0.7071067811865476]},{"B":[0.0,-0.8164965809277259,0.5773502691896257,0.7071067811865475,0.40824829046386296,0.5773502691896257,-0.7071067811865475,0.40824829046386296,0.5773502691896257],"angle":-3.141592653589793,"label":"frame-Al[1,1,1]","matrix":[-9.999199243478974e-17,0.8164965809277259,0.5773502691896257,-0.7071067811865475,-0.4082482904638631,0.5773502691896257,0.7071067811865475,-0.40824829046386285,0.5773502691896257]},{"B":[0.0,-0.9128709291752769,0.40824829046386313,0.8944271909999159,0.18257418583505547,0.40824829046386313,-0.44721359549995804,0.3651483716701108,0.816496580927726],"angle":1.821427591465388,"label":"frame-Al[1,1,2]","matrix":[0.8843492366841683,0.22640618566961065,0.40824829046386313,-0.3987016991369838,0.8212005165844791,0.40824829046386313,-0.24282376877359238,-0.523803351127045,0.816496580927726]},{"B":[0.0,-0.9636241116594317,0.2672612419124245,0.8320502943378437,0.14824986333222032,0.5345224838248488,-0.5547001962252291,0.22237479499833046,0.8017837257372732],"angle":1.8913065245211282,"label":"frame-Al[1,2,3]","matrix":[0.9145513643262411,0.30359056405039975,0.2672612419124245,-0.40283833525035534,0.7429717288958152,0.5345224838248488,-0.036291564608510254,-0.59651134061401,0.8017837257372732]},{"B":[0.0,-1.0,6.123233995736766e-17,1.0,3.749399456654644e-33,6.123233995736766e-17,-6.123233995736766e-17,6.123233995736766e-17,1.0],"angle":1.6148935298645561,"label":"frame-Au[0,0,1]","matrix":[0.9990278758857752,0.0440829128252211,6.123233995736766e-17,-0.0440829128252211,0.9990278758857752,6.123233995736766e-17,-5.847351461869975e-17,-6.387211442754964e-17,1.0]},{"B":[0.0,-1.0000000000000002,8.659560562354933e-17,0.7071067811865476,6.123233995736766e-17,0.7071067811865476,-0.7071067811865476,6.123233995736766e-17,0.7071067811865476],"angle":-0.9096331241335522,"label":"frame-Au[0,1,1]","matrix":[-0.7892785180586068,-0.614035358046432,8.659560562354933e-17,0.4341885655629417,-0.5581041923641097,0.7071067811865476,-0.4341885655629416,0.5581041923641097,0.7071067811865476]},{"B":[0.0,-0.8164965809277259,0.5773502691896257,0.7071067811865475,0.40824829046386296,0.5773502691896257,-0.7071067811865475,0.40824829046386296,0.5773502691896257],"angle":3.0945414951177046,"label":"frame-Au[1,1,1]","matrix":[0.038402936883325606,0.8155929628836935,0.5773502691896257,-0.7255256934467602,-0.3745385625209564,0.5773502691896257,0.6871227565634346,-0.44105440036273713,0.5773502691896257]},{"B":[0.0,-0.9128709291752768,0.4082482904638631,0.8944271909999159,0.18257418583505544,0.4082482904638631,-0.44721359549995804,0.36514837167011077,0.8164965809277259],"angle":0.7433656757926501,"label":"frame-Au[1,1,2]","matrix":[0.6178032329755826,-0.672050964331018,0.4082482904638631,0.5349121309074323,0.7397312657589941,0.4082482904638631,-0.5763576819415076,-0.03384015071398801,0.8164965809277259]},{"B":[0.0,-0.9636241116594315,0.2672612419124245,0.8320502943378437,0.1482498633322203,0.5345224838248487,-0.554700196225229,0.22237479499833046,0.8017837257372732],"angle":-2.4273993540493954,"label":"frame-Au[1,2,3]","matrix":[-0.6311815689782083,0.7281354651118401,0.2672612419124245,-0.531610552835921,-0.6570204977009476,0.5345224838248487,0.5648008915500168,0.19530184343001816,0.8017837257372732]},{"B":[0.6137566835021759,-0.4586259701994927,0.6426234923460112,-0.7042187548317355,0.049937922129555334,0.7082246460528063,-0.35690149733455856,-0.8872251255414021,-0.29232327620015763],"angle":2.739125538621786,"label":"random-0","matrix":[-0.38507697535915797,0.6623826463104681,0.6426234923460112,0.6283897213575641,-0.3217828597292595,0.7082246460528063,0.6759009403310557,0.6765390018699595,-0.29232327620015763]},{"B":[0.9772621046718297,0.1547114366149262,-0.14499362107669247,-0.014359511658963195,0.7305400029433629,0.6827189088669123,0.21154806356311065,-0.6651132801862079,0.7161506415012424],"angle":2.936630030901223,"label":"random-1","matrix":[-0.9882951395713754,0.047429599899897014,-0.14499362107669247,-0.13462827275297953,-0.7181713720631879,0.6827189088669123,-0.0717491830974063,0.6942480200923974,0.7161506415012424]},{"B":[-0.721693095500903,0.5638891664673555,0.4014823580770088,0.5418928663305664,0.09934791912549853,0.8345550385597562,0.43071010822404365,0.8198530349435711,-0.3772662239950036],"angle":-3.0567834899375548,"label":"random-2","matrix":[0.7668648886586715,-0.5007296263408506,0.4014823580770088,-0.5315297091517899,-0.1448932569291526,0.8345550385597562,-0.35971434615752684,-0.853390757742908,-0.3772662239950036]},{"B":[-0.2439615537978871,-0.24963154388725003,-0.9371055717287081,0.5192892689087124,-0.8497221170855339,0.09116457059589267,-0.8190368828476383,-0.4643882169393906,0.33693050990238016],"angle":3.1394736118103,"label":"random-3","matrix":[0.24448998533826022,0.24911401908425126,-0.9371055717287081,-0.5174875076974477,0.8508206041494005,0.09116457059589267,0.8200191012692215,0.46265160223492224,0.33693050990238016]},{"B":[-0.5324271722791626,0.804301706143965,-0.26385615723860173,-0.5408723483599558,-0.0834763524228522,0.8369520902451718,0.6511362445743605,0.5883285341372476,0.4794696308646835],"angle":2.5342230253447644,"label":"random-4","matrix":[-0.0218189700123623,-0.9643152289759184,-0.26385615723860173,0.49177917702492674,-0.24013421180440617,0.8369520902451718,-0.8704465368948774,-0.11149753130091587,0.4794696308646835]},{"B":[-0.4806558832541167,-0.8174428112636682,0.3174227027270673,0.8171907245370558,-0.5488437544923094,-0.1759825357397365,0.318071126674219,0.17480784727276039,0.9318116627881713],"angle":-1.9359924772817854,"label":"random-5","matrix":[-0.5918776596830758,0.7408938275903838,0.3174227027270673,-0.8044949345180122,-0.5672900910905035,-0.1759825357397365,0.04968637945095691,-0.35952508784367093,0.9318116627881713]},{"B":[0.90988542848536,0.1476417578813168,-0.3876988758814335,0.21885975703043006,-0.9647332618252834,0.14625368467334404,-0.3524328500332987,-0.2179257783229498,-0.9101095765674277],"angle":-2.9881620353159843,"label":"random-6","matrix":[-0.8766326433023001,-0.2849645422453377,-0.3876988758814335,-0.3637282730448209,0.9199519569560695,0.14625368467334404,0.31498722527215955,0.26922779677366687,-0.9101095765674277]},{"B":[-0.5852214141013471,-0.6604967879000109,0.47038270551858913,-0.1051380400040034,0.637004898731793,0.7636561736382512,-0.8040285374421334,0.3974528301137965,-0.4422322453340525],"angle":-2.4762177589066305,"label":"random-7","matrix":[0.05262474063359857,0.8808920177991505,0.47038270551858913,0.47596814693722056,-0.43621505197016497,0.7636561736382512,0.8778866440346356,0.18369997662603976,-0.4422322453340525]},{"B":[0.7381521820799275,-0.5534831481513391,-0.385730165793556,-0.16866053531744546,0.40220526175172455,-0.8998802982873106,0.6532112827539601,0.7293060620423426,0.20353792754967404],"angle":-0.938572147277554,"label":"random-8","matrix":[-0.010299221573482828,-0.9225541530077549,-0.385730165793556,0.22479673623492236,0.37374038600674037,-0.8998802982873106,0.9743512474529433,-0.09597894891941969,0.20353792754967404]},{"B":[-0.005133838398683643,-0.8495584675905569,-0.5274694814380075,0.393544462497709,0.48319437084744166,-0.7820779731067318,0.9192912485935484,-0.21159775548556603,0.3318583886732188],"angle":3.068073120852343,"label":"random-9","matrix":[0.06752286036766503,0.8468864206487714,-0.5274694814380075,-0.42797359450725875,-0.45298194929356966,-0.7820779731067318,-0.9012653692072635,0.2785511517386163,0.3318583886732188]}],"definition":"matrix = B R_z(a), R_z = [[c, s, 0], [-s, c, 0], [0, 0, 1]] (columns (c,-s,0), (s,c,0), (0,0,1)), row-major 9 numbers; the first 10 B are the columns (e1, e2, n) of the frame of the first 10 phase/axis pairs (an assumption about the basis layout: the product does not depend on it), then 10 seeded random rotations"}, -"header":{"commands":["tools/memcap.sh -- DiffractoKit/References/pymatgen-venv/bin/python -I -B DiffractoKit/tools/slice-4/pins.py","(started by pins.py) References/CuboKit/py4dstem-venv/bin/python -I -B DiffractoKit/tools/slice-4/pins-py4dstem.py < request.json"],"files_read":["Tests/DiffractoScatteringTests/Fixtures/slice-2-pins.json","References/py4dstem-scattering/scattering_factors.txt","References/crystal-structures/beta_double_prime_Mg5Si6.cif (the beta'' site check only)"],"generator":"tools/slice-4/pins.py + tools/slice-4/pins-py4dstem.py","oracles":{"V0":"py4DSTEM Crystal.generate_diffraction_pattern at a huge accelerating voltage (lambda ~ 1e-26 A), sigma = w/sqrt(2), tol_excitation_error_mult = slab/sigma, tol_intensity 0: the 'py4dstem_*' fields of 'entries'","V1":"NumPy flat excitation on py4DSTEM's own hkl, g and float32 |F|^2: the lambda -> 0 residual","V200":"py4DSTEM at 200 kV, curved Ewald: the 'kv200' records","V2_reference":"NumPy float64 from the registration's definitions (these pins' 'entries' and 'library')"},"purpose":"slice 4 (vector matching and phase mapping, DiffractoOrientation 0.3.0): oracle pins, registration docs/registration-slice-4.md section 6","py4dstem_call":{"curved_voltage_V":200000.0,"k_max":1.6,"lambda_to_zero_voltage_V":1e+30,"sigma_excitation_error":0.021213203435596423,"tol_excitation_error_mult":2.357022603955159,"tol_intensity":0.0,"tol_structure_factor":0.0001},"py4dstem_commit":"f050d207851f8accd3aa550365baaf1f38230428","py4dstem_provenance":{"files":{"process/diffraction/crystal.py":{"equal":true,"installed":"b8ccdcb6b078e3a94d03fedd9e2f11dd4a682f591791b18fd39c3878e222e48c","tree":"b8ccdcb6b078e3a94d03fedd9e2f11dd4a682f591791b18fd39c3878e222e48c"},"process/utils/scattering_factors.txt":{"equal":true,"installed":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4","tree":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4"},"process/utils/single_atom_scatter.py":{"equal":true,"installed":"1eca228e839602dedf507fe5c0ade5fae5290dcad20eeea6875f3b8a03da6549","tree":"1eca228e839602dedf507fe5c0ade5fae5290dcad20eeea6875f3b8a03da6549"},"process/utils/utils.py":{"equal":true,"installed":"8e824504eb0430f04e12b3c45aecae7aed80a11db9dd427d5eb952db4400043d","tree":"8e824504eb0430f04e12b3c45aecae7aed80a11db9dd427d5eb952db4400043d"}},"lock":"f050d207851f8accd3aa550365baaf1f38230428","table_sha256":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4","tree_head":"f050d207851f8accd3aa550365baaf1f38230428"},"py4dstem_tree_head":"f050d207851f8accd3aa550365baaf1f38230428","registered_defaults":{"F_cut":0.0001,"basis_switch":0.9,"excitationSlabInvAngstrom":0.05,"excitationWidthInvAngstrom":0.03,"inPlaneStepDeg":2.0,"kMaxInvAngstrom":1.6,"maximumVectorsPerEntry":48,"minimumIntensityFraction":0.05,"q_floor":1e-09},"scattering_table_sha256":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4","seed":20261015,"versions":{"pins-py4dstem.py":{"numpy":"2.5.0","py4DSTEM":"0.14.19","python":"3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 10:07:17) [Clang 14.0.6 ]","scipy":"1.18.0"},"pins.py":{"numpy":"2.5.4","pymatgen":"2026.9.24","pymatgen_core":"2026.9.23","python":"3.14.7 | packaged by Anaconda, Inc. | (main, Aug 14 2026, 10:13:42) [Clang 20.1.8 ]","scipy":"1.18.1"}}}, +"header":{"commands":["DiffractoKit/References/pymatgen-venv/bin/python -I -B DiffractoKit/tools/slice-4/pins.py","(started by pins.py) References/CuboKit/py4dstem-venv/bin/python -I -B DiffractoKit/tools/slice-4/pins-py4dstem.py < request.json"],"files_read":["Tests/DiffractoScatteringTests/Fixtures/slice-2-pins.json","References/py4dstem-scattering/scattering_factors.txt","References/crystal-structures/beta_double_prime_Mg5Si6.cif (the beta'' site check only)"],"generator":"tools/slice-4/pins.py + tools/slice-4/pins-py4dstem.py","oracles":{"V0":"py4DSTEM Crystal.generate_diffraction_pattern at a huge accelerating voltage (lambda ~ 1e-26 A), sigma = w/sqrt(2), tol_excitation_error_mult = slab/sigma, tol_intensity 0: the 'py4dstem_*' fields of 'entries'","V1":"NumPy flat excitation on py4DSTEM's own hkl, g and float32 |F|^2: the lambda -> 0 residual","V200":"py4DSTEM at 200 kV, curved Ewald: the 'kv200' records","V2_reference":"NumPy float64 from the registration's definitions (these pins' 'entries' and 'library')"},"purpose":"slice 4 (vector matching and phase mapping, DiffractoOrientation 0.3.0): oracle pins, registration docs/registration-slice-4.md section 6","py4dstem_call":{"curved_voltage_V":200000.0,"k_max":1.6,"lambda_to_zero_voltage_V":1e+30,"sigma_excitation_error":0.021213203435596423,"tol_excitation_error_mult":2.357022603955159,"tol_intensity":0.0,"tol_structure_factor":0.0001},"py4dstem_commit":"f050d207851f8accd3aa550365baaf1f38230428","py4dstem_provenance":{"files":{"process/diffraction/crystal.py":{"equal":true,"installed":"b8ccdcb6b078e3a94d03fedd9e2f11dd4a682f591791b18fd39c3878e222e48c","tree":"b8ccdcb6b078e3a94d03fedd9e2f11dd4a682f591791b18fd39c3878e222e48c"},"process/utils/scattering_factors.txt":{"equal":true,"installed":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4","tree":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4"},"process/utils/single_atom_scatter.py":{"equal":true,"installed":"1eca228e839602dedf507fe5c0ade5fae5290dcad20eeea6875f3b8a03da6549","tree":"1eca228e839602dedf507fe5c0ade5fae5290dcad20eeea6875f3b8a03da6549"},"process/utils/utils.py":{"equal":true,"installed":"8e824504eb0430f04e12b3c45aecae7aed80a11db9dd427d5eb952db4400043d","tree":"8e824504eb0430f04e12b3c45aecae7aed80a11db9dd427d5eb952db4400043d"}},"lock":"f050d207851f8accd3aa550365baaf1f38230428","table_sha256":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4","tree_head":"f050d207851f8accd3aa550365baaf1f38230428"},"py4dstem_tree_head":"f050d207851f8accd3aa550365baaf1f38230428","registered_defaults":{"F_cut":0.0001,"basis_switch":0.9,"excitationSlabInvAngstrom":0.05,"excitationWidthInvAngstrom":0.03,"inPlaneStepDeg":2.0,"kMaxInvAngstrom":1.6,"maximumVectorsPerEntry":48,"minimumIntensityFraction":0.05,"q_floor":1e-09},"scattering_table_sha256":"be845d1d541cdb75ae16f8928cd9e56a9ea38af8a3cc43da9137e73cc72bb6f4","seed":20261015,"versions":{"pins-py4dstem.py":{"numpy":"2.5.0","py4DSTEM":"0.14.19","python":"3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 10:07:17) [Clang 14.0.6 ]","scipy":"1.18.0"},"pins.py":{"numpy":"2.5.4","pymatgen":"2026.9.24","pymatgen_core":"2026.9.23","python":"3.14.7 | packaged by Anaconda, Inc. | (main, Aug 14 2026, 10:13:42) [Clang 20.1.8 ]","scipy":"1.18.1"}}}, "measured":{"float32_note":"py4DSTEM's structure factors are complex64: lambda0_vs_ref_relI is that floor, lambda0_vs_flat_relI is the exp/threshold arithmetic alone (both share the float32 |F|^2)","worst_over_all_phases_and_axes":{"frame_rotation":8.881784197001252e-16,"lambda0_vs_flat_px":2.220446049250313e-16,"lambda0_vs_flat_relI":1.507773016940237e-14,"lambda0_vs_ref_q":8.881784197001252e-16,"lambda0_vs_ref_relI":1.1542904329095612e-05}}, "phases":[ {"cell":{"a":4.0495,"alpha":90.0,"b":4.0495,"beta":90.0,"c":4.0495,"gamma":90.0},"kept_reflections":282,"lat_inv":[[0.24694406716878625,-1.5120963071334152e-17,-1.5120963071334152e-17],[0.0,0.24694406716878625,-1.5120963071334152e-17],[0.0,0.0,0.24694406716878625]],"lat_real":[[4.0495,0.0,0.0],[2.4796036065736033e-16,4.0495,0.0],[2.4796036065736033e-16,2.4796036065736033e-16,4.0495]],"lattice_check":{"max_abs_lat_inv_difference_vs_py4dstem":2.7755575615628914e-17,"max_abs_lat_real_difference_vs_py4dstem":0.0},"name":"Al","reflections_within_kMax":1140,"sites":[{"frac":[0.0,0.0,0.0],"occupancy":1.0,"z":13},{"frac":[0.5,0.5,0.0],"occupancy":1.0,"z":13},{"frac":[0.5,0.0,0.5],"occupancy":1.0,"z":13},{"frac":[0.0,0.5,0.5],"occupancy":1.0,"z":13}],"source":"apps preset Crystal.aluminum (mac4DSTEM 7d6fdbd1): fcc 4.0495, Z 13","structure_factor_check":{"common":282,"in_py4dstem_not_kept_here":[],"kept_here_missing_in_py4dstem":[],"kit_count":282,"max_abs_g_difference":2.220446049250313e-16,"max_relative_F2_difference":1.6841925356299512e-07,"note":"py4DSTEM accumulates the structure factor in complex64, so its |F|^2 carries a float32 floor","py4dstem_F2_dtype":"float32","py4dstem_F_dtype":"complex64","py4dstem_count":283,"vs_slice2_pins_at_kMax_1_2":{"hkl_only_here":[],"hkl_only_in_slice2":[],"max_relative_F2_difference_float64":1.63476395827691e-15,"max_relative_F2_difference_py4dstem_float32":1.6841925226034194e-07,"slice2_kept":112,"this_kept":112}},"volume":66.40552428737504,"worst":{"frame_rotation":4.440892098500626e-16,"lambda0_vs_flat_px":2.220446049250313e-16,"lambda0_vs_flat_relI":0.0,"lambda0_vs_ref_q":4.440892098500626e-16,"lambda0_vs_ref_relI":2.0677233064976858e-07},"zone_axes":[{"counts":{"after_cap":28,"after_floor":28,"lambda0_vs_flat_numpy_on_py4dstem_table":{"max_abs_px":0.0,"max_relative_I":0.0},"max_abs_q_vs_py4dstem":4.440892098500626e-16,"max_abs_rotated_q_vs_py4dstem":2.220446049250313e-16,"max_relative_I_vs_py4dstem":1.4686948330807557e-07,"only_py4dstem":[],"only_reference":[],"pre_cap_pre_floor":36,"py4dstem_lambda0":36},"e1":[0.0,1.0,-6.123233995736766e-17],"e2":[-1.0,3.749399456654644e-33,6.123233995736766e-17],"entries":[[2,0,0,0.4938881343375725,-3.0241926142668304e-17,-3.0241926142668304e-17,6.162975822039155e-33,-3.0241926142668304e-17,-0.4938881343375725,0.4938881343375725,0.011304235426513723,0.011304235426513723,1.0,0.49388813433757256,-3.024192614266831e-17,0.49388813433757256,1.0],[0,2,0,0.0,0.4938881343375725,-3.0241926142668304e-17,6.162975822039155e-33,0.4938881343375725,3.4211388289180104e-49,0.4938881343375725,0.011304235426513723,0.011304235426513723,1.0,-1.9747012303104212e-33,0.49388813433757256,0.49388813433757256,1.0],[0,-2,0,0.0,-0.4938881343375725,3.0241926142668304e-17,-6.162975822039155e-33,-0.4938881343375725,-3.4211388289180104e-49,0.4938881343375725,0.011304235426513723,0.011304235426513723,1.0,1.9747012303104212e-33,-0.49388813433757256,0.49388813433757256,1.0],[-2,0,0,-0.4938881343375725,3.0241926142668304e-17,3.0241926142668304e-17,-6.162975822039155e-33,3.0241926142668304e-17,0.4938881343375725,0.4938881343375725,0.011304235426513723,0.011304235426513723,1.0,-0.49388813433757256,3.024192614266831e-17,0.49388813433757256,1.0],[2,2,0,0.4938881343375725,0.49388813433757245,-6.048385228533661e-17,1.232595164407831e-32,0.49388813433757245,-0.4938881343375725,0.6984632978753401,0.004507943017398763,0.004507943017398763,0.3987835397364007,0.49388813433757256,0.4938881343375725,0.6984632978753402,0.3987834811672695],[-2,-2,0,-0.4938881343375725,-0.49388813433757245,6.048385228533661e-17,-1.232595164407831e-32,-0.49388813433757245,0.4938881343375725,0.6984632978753401,0.004507943017398763,0.004507943017398763,0.3987835397364007,-0.49388813433757256,-0.4938881343375725,0.6984632978753402,0.3987834811672695],[2,-2,0,0.4938881343375725,-0.49388813433757256,0.0,0.0,-0.49388813433757256,-0.4938881343375725,0.6984632978753402,0.004507943017398778,0.004507943017398778,0.39878353973640196,0.49388813433757256,-0.4938881343375726,0.6984632978753402,0.3987834811672695],[-2,2,0,-0.4938881343375725,0.49388813433757256,0.0,0.0,0.49388813433757256,0.4938881343375725,0.6984632978753402,0.004507943017398778,0.004507943017398778,0.39878353973640196,-0.49388813433757256,0.4938881343375726,0.6984632978753402,0.3987834811672695],[4,0,0,0.987776268675145,-6.048385228533661e-17,-6.048385228533661e-17,1.232595164407831e-32,-6.048385228533661e-17,-0.987776268675145,0.987776268675145,0.001831066951967828,0.001831066951967828,0.1619806101767059,0.9877762686751451,-6.048385228533662e-17,0.9877762686751451,0.1619806289937634],[0,4,0,0.0,0.987776268675145,-6.048385228533661e-17,1.232595164407831e-32,0.987776268675145,6.842277657836021e-49,0.987776268675145,0.001831066951967828,0.001831066951967828,0.1619806101767059,-3.9494024606208424e-33,0.9877762686751451,0.9877762686751451,0.1619806289937634],[0,-4,0,0.0,-0.987776268675145,6.048385228533661e-17,-1.232595164407831e-32,-0.987776268675145,-6.842277657836021e-49,0.987776268675145,0.001831066951967828,0.001831066951967828,0.1619806101767059,3.9494024606208424e-33,-0.9877762686751451,0.9877762686751451,0.1619806289937634],[-4,0,0,-0.987776268675145,6.048385228533661e-17,6.048385228533661e-17,-1.232595164407831e-32,6.048385228533661e-17,0.987776268675145,0.987776268675145,0.001831066951967828,0.001831066951967828,0.1619806101767059,-0.9877762686751451,6.048385228533662e-17,0.9877762686751451,0.1619806289937634],[4,2,0,0.987776268675145,0.49388813433757245,-9.072577842800492e-17,0.0,0.49388813433757245,-0.987776268675145,1.10436744165936,0.0013708824814263447,0.0013708824814263447,0.1212715791650078,0.9877762686751451,0.4938881343375725,1.1043674416593603,0.12127156408752107],[2,4,0,0.4938881343375725,0.987776268675145,-9.072577842800492e-17,1.232595164407831e-32,0.987776268675145,-0.4938881343375725,1.10436744165936,0.0013708824814263447,0.0013708824814263447,0.1212715791650078,0.49388813433757256,0.9877762686751451,1.1043674416593603,0.12127156408752107],[2,-4,0,0.4938881343375725,-0.987776268675145,3.0241926142668304e-17,-6.162975822039155e-33,-0.987776268675145,-0.4938881343375725,1.10436744165936,0.0013708824814263447,0.0013708824814263447,0.1212715791650078,0.49388813433757256,-0.9877762686751451,1.1043674416593603,0.12127156408752107],[-2,4,0,-0.4938881343375725,0.987776268675145,-3.0241926142668304e-17,6.162975822039155e-33,0.987776268675145,0.4938881343375725,1.10436744165936,0.0013708824814263447,0.0013708824814263447,0.1212715791650078,-0.49388813433757256,0.9877762686751451,1.1043674416593603,0.12127156408752107],[-2,-4,0,-0.4938881343375725,-0.987776268675145,9.072577842800492e-17,-1.232595164407831e-32,-0.987776268675145,0.4938881343375725,1.10436744165936,0.0013708824814263447,0.0013708824814263447,0.1212715791650078,-0.49388813433757256,-0.9877762686751451,1.1043674416593603,0.12127156408752107],[-4,-2,0,-0.987776268675145,-0.49388813433757245,9.072577842800492e-17,0.0,-0.49388813433757245,0.987776268675145,1.10436744165936,0.0013708824814263447,0.0013708824814263447,0.1212715791650078,-0.9877762686751451,-0.4938881343375725,1.1043674416593603,0.12127156408752107],[4,-2,0,0.987776268675145,-0.49388813433757256,-3.0241926142668304e-17,6.162975822039155e-33,-0.49388813433757256,-0.987776268675145,1.1043674416593603,0.001370882481426353,0.001370882481426353,0.12127157916500853,0.9877762686751451,-0.4938881343375726,1.1043674416593603,0.12127156408752107],[-4,2,0,-0.987776268675145,0.49388813433757256,3.0241926142668304e-17,-6.162975822039155e-33,0.49388813433757256,0.987776268675145,1.1043674416593603,0.001370882481426353,0.001370882481426353,0.12127157916500853,-0.9877762686751451,0.4938881343375726,1.1043674416593603,0.12127156408752107],[4,4,0,0.987776268675145,0.9877762686751449,-1.2096770457067322e-16,2.465190328815662e-32,0.9877762686751449,-0.987776268675145,1.3969265957506802,0.0007240064769512503,0.0007240064769512503,0.06404736363267137,0.9877762686751451,0.987776268675145,1.3969265957506805,0.06404735739029485],[-4,-4,0,-0.987776268675145,-0.9877762686751449,1.2096770457067322e-16,-2.465190328815662e-32,-0.9877762686751449,0.987776268675145,1.3969265957506802,0.0007240064769512503,0.0007240064769512503,0.06404736363267137,-0.9877762686751451,-0.987776268675145,1.3969265957506805,0.06404735739029485],[4,-4,0,0.987776268675145,-0.9877762686751451,0.0,0.0,-0.9877762686751451,-0.987776268675145,1.3969265957506805,0.0007240064769512531,0.0007240064769512531,0.06404736363267162,0.9877762686751451,-0.9877762686751452,1.3969265957506805,0.06404735739029485],[-4,4,0,-0.987776268675145,0.9877762686751451,0.0,0.0,0.9877762686751451,0.987776268675145,1.3969265957506805,0.0007240064769512531,0.0007240064769512531,0.06404736363267162,-0.9877762686751451,0.9877762686751452,1.3969265957506805,0.06404735739029485],[6,0,0,1.4816644030127175,-9.072577842800492e-17,-9.072577842800492e-17,0.0,-9.072577842800492e-17,-1.4816644030127175,1.4816644030127175,0.0006108063584144834,0.0006108063584144834,0.05403340742372161,1.4816644030127177,-9.072577842800493e-17,1.4816644030127177,0.05403340287898225],[0,6,0,0.0,1.4816644030127175,-9.072577842800492e-17,0.0,1.4816644030127175,0.0,1.4816644030127175,0.0006108063584144834,0.0006108063584144834,0.05403340742372161,-5.924103690931264e-33,1.4816644030127177,1.4816644030127177,0.05403340287898225],[0,-6,0,0.0,-1.4816644030127175,9.072577842800492e-17,0.0,-1.4816644030127175,0.0,1.4816644030127175,0.0006108063584144834,0.0006108063584144834,0.05403340742372161,5.924103690931264e-33,-1.4816644030127177,1.4816644030127177,0.05403340287898225],[-6,0,0,-1.4816644030127175,9.072577842800492e-17,9.072577842800492e-17,0.0,9.072577842800492e-17,1.4816644030127175,1.4816644030127175,0.0006108063584144834,0.0006108063584144834,0.05403340742372161,-1.4816644030127177,9.072577842800493e-17,1.4816644030127177,0.05403340287898225],[6,2,0,1.4816644030127175,0.4938881343375724,-1.2096770457067322e-16,0.0,0.4938881343375724,-1.4816644030127175,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,1.4816644030127177,0.49388813433757245,1.561811413837945,0.04621247301103467],[6,-2,0,1.4816644030127175,-0.4938881343375726,-6.048385228533662e-17,-2.465190328815662e-32,-0.4938881343375726,-1.4816644030127175,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,1.4816644030127177,-0.49388813433757267,1.5618114138379453,0.04621247301103467],[2,6,0,0.4938881343375725,1.4816644030127175,-1.2096770457067322e-16,2.465190328815662e-32,1.4816644030127175,-0.4938881343375725,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,0.49388813433757256,1.4816644030127177,1.5618114138379453,0.04621247301103467],[2,-6,0,0.4938881343375725,-1.4816644030127175,6.048385228533661e-17,0.0,-1.4816644030127175,-0.4938881343375725,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,0.49388813433757256,-1.4816644030127177,1.5618114138379453,0.04621247301103467],[-2,6,0,-0.4938881343375725,1.4816644030127175,-6.048385228533661e-17,0.0,1.4816644030127175,0.4938881343375725,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,-0.49388813433757256,1.4816644030127177,1.5618114138379453,0.04621247301103467],[-2,-6,0,-0.4938881343375725,-1.4816644030127175,1.2096770457067322e-16,-2.465190328815662e-32,-1.4816644030127175,0.4938881343375725,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,-0.49388813433757256,-1.4816644030127177,1.5618114138379453,0.04621247301103467],[-6,2,0,-1.4816644030127175,0.4938881343375726,6.048385228533662e-17,2.465190328815662e-32,0.4938881343375726,1.4816644030127175,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,-1.4816644030127177,0.49388813433757267,1.5618114138379453,0.04621247301103467],[-6,-2,0,-1.4816644030127175,-0.4938881343375724,1.2096770457067322e-16,0.0,-0.4938881343375724,1.4816644030127175,1.5618114138379449,0.000522396681401734,0.000522396681401734,0.04621247361643489,-1.4816644030127177,-0.49388813433757245,1.561811413837945,0.04621247301103467]],"entry_fields":["h","k","l","gx","gy","gz","s","q1","q2","qlen","F2","I_excited","I_relative","py4dstem_x","py4dstem_y","py4dstem_qlen","py4dstem_I_relative"],"flags":{"cap_tie":false,"cut_edge_hkl":[],"floor_edge_hkl":[],"kmax_edge_hkl":[],"slab_edge_hkl":[]},"frame_map":{"M":[3.749399456654644e-33,-1.0,1.0,3.749399456654644e-33],"definition":"(g.x', g.y') = M (g.e1, g.e2) with M = [[x'.e1, x'.e2], [y'.e1, y'.e2]]; for det +1, M = R(phi_py) = [[c,-s],[s,c]]; for det -1, M = R(phi_py) diag(1,-1)","det":1.0,"handedness":"rotation","phi_py_deg":90.0,"phi_py_rad":1.5707963267948966},"kv200":{"count_curved":36,"count_flat":36,"definition":"entering = in py4DSTEM's 200 kV curved set but not in the flat slab; leaving = the reverse","entering":[],"leaving":[],"max_abs_dI_relative_common":0.030775623935515972},"library":[[2,0,0,-3.0241926142668304e-17,-0.4938881343375725,0.4938881343375725,1.0],[0,2,0,0.4938881343375725,3.4211388289180104e-49,0.4938881343375725,1.0],[0,-2,0,-0.4938881343375725,-3.4211388289180104e-49,0.4938881343375725,1.0],[-2,0,0,3.0241926142668304e-17,0.4938881343375725,0.4938881343375725,1.0],[2,2,0,0.49388813433757245,-0.4938881343375725,0.6984632978753401,0.3987835397364007],[-2,-2,0,-0.49388813433757245,0.4938881343375725,0.6984632978753401,0.3987835397364007],[2,-2,0,-0.49388813433757256,-0.4938881343375725,0.6984632978753402,0.39878353973640196],[-2,2,0,0.49388813433757256,0.4938881343375725,0.6984632978753402,0.39878353973640196],[4,0,0,-6.048385228533661e-17,-0.987776268675145,0.987776268675145,0.1619806101767059],[0,4,0,0.987776268675145,6.842277657836021e-49,0.987776268675145,0.1619806101767059],[0,-4,0,-0.987776268675145,-6.842277657836021e-49,0.987776268675145,0.1619806101767059],[-4,0,0,6.048385228533661e-17,0.987776268675145,0.987776268675145,0.1619806101767059],[4,2,0,0.49388813433757245,-0.987776268675145,1.10436744165936,0.1212715791650078],[2,4,0,0.987776268675145,-0.4938881343375725,1.10436744165936,0.1212715791650078],[2,-4,0,-0.987776268675145,-0.4938881343375725,1.10436744165936,0.1212715791650078],[-2,4,0,0.987776268675145,0.4938881343375725,1.10436744165936,0.1212715791650078],[-2,-4,0,-0.987776268675145,0.4938881343375725,1.10436744165936,0.1212715791650078],[-4,-2,0,-0.49388813433757245,0.987776268675145,1.10436744165936,0.1212715791650078],[4,-2,0,-0.49388813433757256,-0.987776268675145,1.1043674416593603,0.12127157916500853],[-4,2,0,0.49388813433757256,0.987776268675145,1.1043674416593603,0.12127157916500853],[4,4,0,0.9877762686751449,-0.987776268675145,1.3969265957506802,0.06404736363267137],[-4,-4,0,-0.9877762686751449,0.987776268675145,1.3969265957506802,0.06404736363267137],[4,-4,0,-0.9877762686751451,-0.987776268675145,1.3969265957506805,0.06404736363267162],[-4,4,0,0.9877762686751451,0.987776268675145,1.3969265957506805,0.06404736363267162],[6,0,0,-9.072577842800492e-17,-1.4816644030127175,1.4816644030127175,0.05403340742372161],[0,6,0,1.4816644030127175,0.0,1.4816644030127175,0.05403340742372161],[0,-6,0,-1.4816644030127175,0.0,1.4816644030127175,0.05403340742372161],[-6,0,0,9.072577842800492e-17,1.4816644030127175,1.4816644030127175,0.05403340742372161]],"library_fields":["h","k","l","q1","q2","qlen","I_relative"],"n":[6.123233995736766e-17,6.123233995736766e-17,1.0],"py4dstem":{"orientation_matrix_columns_xyz":[[1.0,-3.749399456654644e-33,6.123233995736766e-17],[0.0,1.0,6.123233995736766e-17],[-6.123233995736766e-17,-6.123233995736766e-17,1.0]],"wavelength_200kV":0.025079337357037376,"wavelength_lambda0":1.2398416730361627e-26,"x":[1.0,0.0,-6.123233995736766e-17],"y":[-3.749399456654644e-33,1.0,-6.123233995736766e-17],"z":[6.123233995736766e-17,6.123233995736766e-17,1.0]},"uvw":[0,0,1]},{"counts":{"after_cap":34,"after_floor":34,"lambda0_vs_flat_numpy_on_py4dstem_table":{"max_abs_px":2.220446049250313e-16,"max_relative_I":0.0},"max_abs_q_vs_py4dstem":2.220446049250313e-16,"max_abs_rotated_q_vs_py4dstem":2.220446049250313e-16,"max_relative_I_vs_py4dstem":2.0677233064976858e-07,"only_py4dstem":[],"only_reference":[],"pre_cap_pre_floor":42,"py4dstem_lambda0":42},"e1":[0.0,0.7071067811865476,-0.7071067811865476],"e2":[-1.0000000000000002,6.123233995736766e-17,6.123233995736766e-17],"entries":[[1,1,-1,0.24694406716878625,0.24694406716878622,-0.24694406716878628,0.0,0.3492316489376701,-0.2469440671687863,0.4277196709640394,0.016283643125166652,0.016283643125166652,1.0,0.34923164893767017,-0.24694406716878625,0.4277196709640394,1.0],[1,-1,1,0.24694406716878625,-0.24694406716878628,0.24694406716878625,2.7755575615628914e-17,-0.3492316489376701,-0.2469440671687863,0.4277196709640394,0.016283643125166652,0.016283643125166652,1.0,-0.3492316489376701,-0.2469440671687863,0.4277196709640394,1.0],[-1,1,-1,-0.24694406716878625,0.24694406716878628,-0.24694406716878625,-2.7755575615628914e-17,0.3492316489376701,0.2469440671687863,0.4277196709640394,0.016283643125166652,0.016283643125166652,1.0,0.3492316489376701,0.2469440671687863,0.4277196709640394,1.0],[-1,-1,1,-0.24694406716878625,-0.24694406716878622,0.24694406716878628,0.0,-0.3492316489376701,0.2469440671687863,0.4277196709640394,0.016283643125166652,0.016283643125166652,1.0,-0.34923164893767017,0.24694406716878625,0.4277196709640394,1.0],[2,0,0,0.4938881343375725,-3.0241926142668304e-17,-3.0241926142668304e-17,0.0,0.0,-0.4938881343375726,0.4938881343375726,0.011304235426513723,0.011304235426513723,0.6942080061336416,4.2768542103246975e-17,-0.49388813433757256,0.49388813433757256,0.6942080690314834],[-2,0,0,-0.4938881343375725,3.0241926142668304e-17,3.0241926142668304e-17,0.0,0.0,0.4938881343375726,0.4938881343375726,0.011304235426513723,0.011304235426513723,0.6942080061336416,-4.2768542103246975e-17,0.49388813433757256,0.49388813433757256,0.6942080690314834],[0,2,-2,0.0,0.4938881343375725,-0.49388813433757256,0.0,0.6984632978753402,0.0,0.6984632978753402,0.004507943017398778,0.004507943017398778,0.27683872599932347,0.6984632978753403,6.048385228533662e-17,0.6984632978753403,0.2768387104227831],[0,-2,2,0.0,-0.4938881343375725,0.49388813433757256,0.0,-0.6984632978753402,0.0,0.6984632978753402,0.004507943017398778,0.004507943017398778,0.27683872599932347,-0.6984632978753403,-6.048385228533662e-17,0.6984632978753403,0.2768387104227831],[3,1,-1,0.7408322015063588,0.2469440671687862,-0.2469440671687863,-2.7755575615628914e-17,0.3492316489376701,-0.7408322015063589,0.8190208150031857,0.002969409693172472,0.002969409693172472,0.18235536546383763,0.34923164893767017,-0.7408322015063589,0.8190208150031856,0.18235537931238013],[3,-1,1,0.7408322015063588,-0.2469440671687863,0.24694406716878622,0.0,-0.3492316489376701,-0.7408322015063589,0.8190208150031857,0.002969409693172472,0.002969409693172472,0.18235536546383763,-0.3492316489376701,-0.7408322015063589,0.8190208150031856,0.18235537931238013],[-3,1,-1,-0.7408322015063588,0.2469440671687863,-0.24694406716878622,0.0,0.3492316489376701,0.7408322015063589,0.8190208150031857,0.002969409693172472,0.002969409693172472,0.18235536546383763,0.3492316489376701,0.7408322015063589,0.8190208150031856,0.18235537931238013],[-3,-1,1,-0.7408322015063588,-0.2469440671687862,0.2469440671687863,2.7755575615628914e-17,-0.3492316489376701,0.7408322015063589,0.8190208150031857,0.002969409693172472,0.002969409693172472,0.18235536546383763,-0.34923164893767017,0.7408322015063589,0.8190208150031856,0.18235537931238013],[2,2,-2,0.4938881343375725,0.49388813433757245,-0.49388813433757256,0.0,0.6984632978753402,-0.4938881343375726,0.8554393419280788,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,0.6984632978753403,-0.4938881343375725,0.8554393419280788,0.1629159529839924],[2,-2,2,0.4938881343375725,-0.49388813433757256,0.4938881343375725,5.551115123125783e-17,-0.6984632978753402,-0.4938881343375726,0.8554393419280788,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,-0.6984632978753402,-0.4938881343375726,0.8554393419280788,0.1629159529839924],[-2,2,-2,-0.4938881343375725,0.49388813433757256,-0.4938881343375725,-5.551115123125783e-17,0.6984632978753402,0.4938881343375726,0.8554393419280788,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,0.6984632978753402,0.4938881343375726,0.8554393419280788,0.1629159529839924],[-2,-2,2,-0.4938881343375725,-0.49388813433757245,0.49388813433757256,0.0,-0.6984632978753402,0.4938881343375726,0.8554393419280788,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,-0.6984632978753403,0.4938881343375725,0.8554393419280788,0.1629159529839924],[4,0,0,0.987776268675145,-6.048385228533661e-17,-6.048385228533661e-17,0.0,0.0,-0.9877762686751452,0.9877762686751452,0.001831066951967828,0.001831066951967828,0.11244823642308166,8.553708420649395e-17,-0.9877762686751451,0.9877762686751451,0.11244825967426558],[-4,0,0,-0.987776268675145,6.048385228533661e-17,6.048385228533661e-17,0.0,0.0,0.9877762686751452,0.9877762686751452,0.001831066951967828,0.001831066951967828,0.11244823642308166,-8.553708420649395e-17,0.9877762686751451,0.9877762686751451,0.11244825967426558],[1,3,-3,0.24694406716878625,0.7408322015063588,-0.7408322015063589,0.0,1.0476949468130103,-0.2469440671687863,1.0764042334956596,0.0014658222317842791,0.0014658222317842791,0.09001807645359321,1.0476949468130103,-0.2469440671687862,1.0764042334956596,0.09001809352871024],[1,-3,3,0.24694406716878625,-0.7408322015063588,0.7408322015063588,0.0,-1.0476949468130103,-0.2469440671687863,1.0764042334956596,0.0014658222317842791,0.0014658222317842791,0.09001807645359321,-1.0476949468130103,-0.24694406716878636,1.0764042334956596,0.09001809352871024],[-1,3,-3,-0.24694406716878625,0.7408322015063588,-0.7408322015063588,0.0,1.0476949468130103,0.2469440671687863,1.0764042334956596,0.0014658222317842791,0.0014658222317842791,0.09001807645359321,1.0476949468130103,0.24694406716878636,1.0764042334956596,0.09001809352871024],[-1,-3,3,-0.24694406716878625,-0.7408322015063588,0.7408322015063589,0.0,-1.0476949468130103,0.2469440671687863,1.0764042334956596,0.0014658222317842791,0.0014658222317842791,0.09001807645359321,-1.0476949468130103,0.2469440671687862,1.0764042334956596,0.09001809352871024],[4,2,-2,0.987776268675145,0.49388813433757245,-0.4938881343375726,0.0,0.6984632978753402,-0.9877762686751452,1.2097739191422043,0.0010768444050839163,0.0010768444050839163,0.06613043511249854,0.6984632978753404,-0.987776268675145,1.2097739191422043,0.06613043760996928],[4,-2,2,0.987776268675145,-0.49388813433757256,0.49388813433757245,5.551115123125783e-17,-0.6984632978753402,-0.9877762686751452,1.2097739191422043,0.0010768444050839163,0.0010768444050839163,0.06613043511249854,-0.6984632978753401,-0.9877762686751452,1.2097739191422043,0.06613043760996928],[-4,2,-2,-0.987776268675145,0.49388813433757256,-0.49388813433757245,-5.551115123125783e-17,0.6984632978753402,0.9877762686751452,1.2097739191422043,0.0010768444050839163,0.0010768444050839163,0.06613043511249854,0.6984632978753401,0.9877762686751452,1.2097739191422043,0.06613043760996928],[-4,-2,2,-0.987776268675145,-0.49388813433757245,0.4938881343375726,0.0,-0.6984632978753402,0.9877762686751452,1.2097739191422043,0.0010768444050839163,0.0010768444050839163,0.06613043511249854,-0.6984632978753404,0.987776268675145,1.2097739191422043,0.06613043760996928],[5,1,-1,1.2347203358439311,0.24694406716878617,-0.24694406716878634,0.0,0.3492316489376701,-1.2347203358439314,1.283159012892118,0.0009178673062107966,0.0009178673062107966,0.056367441803745796,0.3492316489376702,-1.2347203358439314,1.283159012892118,0.056367446650242146],[5,-1,1,1.2347203358439311,-0.24694406716878634,0.2469440671687862,0.0,-0.3492316489376701,-1.2347203358439314,1.283159012892118,0.0009178673062107966,0.0009178673062107966,0.056367441803745796,-0.34923164893767,-1.2347203358439314,1.283159012892118,0.056367446650242146],[-5,1,-1,-1.2347203358439311,0.24694406716878634,-0.2469440671687862,0.0,0.3492316489376701,1.2347203358439314,1.283159012892118,0.0009178673062107966,0.0009178673062107966,0.056367441803745796,0.34923164893767,1.2347203358439314,1.283159012892118,0.056367446650242146],[-5,-1,1,-1.2347203358439311,-0.24694406716878617,0.24694406716878634,0.0,-0.3492316489376701,1.2347203358439314,1.283159012892118,0.0009178673062107966,0.0009178673062107966,0.056367441803745796,-0.3492316489376702,1.2347203358439314,1.283159012892118,0.056367446650242146],[3,3,-3,0.7408322015063588,0.7408322015063588,-0.7408322015063589,1.1102230246251565e-16,1.0476949468130103,-0.7408322015063589,1.2831590128921182,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,1.0476949468130106,-0.7408322015063588,1.2831590128921182,0.056367446650242146],[3,-3,3,0.7408322015063588,-0.7408322015063588,0.7408322015063588,1.1102230246251565e-16,-1.0476949468130103,-0.7408322015063589,1.2831590128921182,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,-1.0476949468130103,-0.740832201506359,1.2831590128921182,0.056367446650242146],[-3,3,-3,-0.7408322015063588,0.7408322015063588,-0.7408322015063588,-1.1102230246251565e-16,1.0476949468130103,0.7408322015063589,1.2831590128921182,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,1.0476949468130103,0.740832201506359,1.2831590128921182,0.056367446650242146],[-3,-3,3,-0.7408322015063588,-0.7408322015063588,0.7408322015063589,-1.1102230246251565e-16,-1.0476949468130103,0.7408322015063589,1.2831590128921182,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,-1.0476949468130106,0.7408322015063588,1.2831590128921182,0.056367446650242146],[0,4,-4,0.0,0.987776268675145,-0.9877762686751451,0.0,1.3969265957506805,0.0,1.3969265957506805,0.0007240064769512531,0.0007240064769512531,0.04446219260555328,1.3969265957506807,1.2096770457067324e-16,1.3969265957506807,0.0444621923004859],[0,-4,4,0.0,-0.987776268675145,0.9877762686751451,0.0,-1.3969265957506805,0.0,1.3969265957506805,0.0007240064769512531,0.0007240064769512531,0.04446219260555328,-1.3969265957506807,-1.2096770457067324e-16,1.3969265957506807,0.0444621923004859],[6,0,0,1.4816644030127175,-9.072577842800492e-17,-9.072577842800492e-17,0.0,0.0,-1.4816644030127177,1.4816644030127177,0.0006108063584144834,0.0006108063584144834,0.03751042403222849,1.2830562630974094e-16,-1.4816644030127177,1.4816644030127177,0.03751042427581846],[2,4,-4,0.4938881343375725,0.987776268675145,-0.9877762686751451,0.0,1.3969265957506805,-0.4938881343375726,1.4816644030127177,0.0006108063584144848,0.0006108063584144848,0.037510424032228575,1.3969265957506807,-0.49388813433757245,1.481664403012718,0.03751042427581846],[2,-4,4,0.4938881343375725,-0.987776268675145,0.987776268675145,0.0,-1.3969265957506805,-0.4938881343375726,1.4816644030127177,0.0006108063584144834,0.0006108063584144834,0.03751042403222849,-1.3969265957506805,-0.49388813433757267,1.4816644030127177,0.03751042427581846],[-2,4,-4,-0.4938881343375725,0.987776268675145,-0.987776268675145,0.0,1.3969265957506805,0.4938881343375726,1.4816644030127177,0.0006108063584144834,0.0006108063584144834,0.03751042403222849,1.3969265957506805,0.49388813433757267,1.4816644030127177,0.03751042427581846],[-2,-4,4,-0.4938881343375725,-0.987776268675145,0.9877762686751451,0.0,-1.3969265957506805,0.4938881343375726,1.4816644030127177,0.0006108063584144848,0.0006108063584144848,0.037510424032228575,-1.3969265957506807,0.49388813433757245,1.481664403012718,0.03751042427581846],[-6,0,0,-1.4816644030127175,9.072577842800492e-17,9.072577842800492e-17,0.0,0.0,1.4816644030127177,1.4816644030127177,0.0006108063584144834,0.0006108063584144834,0.03751042403222849,-1.2830562630974094e-16,1.4816644030127177,1.4816644030127177,0.03751042427581846]],"entry_fields":["h","k","l","gx","gy","gz","s","q1","q2","qlen","F2","I_excited","I_relative","py4dstem_x","py4dstem_y","py4dstem_qlen","py4dstem_I_relative"],"flags":{"cap_tie":false,"cut_edge_hkl":[],"floor_edge_hkl":[],"kmax_edge_hkl":[],"slab_edge_hkl":[]},"frame_map":{"M":[1.0000000000000002,-8.659560562354933e-17,8.659560562354934e-17,1.0000000000000002],"definition":"(g.x', g.y') = M (g.e1, g.e2) with M = [[x'.e1, x'.e2], [y'.e1, y'.e2]]; for det +1, M = R(phi_py) = [[c,-s],[s,c]]; for det -1, M = R(phi_py) diag(1,-1)","det":1.0000000000000004,"handedness":"rotation","phi_py_deg":4.9615627266087134e-15,"phi_py_rad":8.659560562354932e-17},"kv200":{"count_curved":42,"count_flat":42,"definition":"entering = in py4DSTEM's 200 kV curved set but not in the flat slab; leaving = the reverse","entering":[],"leaving":[],"max_abs_dI_relative_common":0.02146949177870368},"library":[[1,1,-1,0.3492316489376701,-0.2469440671687863,0.4277196709640394,1.0],[1,-1,1,-0.3492316489376701,-0.2469440671687863,0.4277196709640394,1.0],[-1,1,-1,0.3492316489376701,0.2469440671687863,0.4277196709640394,1.0],[-1,-1,1,-0.3492316489376701,0.2469440671687863,0.4277196709640394,1.0],[2,0,0,0.0,-0.4938881343375726,0.4938881343375726,0.6942080061336416],[-2,0,0,0.0,0.4938881343375726,0.4938881343375726,0.6942080061336416],[0,2,-2,0.6984632978753402,0.0,0.6984632978753402,0.27683872599932347],[0,-2,2,-0.6984632978753402,0.0,0.6984632978753402,0.27683872599932347],[3,1,-1,0.3492316489376701,-0.7408322015063589,0.8190208150031857,0.18235536546383763],[3,-1,1,-0.3492316489376701,-0.7408322015063589,0.8190208150031857,0.18235536546383763],[-3,1,-1,0.3492316489376701,0.7408322015063589,0.8190208150031857,0.18235536546383763],[-3,-1,1,-0.3492316489376701,0.7408322015063589,0.8190208150031857,0.18235536546383763],[2,2,-2,0.6984632978753402,-0.4938881343375726,0.8554393419280788,0.16291596098705666],[2,-2,2,-0.6984632978753402,-0.4938881343375726,0.8554393419280788,0.16291596098705666],[-2,2,-2,0.6984632978753402,0.4938881343375726,0.8554393419280788,0.16291596098705666],[-2,-2,2,-0.6984632978753402,0.4938881343375726,0.8554393419280788,0.16291596098705666],[4,0,0,0.0,-0.9877762686751452,0.9877762686751452,0.11244823642308166],[-4,0,0,0.0,0.9877762686751452,0.9877762686751452,0.11244823642308166],[1,3,-3,1.0476949468130103,-0.2469440671687863,1.0764042334956596,0.09001807645359321],[1,-3,3,-1.0476949468130103,-0.2469440671687863,1.0764042334956596,0.09001807645359321],[-1,3,-3,1.0476949468130103,0.2469440671687863,1.0764042334956596,0.09001807645359321],[-1,-3,3,-1.0476949468130103,0.2469440671687863,1.0764042334956596,0.09001807645359321],[4,2,-2,0.6984632978753402,-0.9877762686751452,1.2097739191422043,0.06613043511249854],[4,-2,2,-0.6984632978753402,-0.9877762686751452,1.2097739191422043,0.06613043511249854],[-4,2,-2,0.6984632978753402,0.9877762686751452,1.2097739191422043,0.06613043511249854],[-4,-2,2,-0.6984632978753402,0.9877762686751452,1.2097739191422043,0.06613043511249854],[5,1,-1,0.3492316489376701,-1.2347203358439314,1.283159012892118,0.056367441803745796],[5,-1,1,-0.3492316489376701,-1.2347203358439314,1.283159012892118,0.056367441803745796],[-5,1,-1,0.3492316489376701,1.2347203358439314,1.283159012892118,0.056367441803745796],[-5,-1,1,-0.3492316489376701,1.2347203358439314,1.283159012892118,0.056367441803745796],[3,3,-3,1.0476949468130103,-0.7408322015063589,1.2831590128921182,0.05636744180374603],[3,-3,3,-1.0476949468130103,-0.7408322015063589,1.2831590128921182,0.05636744180374603],[-3,3,-3,1.0476949468130103,0.7408322015063589,1.2831590128921182,0.05636744180374603],[-3,-3,3,-1.0476949468130103,0.7408322015063589,1.2831590128921182,0.05636744180374603]],"library_fields":["h","k","l","q1","q2","qlen","I_relative"],"n":[8.659560562354933e-17,0.7071067811865476,0.7071067811865476],"py4dstem":{"orientation_matrix_columns_xyz":[[8.659560562354932e-17,-1.0,8.659560562354933e-17],[0.7071067811865476,1.2246467991473532e-16,0.7071067811865476],[-0.7071067811865476,0.0,0.7071067811865476]],"wavelength_200kV":0.025079337357037376,"wavelength_lambda0":1.2398416730361627e-26,"x":[8.659560562354932e-17,0.7071067811865476,-0.7071067811865476],"y":[-1.0,1.2246467991473532e-16,0.0],"z":[8.659560562354933e-17,0.7071067811865476,0.7071067811865476]},"uvw":[0,1,1]},{"counts":{"after_cap":18,"after_floor":18,"lambda0_vs_flat_numpy_on_py4dstem_table":{"max_abs_px":0.0,"max_relative_I":0.0},"max_abs_q_vs_py4dstem":2.220446049250313e-16,"max_abs_rotated_q_vs_py4dstem":4.440892098500626e-16,"max_relative_I_vs_py4dstem":9.40315914971083e-08,"only_py4dstem":[],"only_reference":[],"pre_cap_pre_floor":18,"py4dstem_lambda0":18},"e1":[0.0,0.7071067811865475,-0.7071067811865475],"e2":[-0.8164965809277259,0.40824829046386296,0.40824829046386296],"entries":[[2,0,-2,0.4938881343375725,-3.0241926142668304e-17,-0.49388813433757256,-5.551115123125783e-17,0.34923164893767006,-0.6048869595711021,0.6984632978753401,0.004507943017398778,0.004507943017398778,1.0,0.6048869595711022,-0.34923164893767006,0.6984632978753402,1.0],[2,-2,0,0.4938881343375725,-0.49388813433757256,0.0,-5.551115123125783e-17,-0.34923164893767006,-0.6048869595711021,0.6984632978753401,0.004507943017398778,0.004507943017398778,1.0,-5.0320486870352116e-33,-0.6984632978753402,0.6984632978753402,1.0],[0,2,-2,0.0,0.4938881343375725,-0.49388813433757256,-5.551115123125783e-17,0.6984632978753401,-2.7755575615628914e-17,0.6984632978753401,0.004507943017398778,0.004507943017398778,1.0,0.6048869595711022,0.34923164893767006,0.6984632978753402,1.0],[0,-2,2,0.0,-0.4938881343375725,0.49388813433757256,5.551115123125783e-17,-0.6984632978753401,2.7755575615628914e-17,0.6984632978753401,0.004507943017398778,0.004507943017398778,1.0,-0.6048869595711022,-0.34923164893767006,0.6984632978753402,1.0],[-2,2,0,-0.4938881343375725,0.49388813433757256,0.0,5.551115123125783e-17,0.34923164893767006,0.6048869595711021,0.6984632978753401,0.004507943017398778,0.004507943017398778,1.0,5.0320486870352116e-33,0.6984632978753402,0.6984632978753402,1.0],[-2,0,2,-0.4938881343375725,3.0241926142668304e-17,0.49388813433757256,5.551115123125783e-17,-0.34923164893767006,0.6048869595711021,0.6984632978753401,0.004507943017398778,0.004507943017398778,1.0,-0.6048869595711022,0.34923164893767006,0.6984632978753402,1.0],[4,-2,-2,0.987776268675145,-0.49388813433757256,-0.49388813433757256,-1.1102230246251565e-16,0.0,-1.2097739191422041,1.2097739191422041,0.0010768444050839163,0.0010768444050839163,0.2388771111186957,0.6048869595711022,-1.0476949468130101,1.2097739191422041,0.23887713358069063],[2,2,-4,0.4938881343375725,0.49388813433757245,-0.9877762686751451,-1.1102230246251565e-16,1.0476949468130101,-0.6048869595711022,1.2097739191422041,0.0010768444050839163,0.0010768444050839163,0.2388771111186957,1.2097739191422043,0.0,1.2097739191422043,0.23887713358069063],[2,-4,2,0.4938881343375725,-0.987776268675145,0.49388813433757256,5.551115123125783e-17,-1.0476949468130101,-0.604886959571102,1.2097739191422041,0.0010768444050839163,0.0010768444050839163,0.2388771111186957,-0.6048869595711022,-1.0476949468130101,1.2097739191422041,0.23887713358069063],[-2,4,-2,-0.4938881343375725,0.987776268675145,-0.49388813433757256,-5.551115123125783e-17,1.0476949468130101,0.604886959571102,1.2097739191422041,0.0010768444050839163,0.0010768444050839163,0.2388771111186957,0.6048869595711022,1.0476949468130101,1.2097739191422041,0.23887713358069063],[-2,-2,4,-0.4938881343375725,-0.49388813433757245,0.9877762686751451,1.1102230246251565e-16,-1.0476949468130101,0.6048869595711022,1.2097739191422041,0.0010768444050839163,0.0010768444050839163,0.2388771111186957,-1.2097739191422043,0.0,1.2097739191422043,0.23887713358069063],[-4,2,2,-0.987776268675145,0.49388813433757256,0.49388813433757256,1.1102230246251565e-16,0.0,1.2097739191422041,1.2097739191422041,0.0010768444050839163,0.0010768444050839163,0.2388771111186957,-0.6048869595711022,1.0476949468130101,1.2097739191422041,0.23887713358069063],[4,0,-4,0.987776268675145,-6.048385228533661e-17,-0.9877762686751451,-1.1102230246251565e-16,0.6984632978753401,-1.2097739191422041,1.3969265957506802,0.0007240064769512531,0.0007240064769512531,0.16060683867495448,1.2097739191422043,-0.6984632978753401,1.3969265957506805,0.16060684660965238],[4,-4,0,0.987776268675145,-0.9877762686751451,0.0,-1.1102230246251565e-16,-0.6984632978753401,-1.2097739191422041,1.3969265957506802,0.0007240064769512531,0.0007240064769512531,0.16060683867495448,-1.0064097374070423e-32,-1.3969265957506805,1.3969265957506805,0.16060684660965238],[0,4,-4,0.0,0.987776268675145,-0.9877762686751451,-1.1102230246251565e-16,1.3969265957506802,-5.551115123125783e-17,1.3969265957506802,0.0007240064769512531,0.0007240064769512531,0.16060683867495448,1.2097739191422043,0.6984632978753401,1.3969265957506805,0.16060684660965238],[0,-4,4,0.0,-0.987776268675145,0.9877762686751451,1.1102230246251565e-16,-1.3969265957506802,5.551115123125783e-17,1.3969265957506802,0.0007240064769512531,0.0007240064769512531,0.16060683867495448,-1.2097739191422043,-0.6984632978753401,1.3969265957506805,0.16060684660965238],[-4,4,0,-0.987776268675145,0.9877762686751451,0.0,1.1102230246251565e-16,0.6984632978753401,1.2097739191422041,1.3969265957506802,0.0007240064769512531,0.0007240064769512531,0.16060683867495448,1.0064097374070423e-32,1.3969265957506805,1.3969265957506805,0.16060684660965238],[-4,0,4,-0.987776268675145,6.048385228533661e-17,0.9877762686751451,1.1102230246251565e-16,-0.6984632978753401,1.2097739191422041,1.3969265957506802,0.0007240064769512531,0.0007240064769512531,0.16060683867495448,-1.2097739191422043,0.6984632978753401,1.3969265957506805,0.16060684660965238]],"entry_fields":["h","k","l","gx","gy","gz","s","q1","q2","qlen","F2","I_excited","I_relative","py4dstem_x","py4dstem_y","py4dstem_qlen","py4dstem_I_relative"],"flags":{"cap_tie":false,"cut_edge_hkl":[],"floor_edge_hkl":[],"kmax_edge_hkl":[],"slab_edge_hkl":[]},"frame_map":{"M":[0.8660254037844386,-0.5,0.4999999999999999,0.8660254037844384],"definition":"(g.x', g.y') = M (g.e1, g.e2) with M = [[x'.e1, x'.e2], [y'.e1, y'.e2]]; for det +1, M = R(phi_py) = [[c,-s],[s,c]]; for det -1, M = R(phi_py) diag(1,-1)","det":0.9999999999999997,"handedness":"rotation","phi_py_deg":29.999999999999996,"phi_py_rad":0.5235987755982988},"kv200":{"count_curved":18,"count_flat":18,"definition":"entering = in py4DSTEM's 200 kV curved set but not in the flat slab; leaving = the reverse","entering":[],"leaving":[],"max_abs_dI_relative_common":0.07453076855568788},"library":[[2,0,-2,0.34923164893767006,-0.6048869595711021,0.6984632978753401,1.0],[2,-2,0,-0.34923164893767006,-0.6048869595711021,0.6984632978753401,1.0],[0,2,-2,0.6984632978753401,-2.7755575615628914e-17,0.6984632978753401,1.0],[0,-2,2,-0.6984632978753401,2.7755575615628914e-17,0.6984632978753401,1.0],[-2,2,0,0.34923164893767006,0.6048869595711021,0.6984632978753401,1.0],[-2,0,2,-0.34923164893767006,0.6048869595711021,0.6984632978753401,1.0],[4,-2,-2,0.0,-1.2097739191422041,1.2097739191422041,0.2388771111186957],[2,2,-4,1.0476949468130101,-0.6048869595711022,1.2097739191422041,0.2388771111186957],[2,-4,2,-1.0476949468130101,-0.604886959571102,1.2097739191422041,0.2388771111186957],[-2,4,-2,1.0476949468130101,0.604886959571102,1.2097739191422041,0.2388771111186957],[-2,-2,4,-1.0476949468130101,0.6048869595711022,1.2097739191422041,0.2388771111186957],[-4,2,2,0.0,1.2097739191422041,1.2097739191422041,0.2388771111186957],[4,0,-4,0.6984632978753401,-1.2097739191422041,1.3969265957506802,0.16060683867495448],[4,-4,0,-0.6984632978753401,-1.2097739191422041,1.3969265957506802,0.16060683867495448],[0,4,-4,1.3969265957506802,-5.551115123125783e-17,1.3969265957506802,0.16060683867495448],[0,-4,4,-1.3969265957506802,5.551115123125783e-17,1.3969265957506802,0.16060683867495448],[-4,4,0,0.6984632978753401,1.2097739191422041,1.3969265957506802,0.16060683867495448],[-4,0,4,-0.6984632978753401,1.2097739191422041,1.3969265957506802,0.16060683867495448]],"library_fields":["h","k","l","q1","q2","qlen","I_relative"],"n":[0.5773502691896257,0.5773502691896257,0.5773502691896257],"py4dstem":{"orientation_matrix_columns_xyz":[[0.408248290463863,-0.7071067811865475,0.5773502691896257],[0.408248290463863,0.7071067811865475,0.5773502691896257],[-0.816496580927726,0.0,0.5773502691896257]],"wavelength_200kV":0.025079337357037376,"wavelength_lambda0":1.2398416730361627e-26,"x":[0.408248290463863,0.408248290463863,-0.816496580927726],"y":[-0.7071067811865475,0.7071067811865475,0.0],"z":[0.5773502691896257,0.5773502691896257,0.5773502691896257]},"uvw":[1,1,1]},{"counts":{"after_cap":16,"after_floor":16,"lambda0_vs_flat_numpy_on_py4dstem_table":{"max_abs_px":0.0,"max_relative_I":0.0},"max_abs_q_vs_py4dstem":2.220446049250313e-16,"max_abs_rotated_q_vs_py4dstem":2.220446049250313e-16,"max_relative_I_vs_py4dstem":8.598041633726349e-08,"only_py4dstem":[],"only_reference":[],"pre_cap_pre_floor":26,"py4dstem_lambda0":26},"e1":[0.0,0.8944271909999159,-0.44721359549995804],"e2":[-0.9128709291752769,0.18257418583505547,0.3651483716701108],"entries":[[1,1,-1,0.24694406716878625,0.24694406716878622,-0.24694406716878628,2.7755575615628914e-17,0.33131023249780805,-0.2705136720608303,0.42771967096403934,0.016283643125166652,0.016283643125166652,1.0,0.4277196709640394,0.0,0.4277196709640394,1.0],[-1,-1,1,-0.24694406716878625,-0.24694406716878622,0.24694406716878628,-2.7755575615628914e-17,-0.33131023249780805,0.2705136720608303,0.42771967096403934,0.016283643125166652,0.016283643125166652,1.0,-0.4277196709640394,0.0,0.4277196709640394,1.0],[2,-2,0,0.4938881343375725,-0.49388813433757256,0.0,-2.7755575615628914e-17,-0.44174697666374413,-0.5410273441216606,0.6984632978753403,0.004507943017398778,0.004507943017398778,0.27683872599932347,-3.558195749863462e-33,-0.6984632978753402,0.6984632978753402,0.2768387104227831],[-2,2,0,-0.4938881343375725,0.49388813433757256,0.0,2.7755575615628914e-17,0.44174697666374413,0.5410273441216606,0.6984632978753403,0.004507943017398778,0.004507943017398778,0.27683872599932347,3.558195749863462e-33,0.6984632978753402,0.6984632978753402,0.2768387104227831],[3,-1,-1,0.7408322015063588,-0.2469440671687863,-0.24694406716878628,2.7755575615628914e-17,-0.11043674416593603,-0.8115410161824909,0.8190208150031856,0.002969409693172472,0.002969409693172472,0.18235536546383763,0.4277196709640394,-0.6984632978753402,0.8190208150031856,0.18235537931238013],[1,-3,1,0.24694406716878625,-0.7408322015063588,0.24694406716878628,-2.7755575615628914e-17,-0.7730572091615522,-0.2705136720608303,0.8190208150031856,0.002969409693172472,0.002969409693172472,0.18235536546383763,-0.4277196709640394,-0.6984632978753402,0.8190208150031856,0.18235537931238013],[-1,3,-1,-0.24694406716878625,0.7408322015063588,-0.24694406716878628,2.7755575615628914e-17,0.7730572091615522,0.2705136720608303,0.8190208150031856,0.002969409693172472,0.002969409693172472,0.18235536546383763,0.4277196709640394,0.6984632978753402,0.8190208150031856,0.18235537931238013],[-3,1,1,-0.7408322015063588,0.2469440671687863,0.24694406716878628,-2.7755575615628914e-17,0.11043674416593603,0.8115410161824909,0.8190208150031856,0.002969409693172472,0.002969409693172472,0.18235536546383763,-0.4277196709640394,0.6984632978753402,0.8190208150031856,0.18235537931238013],[2,2,-2,0.4938881343375725,0.49388813433757245,-0.49388813433757256,5.551115123125783e-17,0.6626204649956161,-0.5410273441216606,0.8554393419280787,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,0.8554393419280788,0.0,0.8554393419280788,0.1629159529839924],[-2,-2,2,-0.4938881343375725,-0.49388813433757245,0.49388813433757256,-5.551115123125783e-17,-0.6626204649956161,0.5410273441216606,0.8554393419280787,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,-0.8554393419280788,0.0,0.8554393419280788,0.1629159529839924],[0,4,-2,0.0,0.987776268675145,-0.49388813433757256,5.551115123125783e-17,1.1043674416593603,2.7755575615628914e-17,1.1043674416593603,0.001370882481426353,0.001370882481426353,0.08418770117281865,0.8554393419280788,0.6984632978753401,1.1043674416593603,0.08418769833362579],[0,-4,2,0.0,-0.987776268675145,0.49388813433757256,-5.551115123125783e-17,-1.1043674416593603,-2.7755575615628914e-17,1.1043674416593603,0.001370882481426353,0.001370882481426353,0.08418770117281865,-0.8554393419280788,-0.6984632978753401,1.1043674416593603,0.08418769833362579],[4,0,-2,0.987776268675145,-6.048385228533661e-17,-0.49388813433757256,5.551115123125783e-17,0.22087348833187206,-1.0820546882433213,1.1043674416593605,0.001370882481426353,0.001370882481426353,0.08418770117281865,0.8554393419280788,-0.6984632978753401,1.1043674416593603,0.08418769833362579],[-4,0,2,-0.987776268675145,6.048385228533661e-17,0.49388813433757256,-5.551115123125783e-17,-0.22087348833187206,1.0820546882433213,1.1043674416593605,0.001370882481426353,0.001370882481426353,0.08418770117281865,-0.8554393419280788,0.6984632978753401,1.1043674416593603,0.08418769833362579],[3,3,-3,0.7408322015063588,0.7408322015063588,-0.7408322015063589,1.1102230246251565e-16,0.9939306974934243,-0.8115410161824907,1.283159012892118,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,1.2831590128921182,-1.1102230246251565e-16,1.2831590128921182,0.056367446650242146],[-3,-3,3,-0.7408322015063588,-0.7408322015063588,0.7408322015063589,-1.1102230246251565e-16,-0.9939306974934243,0.8115410161824907,1.283159012892118,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,-1.2831590128921182,1.1102230246251565e-16,1.2831590128921182,0.056367446650242146],[4,-4,0,0.987776268675145,-0.9877762686751451,0.0,-5.551115123125783e-17,-0.8834939533274883,-1.0820546882433213,1.3969265957506807,0.0007240064769512531,0.0007240064769512531,0.04446219260555328,-7.116391499726925e-33,-1.3969265957506805,1.3969265957506805,0.0444621923004859],[-4,4,0,-0.987776268675145,0.9877762686751451,0.0,5.551115123125783e-17,0.8834939533274883,1.0820546882433213,1.3969265957506807,0.0007240064769512531,0.0007240064769512531,0.04446219260555328,7.116391499726925e-33,1.3969265957506805,1.3969265957506805,0.0444621923004859],[1,5,-3,0.24694406716878625,1.2347203358439311,-0.7408322015063589,0.0,1.4356776741571682,-0.2705136720608303,1.46094080333365,0.000636439890161964,0.000636439890161964,0.03908461302362585,1.2831590128921182,0.6984632978753401,1.4609408033336502,0.03908461074620228],[-1,-5,3,-0.24694406716878625,-1.2347203358439311,0.7408322015063589,0.0,-1.4356776741571682,0.2705136720608303,1.46094080333365,0.000636439890161964,0.000636439890161964,0.03908461302362585,-1.2831590128921182,-0.6984632978753401,1.4609408033336502,0.03908461074620228],[5,1,-3,1.2347203358439311,0.24694406716878617,-0.7408322015063589,0.0,0.5521837208296801,-1.3525683603041514,1.4609408033336502,0.000636439890161964,0.000636439890161964,0.03908461302362585,1.2831590128921182,-0.6984632978753402,1.4609408033336502,0.03908461074620228],[5,-3,-1,1.2347203358439311,-0.7408322015063589,-0.24694406716878628,-8.326672684688674e-17,-0.5521837208296801,-1.3525683603041514,1.4609408033336502,0.000636439890161964,0.000636439890161964,0.03908461302362585,0.42771967096403934,-1.3969265957506805,1.4609408033336502,0.03908461074620228],[3,-5,1,0.7408322015063588,-1.2347203358439314,0.24694406716878628,-8.326672684688674e-17,-1.2148041858252963,-0.811541016182491,1.4609408033336502,0.0006364398901619614,0.0006364398901619614,0.03908461302362569,-0.42771967096403934,-1.3969265957506805,1.4609408033336502,0.03908461074620228],[-3,5,-1,-0.7408322015063588,1.2347203358439314,-0.24694406716878628,8.326672684688674e-17,1.2148041858252963,0.811541016182491,1.4609408033336502,0.0006364398901619614,0.0006364398901619614,0.03908461302362569,0.42771967096403934,1.3969265957506805,1.4609408033336502,0.03908461074620228],[-5,3,1,-1.2347203358439311,0.7408322015063589,0.24694406716878628,8.326672684688674e-17,0.5521837208296801,1.3525683603041514,1.4609408033336502,0.000636439890161964,0.000636439890161964,0.03908461302362585,-0.42771967096403934,1.3969265957506805,1.4609408033336502,0.03908461074620228],[-5,-1,3,-1.2347203358439311,-0.24694406716878617,0.7408322015063589,0.0,-0.5521837208296801,1.3525683603041514,1.4609408033336502,0.000636439890161964,0.000636439890161964,0.03908461302362585,-1.2831590128921182,0.6984632978753402,1.4609408033336502,0.03908461074620228]],"entry_fields":["h","k","l","gx","gy","gz","s","q1","q2","qlen","F2","I_excited","I_relative","py4dstem_x","py4dstem_y","py4dstem_qlen","py4dstem_I_relative"],"flags":{"cap_tie":false,"cut_edge_hkl":[],"floor_edge_hkl":[],"kmax_edge_hkl":[],"slab_edge_hkl":[]},"frame_map":{"M":[0.7745966692414834,-0.6324555320336759,0.6324555320336758,0.7745966692414834],"definition":"(g.x', g.y') = M (g.e1, g.e2) with M = [[x'.e1, x'.e2], [y'.e1, y'.e2]]; for det +1, M = R(phi_py) = [[c,-s],[s,c]]; for det -1, M = R(phi_py) diag(1,-1)","det":1.0,"handedness":"rotation","phi_py_deg":39.231520483592256,"phi_py_rad":0.6847192030022828},"kv200":{"count_curved":26,"count_flat":26,"definition":"entering = in py4DSTEM's 200 kV curved set but not in the flat slab; leaving = the reverse","entering":[],"leaving":[],"max_abs_dI_relative_common":0.02146949177870354},"library":[[1,1,-1,0.33131023249780805,-0.2705136720608303,0.42771967096403934,1.0],[-1,-1,1,-0.33131023249780805,0.2705136720608303,0.42771967096403934,1.0],[2,-2,0,-0.44174697666374413,-0.5410273441216606,0.6984632978753403,0.27683872599932347],[-2,2,0,0.44174697666374413,0.5410273441216606,0.6984632978753403,0.27683872599932347],[3,-1,-1,-0.11043674416593603,-0.8115410161824909,0.8190208150031856,0.18235536546383763],[1,-3,1,-0.7730572091615522,-0.2705136720608303,0.8190208150031856,0.18235536546383763],[-1,3,-1,0.7730572091615522,0.2705136720608303,0.8190208150031856,0.18235536546383763],[-3,1,1,0.11043674416593603,0.8115410161824909,0.8190208150031856,0.18235536546383763],[2,2,-2,0.6626204649956161,-0.5410273441216606,0.8554393419280787,0.16291596098705666],[-2,-2,2,-0.6626204649956161,0.5410273441216606,0.8554393419280787,0.16291596098705666],[0,4,-2,1.1043674416593603,2.7755575615628914e-17,1.1043674416593603,0.08418770117281865],[0,-4,2,-1.1043674416593603,-2.7755575615628914e-17,1.1043674416593603,0.08418770117281865],[4,0,-2,0.22087348833187206,-1.0820546882433213,1.1043674416593605,0.08418770117281865],[-4,0,2,-0.22087348833187206,1.0820546882433213,1.1043674416593605,0.08418770117281865],[3,3,-3,0.9939306974934243,-0.8115410161824907,1.283159012892118,0.05636744180374603],[-3,-3,3,-0.9939306974934243,0.8115410161824907,1.283159012892118,0.05636744180374603]],"library_fields":["h","k","l","q1","q2","qlen","I_relative"],"n":[0.40824829046386313,0.40824829046386313,0.816496580927726],"py4dstem":{"orientation_matrix_columns_xyz":[[0.5773502691896257,-0.7071067811865475,0.40824829046386313],[0.5773502691896257,0.7071067811865475,0.40824829046386313],[-0.577350269189626,0.0,0.816496580927726]],"wavelength_200kV":0.025079337357037376,"wavelength_lambda0":1.2398416730361627e-26,"x":[0.5773502691896257,0.5773502691896257,-0.577350269189626],"y":[-0.7071067811865475,0.7071067811865475,0.0],"z":[0.40824829046386313,0.40824829046386313,0.816496580927726]},"uvw":[1,1,2]},{"counts":{"after_cap":14,"after_floor":14,"lambda0_vs_flat_numpy_on_py4dstem_table":{"max_abs_px":5.551115123125783e-17,"max_relative_I":0.0},"max_abs_q_vs_py4dstem":4.440892098500626e-16,"max_abs_rotated_q_vs_py4dstem":3.3306690738754696e-16,"max_relative_I_vs_py4dstem":1.896854243208002e-07,"only_py4dstem":[],"only_reference":[],"pre_cap_pre_floor":18,"py4dstem_lambda0":18},"e1":[0.0,0.8320502943378437,-0.5547001962252291],"e2":[-0.9636241116594317,0.14824986333222032,0.22237479499833046],"entries":[[1,1,-1,0.24694406716878625,0.24694406716878622,-0.24694406716878628,0.0,0.34244980628795474,-0.2562659694593263,0.42771967096403934,0.016283643125166652,0.016283643125166652,1.0,0.41321645957973846,-0.110436744165936,0.4277196709640393,1.0],[-1,-1,1,-0.24694406716878625,-0.24694406716878622,0.24694406716878628,0.0,-0.34244980628795474,0.2562659694593263,0.42771967096403934,0.016283643125166652,0.016283643125166652,1.0,-0.41321645957973846,0.110436744165936,0.4277196709640393,1.0],[2,2,-2,0.4938881343375725,0.49388813433757245,-0.49388813433757256,0.0,0.6848996125759095,-0.5125319389186526,0.8554393419280787,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,0.8264329191594769,-0.220873488331872,0.8554393419280786,0.1629159529839924],[-2,-2,2,-0.4938881343375725,-0.49388813433757245,0.49388813433757256,0.0,-0.6848996125759095,0.5125319389186526,0.8554393419280787,0.0026528653681068036,0.0026528653681068036,0.16291596098705666,-0.8264329191594769,0.220873488331872,0.8554393419280786,0.1629159529839924],[3,-3,1,0.7408322015063588,-0.7408322015063588,0.24694406716878625,8.326672684688674e-17,-0.7533895738335005,-0.7687979083779789,1.0764042334956596,0.0014658222317842791,0.0014658222317842791,0.09001807645359321,-0.41321645957973835,-0.9939306974934244,1.0764042334956598,0.09001809352871024],[-3,3,-1,-0.7408322015063588,0.7408322015063588,-0.24694406716878625,-8.326672684688674e-17,0.7533895738335005,0.7687979083779789,1.0764042334956596,0.0014658222317842791,0.0014658222317842791,0.09001807645359321,0.41321645957973835,0.9939306974934244,1.0764042334956598,0.09001809352871024],[4,-2,0,0.987776268675145,-0.49388813433757256,-3.0241926142668304e-17,3.126366701511779e-17,-0.41093976754554573,-1.0250638778373051,1.1043674416593603,0.001370882481426353,0.001370882481426353,0.08418770117281865,1.2909531012606308e-16,-1.1043674416593605,1.1043674416593605,0.08418769833362579],[-4,2,0,-0.987776268675145,0.49388813433757256,3.0241926142668304e-17,-3.126366701511779e-17,0.41093976754554573,1.0250638778373051,1.1043674416593603,0.001370882481426353,0.001370882481426353,0.08418770117281865,-1.2909531012606308e-16,1.1043674416593605,1.1043674416593605,0.08418769833362579],[2,-4,2,0.4938881343375725,-0.987776268675145,0.49388813433757256,1.1102230246251565e-16,-1.0958393801214552,-0.5125319389186526,1.2097739191422043,0.0010768444050839163,0.0010768444050839163,0.06613043511249854,-0.8264329191594769,-0.8834939533274884,1.2097739191422043,0.06613043760996928],[-2,4,-2,-0.4938881343375725,0.987776268675145,-0.49388813433757256,-1.1102230246251565e-16,1.0958393801214552,0.5125319389186526,1.2097739191422043,0.0010768444050839163,0.0010768444050839163,0.06613043511249854,0.8264329191594769,0.8834939533274884,1.2097739191422043,0.06613043760996928],[5,-1,-1,1.2347203358439311,-0.24694406716878634,-0.2469440671687863,2.7755575615628914e-17,-0.06848996125759099,-1.2813298472966312,1.283159012892118,0.0009178673062107966,0.0009178673062107966,0.056367441803745796,0.41321645957973857,-1.2148041858252965,1.2831590128921182,0.056367446650242146],[-5,1,1,-1.2347203358439311,0.24694406716878634,0.2469440671687863,-2.7755575615628914e-17,0.06848996125759099,1.2813298472966312,1.283159012892118,0.0009178673062107966,0.0009178673062107966,0.056367441803745796,-0.41321645957973857,1.2148041858252965,1.2831590128921182,0.056367446650242146],[3,3,-3,0.7408322015063588,0.7408322015063588,-0.7408322015063589,-1.1102230246251565e-16,1.0273494188638643,-0.7687979083779789,1.2831590128921182,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,1.2396493787392155,-0.33131023249780805,1.283159012892118,0.056367446650242146],[-3,-3,3,-0.7408322015063588,-0.7408322015063588,0.7408322015063589,1.1102230246251565e-16,-1.0273494188638643,0.7687979083779789,1.2831590128921182,0.0009178673062108004,0.0009178673062108004,0.05636744180374603,-1.2396493787392155,0.33131023249780805,1.283159012892118,0.056367446650242146],[1,-5,3,0.24694406716878625,-1.2347203358439314,0.7408322015063589,1.1102230246251565e-16,-1.43828918640941,-0.2562659694593263,1.4609408033336504,0.0006364398901619614,0.0006364398901619614,0.03908461302362569,-1.2396493787392153,-0.7730572091615524,1.46094080333365,0.03908461074620228],[-1,5,-3,-0.24694406716878625,1.2347203358439314,-0.7408322015063589,-1.1102230246251565e-16,1.43828918640941,0.2562659694593263,1.4609408033336504,0.0006364398901619614,0.0006364398901619614,0.03908461302362569,1.2396493787392153,0.7730572091615524,1.46094080333365,0.03908461074620228],[6,0,-2,1.4816644030127175,-9.072577842800492e-17,-0.4938881343375726,0.0,0.2739598450303638,-1.5375958167559578,1.5618114138379453,0.000522396681401734,0.000522396681401734,0.03208106916776879,0.8264329191594771,-1.3252409299912324,1.5618114138379453,0.032081071654159916],[-6,0,2,-1.4816644030127175,9.072577842800492e-17,0.4938881343375726,0.0,-0.2739598450303638,1.5375958167559578,1.5618114138379453,0.000522396681401734,0.000522396681401734,0.03208106916776879,-0.8264329191594771,1.3252409299912324,1.5618114138379453,0.032081071654159916]],"entry_fields":["h","k","l","gx","gy","gz","s","q1","q2","qlen","F2","I_excited","I_relative","py4dstem_x","py4dstem_y","py4dstem_qlen","py4dstem_I_relative"],"flags":{"cap_tie":false,"cut_edge_hkl":[],"floor_edge_hkl":[],"kmax_edge_hkl":[],"slab_edge_hkl":[]},"frame_map":{"M":[0.9281909617845141,-0.3721042037676255,0.37210420376762554,0.9281909617845144],"definition":"(g.x', g.y') = M (g.e1, g.e2) with M = [[x'.e1, x'.e2], [y'.e1, y'.e2]]; for det +1, M = R(phi_py) = [[c,-s],[s,c]]; for det -1, M = R(phi_py) diag(1,-1)","det":1.0000000000000002,"handedness":"rotation","phi_py_deg":21.845447639642487,"phi_py_rad":0.3812749878837851},"kv200":{"count_curved":18,"count_flat":18,"definition":"entering = in py4DSTEM's 200 kV curved set but not in the flat slab; leaving = the reverse","entering":[],"leaving":[],"max_abs_dI_relative_common":0.021347249506954158},"library":[[1,1,-1,0.34244980628795474,-0.2562659694593263,0.42771967096403934,1.0],[-1,-1,1,-0.34244980628795474,0.2562659694593263,0.42771967096403934,1.0],[2,2,-2,0.6848996125759095,-0.5125319389186526,0.8554393419280787,0.16291596098705666],[-2,-2,2,-0.6848996125759095,0.5125319389186526,0.8554393419280787,0.16291596098705666],[3,-3,1,-0.7533895738335005,-0.7687979083779789,1.0764042334956596,0.09001807645359321],[-3,3,-1,0.7533895738335005,0.7687979083779789,1.0764042334956596,0.09001807645359321],[4,-2,0,-0.41093976754554573,-1.0250638778373051,1.1043674416593603,0.08418770117281865],[-4,2,0,0.41093976754554573,1.0250638778373051,1.1043674416593603,0.08418770117281865],[2,-4,2,-1.0958393801214552,-0.5125319389186526,1.2097739191422043,0.06613043511249854],[-2,4,-2,1.0958393801214552,0.5125319389186526,1.2097739191422043,0.06613043511249854],[5,-1,-1,-0.06848996125759099,-1.2813298472966312,1.283159012892118,0.056367441803745796],[-5,1,1,0.06848996125759099,1.2813298472966312,1.283159012892118,0.056367441803745796],[3,3,-3,1.0273494188638643,-0.7687979083779789,1.2831590128921182,0.05636744180374603],[-3,-3,3,-1.0273494188638643,0.7687979083779789,1.2831590128921182,0.05636744180374603]],"library_fields":["h","k","l","q1","q2","qlen","I_relative"],"n":[0.2672612419124245,0.5345224838248488,0.8017837257372732],"py4dstem":{"orientation_matrix_columns_xyz":[[0.35856858280031817,-0.8944271909999159,0.2672612419124245],[0.717137165600636,0.4472135954999581,0.5345224838248488],[-0.5976143046671968,0.0,0.8017837257372732]],"wavelength_200kV":0.025079337357037376,"wavelength_lambda0":1.2398416730361627e-26,"x":[0.35856858280031817,0.717137165600636,-0.5976143046671968],"y":[-0.8944271909999159,0.4472135954999581,0.0],"z":[0.2672612419124245,0.5345224838248488,0.8017837257372732]},"uvw":[1,2,3]}]}, diff --git a/Tests/Fixtures/README.md b/Tests/Fixtures/README.md index dbb47f3..f50f32b 100644 --- a/Tests/Fixtures/README.md +++ b/Tests/Fixtures/README.md @@ -3,7 +3,7 @@ One row per committed fixture file under `Tests/*/Fixtures/`: size, the script under `tools/` that names it (the generator or its pin script; a few scripts write a whole directory; a script found only by file-name prefix, tool-folder name or test module is marked so), and a note where the origin is not the kit's own pinned reference. 55 files. -Licence: every fixture is generated from this kit's own code and the pinned Python reference (see `CLAUDE.md`, Reference) and ships under the kit's GPL-3.0-or-later licence, except the rows marked *third party*. Nothing here is the owner's data: the committed text fixtures carry no owner path or name (checked by search), and real datasets are read from `$MACEM_DATA` and never copied into the repo. +Licence: every fixture is generated from this kit's own code and the pinned Python reference (named in the README) and ships under the kit's GPL-3.0-or-later licence, except the rows marked *third party*. Nothing here is the owner's data: the committed text fixtures carry no owner path or name (checked by search), and real datasets are read from `$MACEM_DATA` and never copied into the repo. ## Third party diff --git a/docs/benchmarks.md b/docs/benchmarks.md index 9bd5dd2..fdd5972 100644 --- a/docs/benchmarks.md +++ b/docs/benchmarks.md @@ -14,7 +14,7 @@ Float64 unless the function is Float32 by design (ACOM, ellipse pattern pixels). | Pin note | `References/python/orix` runs pymatgen-core **2026.10.16** under a `pymatgen` 2026.9.24 metapackage; the fixtures record `pymatgen` 2026.9.24 and, except `cif-symmetry-pins.json` (generated 2026-10-21 on this install, byte-identical on regeneration), `pymatgen-core` 2026.9.23. Nothing here compares numbers, only time | | 0.9.1 | The `symmetry_detection` and `cif_import` rows above are the 2026-10-21 measurement of 0.9.0. 0.9.1 replaced the closure check that took 95 % of them (see `docs/open-items.md`); measured in-process on the same `al_super2.cif` (machine load 3.6): `cif_import` typical median 67 ms (min 67, max 77), against 297 ms (one run at load 9) before the change and the table's 351 ms. Not yet re-run through `run.sh`; the nightly's row replaces these | -Re-run: `tools/benchmarks/gen_inputs.py` (References/python/orix Python), then `../../tools/memcap.sh --gb 8 -- tools/benchmarks/run.sh` +Re-run: `tools/benchmarks/gen_inputs.py` (References/python/orix Python), then `tools/benchmarks/run.sh` for the kit and `tools/benchmarks/bench_python.py pymatgen|py4dstem` for Python, merged by `merge.py`. The raw lines are `tools/benchmarks/results/2026-10-21.jsonl`. diff --git a/docs/open-items.md b/docs/open-items.md index ea1e1bb..6edab4a 100644 --- a/docs/open-items.md +++ b/docs/open-items.md @@ -30,7 +30,7 @@ A plain list, worst first. Each line: the item, the cause where it is known, wha - **CIF symmetry.** Still unchecked: a group named by Hall symbol only, and a partial list whose count equals the primitive group's order but whose operations are the wrong ones (a count cannot see that). - **Python pins.** `References/python/orix` and `py4dstem` hold pymatgen-core 2026.10.16 under a `pymatgen` 2026.9.24 metapackage - (dist-info of both); `CLAUDE.md` and `docs/parity.md` say 2026.9.24, the older fixtures record pymatgen-core 2026.9.23 (a + (dist-info of both); the README and `docs/parity.md` say 2026.9.24, the older fixtures record pymatgen-core 2026.9.23 (a previous venv). `cif-symmetry-pins.json` records `pymatgen` 2026.9.24 (a literal in `pins.py`) and was generated on this install, so on pymatgen-core 2026.10.16: regenerating it on 2026-10-21 gave a byte-identical file. The other fixtures were not regenerated; re-generate and re-pin them together at the next fixture change. diff --git a/docs/orientation-symmetry.md b/docs/orientation-symmetry.md index 8983b2a..d49ae5f 100644 --- a/docs/orientation-symmetry.md +++ b/docs/orientation-symmetry.md @@ -159,12 +159,12 @@ not bit equality between different floating-point types. The measured Double-to- From the worktree, with the existing pinned references (no installation or network access): ```sh -../../tools/memcap.sh -- ../../References/python/orix/bin/python -I -B tools/symmetry/pins.py +../../References/python/orix/bin/python -I -B tools/symmetry/pins.py swift test -c release --jobs 4 ``` The orix pins (`tools/orix/ipf-pins.py`, `tools/orix/disorientation-pins.py`) use the orix venv, provisioned by -macEM-suite `tools/setup-python-refs.sh orix` (orix 0.15.0, NumPy 2.5.4, SciPy 1.18.1, Python 3.12, freeze file in +a pinned-environment setup script (orix 0.15.0, NumPy 2.5.4, SciPy 1.18.1, Python 3.12, freeze file in `References/python/orix/freeze.txt`); the direction-family pins use the py4DSTEM venv. `MACEM_SUITE_ROOT` can locate references from a differently placed checkout. `pins.py` invokes the pinned py4DSTEM interpreter and compiles only a `git show` extraction of the app's symmetry classes at c809679c into this worktree's `.build/symmetry-generator`. It does not build or modify the app. The JSON contains seed 20261016, package versions, diff --git a/docs/parity.md b/docs/parity.md index 6a73bcc..33b5c45 100644 --- a/docs/parity.md +++ b/docs/parity.md @@ -15,7 +15,7 @@ function or a small group of them, not every method of the class. yet. The "How checked" column says which; read it before relying on a row. - **not held**: no kit symbol. "planned" names the place where it is registered or intended; it is not a promise of a date. -Numerics are held to the tolerance the Python package's own tests use; readers, I/O, indices and metadata are exact. Agreement with a package is agreement, not truth (`CLAUDE.md`); where the kit and a package differ by design the difference +Numerics are held to the tolerance the Python package's own tests use; readers, I/O, indices and metadata are exact. Agreement with a package is agreement, not truth; where the kit and a package differ by design the difference is named. Counts are of rows. @@ -84,8 +84,8 @@ and are counted apart. | P22 | macTEM `RingOverlay.swift` (read-only; the app source is the oracle, no Python reference) transcribed into pure Python: 8-point ellipse polylines and the Newton point-to-ellipse distance (3600 samples, 60 iterations) for 4 ellipses x 7 points; closed forms for the circle and axis vertices | `tools/mactem-pieces/ring-overlay-pins.py` -> `Tests/DiffractoGeometryTests/Fixtures/ring-overlay-pins.json` | `RingOverlayTests` | polyline 1e-12; distance 1e-9 (absolute below 1); circle and vertex closed forms 1e-9 | | P23 | macTEM `IndexingDisplay.swift` (read-only; the app source is the oracle, no Python reference) transcribed into pure Python: sigma_q = q tol/100, z, delta %, relative dd, margin, odds and the odds text on 6 accepted rings of the dyadic list g = 1, 1.5, 2, 3 (the decision is the kit's RingIndexing, P9) | `tools/mactem-pieces/indexing-display-pins.py` -> `Tests/DiffractoGeometryTests/Fixtures/indexing-display-pins.json` | `IndexingDisplayTests` | 1e-12 relative (margin and odds 1e-11); odds text and verdict names exact | | P24 | macTEM `RingScale.swift` (read-only; the app source is the oracle): its header forms q = 2 sin(1/2 atan(R/L))/lambda, R = L tan(2 asin(lambda q/2)) written out in the test against the kit's `RingCalibration.q`/`radius` on a grid of 5 voltages x 4 spacings x 5 radii x 5 rings (500 cases); closed forms for the linear form and the file-versus-fit difference | none (closed forms in the test) | `RingScaleTests` | 1e-12 relative (the kit's measured 8.2e-16 for q, 3.3e-15 for R); linear form exact (one multiplication) | -| P25 | **(a) transcription of the app source at mac4DSTEM c809679c** (OrientationPlan, OrientationMatcher, the fundamental-zone samplers; NumPy, polar images and FFTs in float32 as the Swift): the beam directions, template images and spots, the experimental polar image and ring FFT, every template's score, the winner, runner-up, in-plane angle and orientation matrix, reduced Euler angles (m-3m), for m-3m Al (6 patterns), 6/mmm Mg (4) and 2/m (4), planted with the apps' excitation model, a 0.3 px jitter, spurious peaks and a Q calibration. **(b) py4DSTEM f050d207 run** (0.14.19, NumPy 2.5.0, SciPy 1.18.0): `Crystal.generate_diffraction_pattern` spots of 4 zone axes per crystal at lambda -> 0 and at 200 kV for 4 crystals (m-3m, 6/mmm, 2/m, 4/mmm); 18 planted orientations, py4DSTEM's own peaks, `orientation_plan` + `match_single_pattern` | `tools/acom-matcher/pins.py` with `app_route.py` (one process under `tools/memcap.sh`; sources' SHA-256 and versions in the fixture) -> `Tests/DiffractoOrientationTests/Fixtures/acom-matcher-pins.json` (540 kB; arrays base64) | `ACOMAppRouteTests` (`zoneAxesTemplatesAndSpotsEqualTheTranscription`, `matchesEqualTheTranscription`); `ACOMPy4DSTEMTests` (`spotsEqualPy4DSTEMsGeneratedPattern`, `plantedOrientationsAgreeWithPy4DSTEMsMatch`); `ACOMContractTests` | (a) beam directions 2e-14 (measured 2.3e-16); template images, polar image **bit exact** (gap 0); template spots 1e-6 (measured 1.2e-7, Float); ring FFTs 1e-6 (1.2e-7, vDSP vs NumPy); every template's score and the winner/runner-up 1e-6 (1.8e-7); orientation matrix 2e-6 (4.6e-7, the Float angle); in-plane angle 2e-6; template, mirror flag, Euler exact or 2e-6. Pinned choices are not near ties (margins > 1e-4 in the generator). (b) spots vs py4DSTEM 1e-6 (measured 5.1e-15 relative: r, azimuth and weight, both excitation models, 1808 spots); planted orientations: the kit's route with py4DSTEM's excitation model equals its NumPy transcription (matrix 1e-6) and lies 0.3-4.0 degrees from the truth and 0.4-3.9 degrees from py4DSTEM's answer for 17 of 18 patterns (py4DSTEM itself is 0.5-2.1 degrees from the truth); one 2/m pattern is matched to a different beam direction in the mirror pass (127 degrees), py4DSTEM finds it (1.5 degrees) Notes: the oracle environment is the CuboKit py4DSTEM venv (Python 3.12.4, NumPy 2.5.0, SciPy 1.18.0), not this repo's 3.14.7 / 2.5.4 / 1.18.1 pin set; the fixture records the versions it was made with. The kit requires at least `minimumPeakCount` (2) peaks for a polar image where the app only refuses an empty list (documented deviation; a one-peak image has no azimuthal structure to correlate). The pinned transcription includes patterns whose app-route answer is far from the planted truth (for example an Al pattern 36.7 degrees off at score 0.985, a monoclinic pattern 179 degrees off at 0.866 against a runner-up 0.861): these are the app's own outputs, pinned as such, and the near-ties are symmetry or pi ambiguities of the simplified route, not defects of the port. The reduced Euler angles are pinned to the app for m-3m only; the kit's reduction for 6/mmm and 2/m is checked against its own `CrystalOrientationSymmetry`, not against the app | -| P26 | orix 0.15.0 `DirectionColorKeyTSL(symmetry).direction2color` (the EDAX/TSL key as in MTEX) with `Vector3d.in_fundamental_sector` and `Symmetry.fundamental_sector`, all 11 Laue classes (orix's 2/m and -3m settings mapped to the kit's by a rotation, asserted as operator sets): 240 seeded signed random poles per class plus the axes, sector vertices, centres and points beside the vertices (2 777 poles) | `tools/orix/ipf-pins.py` (orix venv, macEM-suite `tools/setup-python-refs.sh orix`) -> `Tests/DiffractoOrientationTests/Fixtures/orix-ipf-pins.json` and the generated sector table `OrixIPFSectors.swift` | `OrixIPFKeyTests.orixKeyMatchesOrixForAllElevenLaueClasses`, `nativeKeysOfTheThreeOriginalClassesVersusOrix` | RGB 1e-5 absolute (orix's allclose; was 1e-7; measured 2.98e-8, the Float rounding); app native keys versus orix: m-3m 3.5e-6, 6/mmm 0.30, 2/m 1.0 (recorded, not widened) | +| P25 | **(a) transcription of the app source at mac4DSTEM c809679c** (OrientationPlan, OrientationMatcher, the fundamental-zone samplers; NumPy, polar images and FFTs in float32 as the Swift): the beam directions, template images and spots, the experimental polar image and ring FFT, every template's score, the winner, runner-up, in-plane angle and orientation matrix, reduced Euler angles (m-3m), for m-3m Al (6 patterns), 6/mmm Mg (4) and 2/m (4), planted with the apps' excitation model, a 0.3 px jitter, spurious peaks and a Q calibration. **(b) py4DSTEM f050d207 run** (0.14.19, NumPy 2.5.0, SciPy 1.18.0): `Crystal.generate_diffraction_pattern` spots of 4 zone axes per crystal at lambda -> 0 and at 200 kV for 4 crystals (m-3m, 6/mmm, 2/m, 4/mmm); 18 planted orientations, py4DSTEM's own peaks, `orientation_plan` + `match_single_pattern` | `tools/acom-matcher/pins.py` with `app_route.py` (one process under a memory cap; sources' SHA-256 and versions in the fixture) -> `Tests/DiffractoOrientationTests/Fixtures/acom-matcher-pins.json` (540 kB; arrays base64) | `ACOMAppRouteTests` (`zoneAxesTemplatesAndSpotsEqualTheTranscription`, `matchesEqualTheTranscription`); `ACOMPy4DSTEMTests` (`spotsEqualPy4DSTEMsGeneratedPattern`, `plantedOrientationsAgreeWithPy4DSTEMsMatch`); `ACOMContractTests` | (a) beam directions 2e-14 (measured 2.3e-16); template images, polar image **bit exact** (gap 0); template spots 1e-6 (measured 1.2e-7, Float); ring FFTs 1e-6 (1.2e-7, vDSP vs NumPy); every template's score and the winner/runner-up 1e-6 (1.8e-7); orientation matrix 2e-6 (4.6e-7, the Float angle); in-plane angle 2e-6; template, mirror flag, Euler exact or 2e-6. Pinned choices are not near ties (margins > 1e-4 in the generator). (b) spots vs py4DSTEM 1e-6 (measured 5.1e-15 relative: r, azimuth and weight, both excitation models, 1808 spots); planted orientations: the kit's route with py4DSTEM's excitation model equals its NumPy transcription (matrix 1e-6) and lies 0.3-4.0 degrees from the truth and 0.4-3.9 degrees from py4DSTEM's answer for 17 of 18 patterns (py4DSTEM itself is 0.5-2.1 degrees from the truth); one 2/m pattern is matched to a different beam direction in the mirror pass (127 degrees), py4DSTEM finds it (1.5 degrees) Notes: the oracle environment is the CuboKit py4DSTEM venv (Python 3.12.4, NumPy 2.5.0, SciPy 1.18.0), not this repo's 3.14.7 / 2.5.4 / 1.18.1 pin set; the fixture records the versions it was made with. The kit requires at least `minimumPeakCount` (2) peaks for a polar image where the app only refuses an empty list (documented deviation; a one-peak image has no azimuthal structure to correlate). The pinned transcription includes patterns whose app-route answer is far from the planted truth (for example an Al pattern 36.7 degrees off at score 0.985, a monoclinic pattern 179 degrees off at 0.866 against a runner-up 0.861): these are the app's own outputs, pinned as such, and the near-ties are symmetry or pi ambiguities of the simplified route, not defects of the port. The reduced Euler angles are pinned to the app for m-3m only; the kit's reduction for 6/mmm and 2/m is checked against its own `CrystalOrientationSymmetry`, not against the app | +| P26 | orix 0.15.0 `DirectionColorKeyTSL(symmetry).direction2color` (the EDAX/TSL key as in MTEX) with `Vector3d.in_fundamental_sector` and `Symmetry.fundamental_sector`, all 11 Laue classes (orix's 2/m and -3m settings mapped to the kit's by a rotation, asserted as operator sets): 240 seeded signed random poles per class plus the axes, sector vertices, centres and points beside the vertices (2 777 poles) | `tools/orix/ipf-pins.py` (the pinned orix venv) -> `Tests/DiffractoOrientationTests/Fixtures/orix-ipf-pins.json` and the generated sector table `OrixIPFSectors.swift` | `OrixIPFKeyTests.orixKeyMatchesOrixForAllElevenLaueClasses`, `nativeKeysOfTheThreeOriginalClassesVersusOrix` | RGB 1e-5 absolute (orix's allclose; was 1e-7; measured 2.98e-8, the Float rounding); app native keys versus orix: m-3m 3.5e-6, 6/mmm 0.30, 2/m 1.0 (recorded, not widened) | | P27 | orix 0.15.0 `Orientation.reduce()` (single) and `Orientation.angle_with` / `Misorientation((sym, sym)).reduce()` (pairs), all 11 classes, versus brute force over the proper group (asserted in the generator): 160 single orientations (150 seeded random, 10 designed) and 150 pairs per class | `tools/orix/disorientation-pins.py` -> `orix-disorientation-pins.json` | `OrixDisorientationTests` | `reduce` Float angle atol 1e-8 + rtol 1e-5 of the angle (was 2e-7 rad; measured 1.19e-7); reduced matrix 1e-9 where the minimum is unique (measured 6.7e-16); `disorientation(from:to:)` angle atol 1e-8 + rtol 1e-5 (was 1e-9 rad; measured 1.4e-14). The kit's reduction needed no change | | P36 | orix 0.15.0 `Misorientation((Gl, Gr))` (`equivalent`, `reduce`) for 12 group pairs and `Orientation.in_euler_fundamental_region` for the 11 Laue classes and -3m in both settings, groups built from the kit's own generators (`CrystalOrientationSymmetry.init`); beta'' in Al (the planted relation of `tools/beta-variants/planted.py`, 2/m to m-3m) | `tools/orix/misorientation-pins.py` -> `orix-misorientation-pins.json` | `OrixMisorientationTests` | equivalents as sets 1e-9 (measured 6e-16), smallest angle 1e-9 (4e-15) and orix's own angle 1e-4 where orix is minimal, reduced matrix 1e-9 where unique, Euler angles 1e-8 (2e-15); orix's `reduce` is not the minimum on 4 of 492 draws (see the DEVIATION in the Misorientation row) | | P28 | py4DSTEM f050d207 `Crystal.symmetry_reduce_directions` run unchanged under its own `orientation_plan` ranges and symmetry_reduction (the P18 harness), all 11 classes, 2 387 seeded and designed matrices (7 161 columns) | `tools/symmetry/family-pins.py` (py4DSTEM venv) -> `py4dstem-family-pins.json` | `Py4DSTEMFamilyTests` | family entries 1e-7 absolute (was 1e-12; measured 0.0) on 6 990 columns; 171 columns within 1e-12 of a sector wall not compared (BLAS rounding decides the exact `>= 0` test) | diff --git a/tools/acom-matcher/pins.py b/tools/acom-matcher/pins.py index c7faa4f..9af483f 100644 --- a/tools/acom-matcher/pins.py +++ b/tools/acom-matcher/pins.py @@ -1,6 +1,6 @@ """DiffractoKit ACOM matcher: the pin generator (docs/parity.md row P25). - tools/memcap.sh --gb 4 -- References/python/py4dstem/bin/python -I -B tools/acom-matcher/pins.py + References/python/py4dstem/bin/python -I -B tools/acom-matcher/pins.py writes Tests/DiffractoOrientationTests/Fixtures/acom-matcher-pins.json. The py4DSTEM venv is the one of CuboKit (py4DSTEM f050d207 = 0.14.19, NumPy, SciPy; versions are written into the fixture). Nothing here is generated from the new Swift. diff --git a/tools/benchmarks/Package.swift b/tools/benchmarks/Package.swift index 697f7c0..70e9cc8 100644 --- a/tools/benchmarks/Package.swift +++ b/tools/benchmarks/Package.swift @@ -1,6 +1,6 @@ // swift-tools-version: 6.2 // DiffractoKit benchmark: a SEPARATE package that depends on DiffractoKit by path (like tools/acom-benchmark). Prints JSON lines, -// never asserts. Run with run.sh, under ../../../tools/memcap.sh, one benchmark at a time machine-wide. +// never asserts. Run with run.sh, under a memory cap, one benchmark at a time machine-wide. import Foundation import PackageDescription diff --git a/tools/benchmarks/run.sh b/tools/benchmarks/run.sh index e6909aa..a5b1a54 100755 --- a/tools/benchmarks/run.sh +++ b/tools/benchmarks/run.sh @@ -1,5 +1,5 @@ #!/bin/zsh -# Builds the benchmark package and prints the kit's JSON lines. Run under ../../../tools/memcap.sh, with the machine otherwise +# Builds the benchmark package and prints the kit's JSON lines. Run under a memory cap, with the machine otherwise # quiet (the numbers are this Mac at that moment). DIFFRACTO_BENCH_LARGE=1 for the nightly sizes. set -euo pipefail cd ${0:A:h} diff --git a/tools/kit-0.0.4/q-pins.py b/tools/kit-0.0.4/q-pins.py index c31fb7b..6d421a4 100644 --- a/tools/kit-0.0.4/q-pins.py +++ b/tools/kit-0.0.4/q-pins.py @@ -38,7 +38,7 @@ Exit 0: every self-check holds. 1: one failed (printed). """ # Run under the suite's memory cap (a process cannot cap itself on macOS 27): -# ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/kit-0.0.4/q-pins.py +# ../References/python/orix/bin/python -I -B tools/kit-0.0.4/q-pins.py import json import math import os diff --git a/tools/kit-0.0.4/tetragonal-pins.py b/tools/kit-0.0.4/tetragonal-pins.py index fa18c10..0aa761d 100644 --- a/tools/kit-0.0.4/tetragonal-pins.py +++ b/tools/kit-0.0.4/tetragonal-pins.py @@ -38,7 +38,7 @@ translations not), and the order of the Laue group (2 x the point-group's proper part: the count of {+-R}). """ # Run under the suite's memory cap (a process cannot cap itself on macOS 27): -# ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/kit-0.0.4/tetragonal-pins.py +# ../References/python/orix/bin/python -I -B tools/kit-0.0.4/tetragonal-pins.py import json import math import os diff --git a/tools/mp-import/pins.py b/tools/mp-import/pins.py index 82a430a..ed9fc4f 100644 --- a/tools/mp-import/pins.py +++ b/tools/mp-import/pins.py @@ -1,5 +1,5 @@ """pymatgen standard conventional/primitive cells of committed MP-shaped JSON. -Run with References/python/orix/bin/python -I -B under tools/memcap.sh. +Run with References/python/orix/bin/python -I -B under a memory cap. The input records are copied from pinned app tests, NOT queried from MP in tests. The Al v3 envelope is the app's recorded fetch; Si/Mg are synthetic app test inputs. No expected value is calculated by the Swift port. Symprec 1e-4 A, angle tolerance 5 deg. diff --git a/tools/orix/direction-pins.py b/tools/orix/direction-pins.py index ed50cdc..725059c 100644 --- a/tools/orix/direction-pins.py +++ b/tools/orix/direction-pins.py @@ -1,7 +1,7 @@ """orix pole-folding pins for the eleven Laue classes and both -3m settings (DiffractoKit 0.6.0), the reference for `CrystalOrientationSymmetry.reduceDirection` and `sampleFundamentalZone`. - ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/orix/direction-pins.py + ../References/python/orix/bin/python -I -B tools/orix/direction-pins.py Per class: orix's full Laue group as 3x3 matrices in the kit frame (F g F^T; see ipf-pins.py for F), poles in the kit frame with `Vector3d.in_fundamental_sector` of each (also in the kit frame), and 1500 Fibonacci probe poles for the coverage check. diff --git a/tools/orix/disorientation-pins.py b/tools/orix/disorientation-pins.py index 5e057ca..caf5c5f 100644 --- a/tools/orix/disorientation-pins.py +++ b/tools/orix/disorientation-pins.py @@ -1,6 +1,6 @@ """orix (Mis)orientation reduction pins for the eleven Laue classes (DiffractoKit 0.6.0). - ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/orix/disorientation-pins.py + ../References/python/orix/bin/python -I -B tools/orix/disorientation-pins.py Writes Tests/DiffractoOrientationTests/Fixtures/orix-disorientation-pins.json. Convention: the kit's matrix M (columns = lab axes in crystal coordinates, py4DSTEM) is orix's Orientation matrix directly (orix applies the symmetry on the left: diff --git a/tools/orix/ipf-pins.py b/tools/orix/ipf-pins.py index faa65a1..43bc9f4 100644 --- a/tools/orix/ipf-pins.py +++ b/tools/orix/ipf-pins.py @@ -1,7 +1,7 @@ """orix IPF colour key and fundamental-sector pins for the eleven Laue classes (DiffractoKit 0.6.0). -Run from the kit root with the pinned orix venv (References/python/orix, provision: tools/orix/tools/setup-python-refs.sh): - ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/orix/ipf-pins.py +Run from the kit root with the pinned orix venv (References/python/orix): + ../References/python/orix/bin/python -I -B tools/orix/ipf-pins.py Writes Tests/DiffractoOrientationTests/Fixtures/orix-ipf-pins.json and Sources/DiffractoOrientation/OrixIPFSectors.swift. orix is the oracle (MTEX is MATLAB and is not used). orix works in its own settings (2/m with the twofold on z, -3m with diff --git a/tools/orix/misorientation-pins.py b/tools/orix/misorientation-pins.py index c453062..3df1fa9 100644 --- a/tools/orix/misorientation-pins.py +++ b/tools/orix/misorientation-pins.py @@ -1,6 +1,6 @@ """orix Misorientation / Orientation pins (DiffractoKit 0.10.0, ROADMAP task 35). - ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/orix/misorientation-pins.py + ../References/python/orix/bin/python -I -B tools/orix/misorientation-pins.py Writes Tests/DiffractoOrientationTests/Fixtures/orix-misorientation-pins.json. The oracle is orix 0.15.0: * `Misorientation(M, symmetry=(Gl, Gr))`: `equivalent(grain_exchange)` = Gr * M * Gl, `reduce()` (the smallest rotation angle). diff --git a/tools/presets/pins.py b/tools/presets/pins.py index 6e0daa7..f5b9e89 100644 --- a/tools/presets/pins.py +++ b/tools/presets/pins.py @@ -1,6 +1,6 @@ """pymatgen / spglib pins for the preset crystals (DiffractoKit 0.6.0, CrystalPresetsTests). - ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/presets/pins.py + ../References/python/orix/bin/python -I -B tools/presets/pins.py Every preset is built here independently of the Swift code, from the published lattice constants and Wyckoff positions with `Structure.from_spacegroup` (so the sites are spglib/pymatgen's own orbit expansion, not a copy of the hand lists): diff --git a/tools/slice-1b/pins.py b/tools/slice-1b/pins.py index 0f65aee..c46fe5a 100644 --- a/tools/slice-1b/pins.py +++ b/tools/slice-1b/pins.py @@ -3,7 +3,7 @@ Run, from any directory, with the pinned oracle, UNDER THE SUITE MEMORY WATCHDOG (owner, 2026-10-15 12:30: setrlimit and `ulimit -v` fail on macOS 27, so the cap is the watchdog's, 8 GB, exit 137; one such worker at a time): - /tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/slice-1b/pins.py + ../References/python/orix/bin/python -I -B tools/slice-1b/pins.py It writes Tests/DiffractoCoreTests/Fixtures/slice-1b-pins.json BEFORE any Swift for the reduction exists. diff --git a/tools/slice-4/README.md b/tools/slice-4/README.md index 016ccae..7543d32 100644 --- a/tools/slice-4/README.md +++ b/tools/slice-4/README.md @@ -5,14 +5,14 @@ tests read the file these write. A difference is a failure of the port, never a named under "Measured floors and open points"). ``` -../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/slice-4/pins.py # about 3 s, peak about 330 MB, deterministic +../References/python/orix/bin/python -I -B tools/slice-4/pins.py # about 3 s, peak about 330 MB, deterministic ``` - `pins.py` runs on the pymatgen venv (Python 3.14.7, NumPy 2.5.4, SciPy 1.18.1, pymatgen 2026.9.24) and starts `pins-py4dstem.py` as a subprocess with `../References/python/py4dstem/bin/python -I -B` (Python 3.12.4, NumPy 2.5.0, SciPy 1.18.0, py4DSTEM 0.14.19 = f050d207; read-only, nothing installed into it). The helper checks that the installed py4DSTEM files (`crystal.py`, `single_atom_scatter.py`, `utils.py`, the scattering table) are byte equal to the source tree at the - lock and that the table's sha256 is the lock (`be845d1d...`). One `memcap.sh` covers both (the helper is a child). SciPy 1.18.1 + lock and that the table's sha256 is the lock (`be845d1d...`). One memory cap covers both (the helper is a child). SciPy 1.18.1 exists only in the pymatgen venv, so the Euler pins are there. - Output: `Tests/DiffractoOrientationTests/Fixtures/slice-4-pins.json` (about 1.9 MB, sorted keys, two runs give the same bytes). - Exit status: 0 all self-checks and predictions hold; 1 a self-check failed (assert); 3 the file was written but a registered or diff --git a/tools/slice-4/pins-py4dstem.py b/tools/slice-4/pins-py4dstem.py index 49485f7..fc1b05b 100644 --- a/tools/slice-4/pins-py4dstem.py +++ b/tools/slice-4/pins-py4dstem.py @@ -1,7 +1,7 @@ """DiffractoKit slice 4: the py4DSTEM half of the pin generator (registration docs/registration-slice-4.md, sections 4, 5, 6). Not run by hand: tools/slice-4/pins.py starts it with the py4DSTEM venv's interpreter, sends the phases as JSON on stdin and -reads the JSON on stdout. Run through pins.py the whole chain sits under ONE tools/memcap.sh. +reads the JSON on stdout. Run through pins.py the whole chain sits under ONE memory cap. References/python/py4dstem/bin/python -I -B tools/slice-4/pins-py4dstem.py < request.json > answer.json diff --git a/tools/slice-4/pins.py b/tools/slice-4/pins.py index 74b98ea..6bed99f 100644 --- a/tools/slice-4/pins.py +++ b/tools/slice-4/pins.py @@ -2,7 +2,7 @@ Run, from any directory, under the memory cap, with the pymatgen venv (Python 3.14, NumPy 2.5.4, SciPy 1.18.1): - tools/memcap.sh -- References/python/orix/bin/python -I -B DiffractoKit/tools/slice-4/pins.py + References/python/orix/bin/python -I -B DiffractoKit/tools/slice-4/pins.py It writes Tests/DiffractoOrientationTests/Fixtures/slice-4-pins.json BEFORE any Swift of slice 4 is trusted. Deterministic: no clock, seeded random numbers (np.random.default_rng), sorted keys, so two runs give the same bytes. @@ -851,7 +851,7 @@ def main(): "header": { "purpose": "slice 4 (vector matching and phase mapping, DiffractoOrientation 0.3.0): oracle pins, registration docs/registration-slice-4.md section 6", "generator": "tools/slice-4/pins.py + tools/slice-4/pins-py4dstem.py", - "commands": ["tools/memcap.sh -- References/python/orix/bin/python -I -B DiffractoKit/tools/slice-4/pins.py", + "commands": ["References/python/orix/bin/python -I -B DiffractoKit/tools/slice-4/pins.py", "(started by pins.py) References/python/py4dstem/bin/python -I -B DiffractoKit/tools/slice-4/pins-py4dstem.py < request.json"], "versions": {"pins.py": {"python": sys.version, "numpy": np.__version__, "scipy": scipy.__version__, "pymatgen": dist_version("pymatgen"), "pymatgen_core": dist_version("pymatgen-core")}, diff --git a/tools/symmetry/family-pins.py b/tools/symmetry/family-pins.py index 66e2f80..9ac2e24 100644 --- a/tools/symmetry/family-pins.py +++ b/tools/symmetry/family-pins.py @@ -1,6 +1,6 @@ """py4DSTEM `symmetry_reduce_directions` pins (DiffractoKit 0.6.0): the three direction families of an orientation matrix. - ../tools/memcap.sh -- ../References/python/py4dstem/bin/python -I -B tools/symmetry/family-pins.py + ../References/python/py4dstem/bin/python -I -B tools/symmetry/family-pins.py Needs symmetry-pins.json (tools/symmetry/pins.py) for the proper operators (kit frame, sorted by their fractional matrices) and the plan sector `range` of each class. Uses the same harness as pins-py4dstem.py: py4DSTEM's own diff --git a/tools/symmetry/family-real-pins.py b/tools/symmetry/family-real-pins.py index 5020b6d..4e53910 100644 --- a/tools/symmetry/family-real-pins.py +++ b/tools/symmetry/family-real-pins.py @@ -2,7 +2,7 @@ pymatgen's (`SpacegroupAnalyzer(structure).get_point_group_operations()`, duplicates removed), not the sorted list of the harness in family-pins.py, and where several operators put a direction inside the plan sector the first in the list wins. - ../tools/memcap.sh -- ../References/python/py4dstem/bin/python -I -B tools/symmetry/family-real-pins.py + ../References/python/py4dstem/bin/python -I -B tools/symmetry/family-real-pins.py For each Laue class, representative space groups (centrosymmetric, a generic atom expanded with pymatgen's `Structure.from_spacegroup`; hexagonal cells for the trigonal groups, R-3m and R-3c in hexagonal axes) build a real py4DSTEM diff --git a/tools/symmetry/pins.py b/tools/symmetry/pins.py index 0cc2e05..dc99407 100644 --- a/tools/symmetry/pins.py +++ b/tools/symmetry/pins.py @@ -1,7 +1,7 @@ -"""Generate symmetry fixtures using the pinned pymatgen environment, under suite tools/memcap.sh. +"""Generate symmetry fixtures using the pinned pymatgen environment, under a memory cap. From this worktree: - ../../tools/memcap.sh -- ../../References/python/orix/bin/python -I -B tools/symmetry/pins.py + ../../References/python/orix/bin/python -I -B tools/symmetry/pins.py MACEM_SUITE_ROOT overrides suite discovery for another checkout. No oracle files are written. Calls the separate pinned py4DSTEM interpreter, and compiles read-only git-show app source for native keys/samples. diff --git a/tools/symmetry/trigonal-pins.py b/tools/symmetry/trigonal-pins.py index 211e9d2..6610a3b 100644 --- a/tools/symmetry/trigonal-pins.py +++ b/tools/symmetry/trigonal-pins.py @@ -1,7 +1,7 @@ """Pins for the two -3m settings (DiffractoKit 0.6.0): the point-group operations pymatgen/spglib give for real trigonal structures, in the order they give them, in hexagonal fractional coordinates and in the kit's Cartesian frame. - ../tools/memcap.sh -- ../References/python/orix/bin/python -I -B tools/symmetry/trigonal-pins.py + ../References/python/orix/bin/python -I -B tools/symmetry/trigonal-pins.py For space groups 162, 163 (-31m type) and 164, 165, 166, 167 (-3m1 type, 166 and 167 in hexagonal axes) a generic-position atom is expanded with `Structure.from_spacegroup`, the lattice is hexagonal (a 3.1, c 4.3), `SpacegroupAnalyzer.get_point_group_operations()`