Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
26f2ff7
refactor: split drift implementation into a package
bobleesj Aug 25, 2026
9179261
refactor: separate drift package responsibilities
bobleesj Aug 25, 2026
27c6a80
refactor: relocate drift numerical helpers
bobleesj Aug 25, 2026
a2ed768
Merge pull request #14 from bobleesj/aug-24-drift-package-split
bobleesj Aug 25, 2026
ef0cd61
feat: add regional diagnostics for affine drift correction (#15)
bobleesj Aug 25, 2026
3bd3aac
Correct spectrum-image drift without mixing spectral channels (#17)
bobleesj Aug 25, 2026
0f16b6a
Correct 4D-STEM scan axes without altering detector pixels (#18)
bobleesj Aug 25, 2026
86fd088
Accelerate affine drift search without changing calibration (#20)
bobleesj Aug 25, 2026
9b2ac08
Reproduce multidimensional manuscript workflows with automatic correc…
bobleesj Aug 25, 2026
1dc7dc2
refactor: simplify DriftCorrection public API (#22)
bobleesj Aug 25, 2026
af7160e
refactor: rename drift preparation module (#23)
bobleesj Aug 25, 2026
02ed1fb
feat: expose sparse XEDS window extraction
bobleesj Aug 26, 2026
9852022
feat: center-out scanline drift correction and A-site bond statistics…
wwmills Sep 20, 2026
00f81ce
feat: support ans-backed 4dstem inputs in drift correction
bobleesj Sep 22, 2026
d073e11
refactor: delegate drift data reads to quantem.gpu
bobleesj Sep 22, 2026
749e5cb
refactor: move ans resampling into quantem.gpu
bobleesj Sep 22, 2026
5d66ec6
Return native probe positions in angstroms from drift correction
bobleesj Nov 16, 2026
e36a7ef
Show paired probe displacements and support current encoded scans and…
bobleesj Nov 21, 2026
75693af
Evaluate subpixel drift correlation at the actual fractional lags
bobleesj Nov 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies = [
"colorspacious",
"dill",
"numpy>2",
"pandas>=2.2",
"matplotlib",
"scipy",
"tqdm",
Expand Down
2 changes: 1 addition & 1 deletion src/quantem/core/ml/models/kplanes.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def param_keys(self) -> list[str]:
def extract_tau_state(self) -> torch.Tensor:
"""
Returns the current raw R^9 matrices (detached copy) so they can be
used to initialise a phase-2 model via `load_tau_state`.
used to initialize a phase-2 model via `load_tau_state`.

Returns
-------
Expand Down
6 changes: 3 additions & 3 deletions src/quantem/core/ml/models/so3params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

class SO3ParamQuat(nn.Module):
"""
Stores T unit quaternions as learnable parameters in R^4 and normalises
Stores T unit quaternions as learnable parameters in R^4 and normalizes
them on every call to `as_matrix()`.

Quaternion convention: [x, y, z, w] (scalar-last, same as scipy).

Initialisation
Initialization
--------------
"random" – uniform sampling over SO(3) via Shoemake's method.
"identity" – all rotations start as the identity (good for fine-tuning).
Expand Down Expand Up @@ -105,7 +105,7 @@ def extra_repr(self) -> str:
return f"T={self.quats.shape[0]}"

# ------------------------------------------------------------------
# Initialisers
# Initializers
# ------------------------------------------------------------------

@staticmethod
Expand Down
8 changes: 4 additions & 4 deletions src/quantem/core/ml/optimizer_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Adam:
eps : float
Term added to the denominator for numerical stability. Default: 1e-8.
weight_decay : float
L2 regularisation penalty. Default: 0.
L2 regularization penalty. Default: 0.
"""

lr: float = 1e-3
Expand Down Expand Up @@ -97,7 +97,7 @@ class AdamW:
eps : float
Term added to the denominator for numerical stability. Default: 1e-8.
weight_decay : float
Decoupled L2 regularisation penalty. Default: 0.
Decoupled L2 regularization penalty. Default: 0.
"""

lr: float = 1e-3
Expand Down Expand Up @@ -138,7 +138,7 @@ class SGD:
dampening : float
Dampening for momentum. Default: 0.
weight_decay : float
L2 regularisation penalty. Default: 0.
L2 regularization penalty. Default: 0.
nesterov : bool
Enables Nesterov momentum. Default: False.
"""
Expand Down Expand Up @@ -266,7 +266,7 @@ class Plateau:
Parameters
----------
mode : {'min', 'max'}
Whether the monitored metric should be minimised or maximised. Default: 'min'.
Whether the monitored metric should be minimized or maximized. Default: 'min'.
min_lr_factor : float
Sets ``min_lr = min_lr_factor * base_lr`` when ``min_lr`` is not provided.
Default: 1/20.
Expand Down
4 changes: 2 additions & 2 deletions src/quantem/core/visualization/show_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Norm:
vmax : float or None
Explicit maximum for ``"manual"`` interval.
vcenter : float
Centre value for ``"centered"`` interval. Default 0.0.
Center value for ``"centered"`` interval. Default 0.0.
half_range : float or None
Symmetric half-range for ``"centered"`` interval.
power : float
Expand Down Expand Up @@ -241,7 +241,7 @@ class Scalebar:
pad_px : float
Padding between bar and plot edge in image pixels. Default 0.5.
color : str
Bar and label colour. Default ``"white"``.
Bar and label color. Default ``"white"``.
loc : ``"lower right"`` | ``"lower left"`` | ``"upper right"`` | ``"upper left"``
Anchor location. Default ``"lower right"``.
fontsize : int
Expand Down
14 changes: 13 additions & 1 deletion src/quantem/imaging/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
from quantem.imaging.drift import DriftCorrection as DriftCorrection
"""Imaging tools for scientific image analysis."""

from quantem.imaging.drift import (
CorrectionResult as CorrectionResult,
DriftCorrection as DriftCorrection,
StripPass as StripPass,
pair_spectrum_image_references as pair_spectrum_image_references,
)
from quantem.imaging.drift.io import (
read_emd as read_emd,
read_emd_eds as read_emd_eds,
read_emd_metadata as read_emd_metadata,
)
from quantem.imaging.lattice import Lattice as Lattice
from quantem.imaging.lattice_visualization import PLOT_REGISTRY as PLOT_REGISTRY
Loading