Fixing parse warning messages - #745
Merged
Merged
Conversation
pyparsing >= 3.3 introduced PyparsingDeprecationWarning, which inherits UserWarning and is therefore displayed by default. Any dependency that still calls the camelCase compatibility API (e.g. older matplotlib mathtext: parseString / parseAll / resetCache) now emits a warning per rendered label, flooding plot output with repeated "'parseString' deprecated - use 'parse_string'" messages. Filter that warning category at import time; guarded so older pyparsing without the class is unaffected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
match_orientations now correlates patterns in batches (default batch_size=100) instead of one at a time. The first-match orientation correlograms for a whole batch are computed with a single BLAS/cuBLAS matrix product over the shell dimension followed by one inverse FFT along gamma, which is mathematically identical to the per-pattern computation by linearity of the FFT. Each pattern is then passed to match_single_pattern with its precomputed correlograms, so orientation selection, in-plane refinement, ACOM refinement mode, inversion symmetry, and multiple matches all reuse the existing code path unchanged. - New helpers _calc_polar_image (polar transform extracted verbatim from match_single_pattern; two long-commented historical kernel variants were dropped in the move) and _calc_correlogram_batch (batched correlograms, zone-axis chunked to a memory budget, sieve-only zones in refinement mode, CuPy when CUDA=True). - match_single_pattern accepts a private _precomputed argument used only for the first match; matches beyond the first recompute as before. - New match_orientations arguments: batch_size (None or 1 restores the original per-pattern loop) and batch_max_memory_GB (default 2.0); the batch is clamped automatically for fine orientation plans. Verified batched and per-pattern paths give identical orientation maps (inds, mirror, corr, angles, matrices) on synthetic data for standard plans, refinement plans, num_matches_return=2 with min_angle_between_matches_deg, inversion_symmetry=False, and tiny memory budgets. Where the correlation maximum is exactly degenerate (zone axis on a crystal mirror plane), tie-breaking can differ, but the resulting orientations are identical modulo crystal symmetry. CPU speedup ~3x on a 1596-zone plan; larger gains expected on GPU. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
smribet
approved these changes
Aug 1, 2026
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.
No description provided.