Releases: AdvancedPhotonSource/pty-chi
Releases · AdvancedPhotonSource/pty-chi
v1.3.0
Changes Since v1.2.0
Summary
- Major additions: multi-process support (esp. LSQML), new constraints (object hard limits, probe support mask), probe power constraint behavior,
diffraction blur, large-tensor offload. - Several fixes in multiprocessing/LSQML and performance/memory improvements.
- Docs/build/test updates and movie tooling improvements.
Change List (by theme)
Features
- Multi-process LSQML reconstruction and supporting infrastructure.
- Hard limits constraint on object magnitude/phase.
- Probe support constraint with geometric mask (ellipse/rectangle).
- Diffraction pattern blur option in forward model.
- Large tensor CPU offload/reload helper on Task.
- Position affine update flexibility override.
- Auto-rescaling of DIP outputs, and half precision support.
Fixes
- Multiple multi-GPU/multiprocess sync issues in LSQML and reconstruction hooks.
- Correct device assignment for phase unwrap in multiprocessing.
- Correct FFT normalization in probe power constraint.
- Fix handling of
remove_grid_artifactsdirection. - Fix multiscan tester circular data handoff.
- Logging/tqdm edge fixes.
Performance/Memory
- Uniform batch sampler builds/syncs indices on GPU and rank 0 only.
- Chunk processing uses
expandoverrepeat. - Replicate tensors on-the-fly to reduce memory.
- DDP instead of DataParallel for AD model.
Docs/Build/Test
- Added multiprocess docs and task docs, updated index/citations.
- Added pytest,
uv.lock, python pin; adjusted matplotlib dependency for docs build. - New tests for multiprocess LSQML, object hard limits, probe support, blur, offload.
Movies/IO
- Movie functionality extended to record probe positions and settings cleanup.
- I/O additions and documentation.
API Changes
Dtypesenum now includesFLOAT16.- File:
src/ptychi/api/enums.py
- File:
- New enums:
MagPhaseComponents,ProbeSupportMethods.- File:
src/ptychi/api/enums.py
- File:
- New object constraint option:
ObjectHardLimitsMagnitudePhaseandObjectOptions.hard_limits_magnitude_phase.- File:
src/ptychi/api/options/base.py
- File:
RemoveGridArtifactsOptionsaddscomponent(magnitude/phase/both).- File:
src/ptychi/api/options/base.py
- File:
ProbePowerConstraintOptionsaddsscale_objectand clarifies behavior (probe power based on probe itself).- File:
src/ptychi/api/options/base.py
- File:
ProbeSupportConstraintOptionsadds fixed support mask options and params.- File:
src/ptychi/api/options/base.py
- File:
PositionAffineTransformConstraintOptionsaddsoverride_update_flexibilitywith validation.- File:
src/ptychi/api/options/base.py
- File:
- LBFGS optimizer is now explicitly restricted to Autodiff reconstructors (raises
ValueErrorin multiple option classes).- File:
src/ptychi/api/options/base.py
- File:
ForwardModelOptionsaddsdiffraction_pattern_blur_sigma.- File:
src/ptychi/api/options/base.py
- File:
Tasknow mixes in multiprocessing and changes behavior in multi-process mode:
- Device init uses process group, rank-based device selection.
-run()now hasreset_timer_globalsarg.
-get_data()triggers DIPgenerate()for object/probe.
- Newset_large_tensor_device()helper.
- Multi-process selects reconstructor viaget_multiprocess_reconstructor_by_enum.
- Files:src/ptychi/api/task.py,src/ptychi/maps.py,src/ptychi/parallel.py- New public class export:
MultiprocessLSQMLReconstructor.
- File:src/ptychi/reconstructors/__init__.py - New type alias
Numericin API types.
- File:src/ptychi/api/types.py
v1.2.0
What's changed
New features
- Allowing using total intensity for probe centering constraint
- PIE now supports multislice
- Added device module and symbol wrapper to support Intel GPUs
API changes
- Users can now export/import settings from/to
Optionsobjects as JSON OptimizationPlanis now a subclass of Options and is moved toapi.options.base- Removed depreciated Options classes
OPRModeWeightsSmoothingOptions.methodnow has a default value
v1.1.0
What's changed
Bug fixes
- Fixed affine transformation matrix fitting.
- Corrected sign in
get_max_batch_size. - Fixed an in-place update in propagators which caused an issue in AD backpropagation.
- Fixed AD's device transfer bug when using multiple GPUs with DataParallel.
Algorithm changes
- Probe update magnitude limit is further clipped by mean absolute deviation of update.
UI changes
- Default setting of image differentiation method for probe position correction was changed to
FOURIER_DIFFERENTIATION; step size default was changed to 0.3; update magnitude limit default was changed to 0.1. - Spelling of
ASYMMETRYin affine transformation constraint's degrees of freedom was corrected. - Added LSQML preconditioning damping factor to API.
Build-related changes
- Added requirements.txt generated by uv.
- Use uv for environment management in CI.
Experimental features
- Synthetic sparse dictionary learning for probe optimization (#33)
v1.0.0
What's Changed
New fetures
- Save movies of arrays by @hruth in #31
- Deep image prior (experimental) by @mdw771 in #32
- Adding the Bilinear Hessian method for reconstruction by @nikitinvv in #27
- Non-square pixel size support
- Slice spacing optimization (AD only)
- Affine transformation constraint on probe positions
- Allow choosing the slice for probe position correction
Bug fixes
- Allow choosing alternative ways of defining object-frame pixel coordinates of position origin
- Fixed performance issue in uniform batching
- Fixed performance issue in automatic differentiation
Full Changelog: v0.1.0...v1.0.0
v0.1.0
What's changed
- The reconstruction quality of LSQML is significantly improved on data with low overlap and large illumination variation.
- New difference map reconstructor.
- Reconstruction speed is now 2--3x faster; further speedup can be obtained by setting
reconstruction_options.use_double_precision_for_ffttoFalse(less tested; use with caution). - New profiling utility.
- Added new constraint routines including
remove_object_probe_ambiguityandopr_weight_smoothing, and improvedmultislice_regularization. - Added documentation.
- Allow switching between faster yet non-deterministic and slower yet deterministic algorithms.
v0.0.1-alpha
Features
Reconstruction engines
- LSQML
- PIE (including ePIE and rPIE)
- Difference map
- Automatic differentiation
Major correction features
- Probe position correction: gradient-based and cross correlation-based
- Multislice (only in LSQML and AD)
- Orthogonal probe relaxation (only in LSQML and AD)
- Mixed-state probe
- Compact batching
Other features
- Multi-GPU (only in AD)