Repository navigation
feat: LineScan matched to a probe: end=None and Nyquist sampling defaults - #40
Merged
Merged
Conversation
…ults LineScan.init(start:end:gpts:sampling:endpoint:matching:) ports abTEM 1.0.10 LineScan(end=None) followed by match_probe: a missing end is (0, extent of the probe grid along the second axis); without a sampling or count, the sampling is 0.99 x the Nyquist sampling of the aperture, and the count follows. A given sampling wins, a count with an end is kept. LineScan.nyquistSampling(semiangleCutoff:wavelength:) is abTEM nyquist_sampling in the same evaluation order. Refused where abTEM is silent or crashes: a count with no end and no sampling (abTEM silently replaces it by the probe-matched count), and a probe-matched sampling of an aperture with no cutoff (abTEM raises an OverflowError). Pinned against abTEM 1.0.10 by tools/pins/linescan-defaults/pins.py: end points and counts exact, sampling at rtol 1e-7 (assert_allclose defaults; abTEM states no tolerance). Reviewed before the commit: no must-fix; doc nits applied. Done: LineScan probe-matched defaults. Next: Images.interpolate in SimulatoCore, then integrate_disc(interpolate:) (#9). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 31, 2026
Paullo9
added a commit
that referenced
this pull request
Oct 31, 2026
…he mixed-radix FFT (#44) parity.md: Images.interpolate gets its own row, partial (method fft, both normalizations, pinned at rtol 1e-7 by tools/pins/image-interpolate); DiffractionPatterns.interpolate stays missing. integrate_disc names interpolate:. The Grid row says lengths off vDSP that factor into 2, 3, 5 and 7 run the mixed-radix FFT (#42). Totals recounted from the table: 129 rows, 38 present, 40 partial, 51 missing; the study split was stale (now 12, 7, 8). open-items.md: the FFT item names what is left after #42 (a prime factor above 7, 506 squared); the #9 item drops integrate_disc(interpolate:) and adds the spline method. tools/README.md: the image-interpolate generator row. The azimuthal_average (#39) and LineScan defaults (#40) rows wait for those PRs to merge. Done: rows for #41 and #42. Next: rows for #39 and #40 when they merge. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Paul · project thread
Part of #9
A line scan matched to a probe, abTEM 1.0.10
LineScan(end=None)followed bymatch_probe(which abTEMscanruns; the kit asks the caller to build the scan with the probe):LineScan.init(start:end:gpts:sampling:endpoint:matching:): a missingendis (0, the probe gridextentY); without a sampling or a count, the sampling is 0.99 x the Nyquist sampling of the aperture and the count follows from it. A givensamplingwins, as in the plain initialiser; agptswith anendkeeps its count.LineScan.nyquistSampling(semiangleCutoff:wavelength:): abTEMnyquist_sampling, 1 / (4 alpha_c / lambda x 1e-3), in the same evaluation order.gptswith noendand nosampling(abTEM silently replaces the count by the probe-matched one), a probe-matched sampling of an aperture with no cutoff (abTEM raises an OverflowError). Fractional coordinates are not offered on this initialiser (the plain one has them).Additive API, so
feat:.Numbers:
Tests/SimulatoProbeTests/LineScanDefaultsTests.swiftholds abTEM 1.0.10 output printed by the newtools/pins/linescan-defaults/pins.pyfor a 20 mrad probe at 200 keV and a 30 mrad probe at 80 keV on a 12.3 x 9.7 A grid, 7 cases each: end points and counts exact, sampling at rtol 1e-7 (theassert_allclosedefaults; abTEM states no tolerance).Not in this PR: the
docs/parity.mdLineScan row (still says theend=Noneandmatch_probedefaults are not offered) is left out because two open PRs already touch that file;docs/open-items.mdis left for the same reason as #39 edits the same line. Both follow once those merge.Test evidence: the new suite (3 tests) fails to compile on
main(the API is new) and passes here; the gateswift test -c release --skip SimulatoKitParityTestsis green locally. Reviewed by a separate reviewer pass before the commit: no must-fix, agreed with the refusal of a count without an end, extra combinations checked against abTEM; doc nits applied.Remaining in #9:
integrate_disc(interpolate:)(needsImages.interpolatein SimulatoCore), line profiles for segmented and pixelated line scans, tilt distributions.🤖 Generated with Claude Code