Skip to content

Releases: AdvancedPhotonSource/pty-chi

v1.3.0

08 Feb 22:11
77072d9

Choose a tag to compare

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

  1. Multi-process LSQML reconstruction and supporting infrastructure.
  2. Hard limits constraint on object magnitude/phase.
  3. Probe support constraint with geometric mask (ellipse/rectangle).
  4. Diffraction pattern blur option in forward model.
  5. Large tensor CPU offload/reload helper on Task.
  6. Position affine update flexibility override.
  7. Auto-rescaling of DIP outputs, and half precision support.

Fixes

  1. Multiple multi-GPU/multiprocess sync issues in LSQML and reconstruction hooks.
  2. Correct device assignment for phase unwrap in multiprocessing.
  3. Correct FFT normalization in probe power constraint.
  4. Fix handling of remove_grid_artifacts direction.
  5. Fix multiscan tester circular data handoff.
  6. Logging/tqdm edge fixes.

Performance/Memory

  1. Uniform batch sampler builds/syncs indices on GPU and rank 0 only.
  2. Chunk processing uses expand over repeat.
  3. Replicate tensors on-the-fly to reduce memory.
  4. DDP instead of DataParallel for AD model.

Docs/Build/Test

  1. Added multiprocess docs and task docs, updated index/citations.
  2. Added pytest, uv.lock, python pin; adjusted matplotlib dependency for docs build.
  3. New tests for multiprocess LSQML, object hard limits, probe support, blur, offload.

Movies/IO

  1. Movie functionality extended to record probe positions and settings cleanup.
  2. I/O additions and documentation.

API Changes

  1. Dtypes enum now includes FLOAT16.
    • File: src/ptychi/api/enums.py
  2. New enums: MagPhaseComponents, ProbeSupportMethods.
    • File: src/ptychi/api/enums.py
  3. New object constraint option: ObjectHardLimitsMagnitudePhase and ObjectOptions.hard_limits_magnitude_phase.
    • File: src/ptychi/api/options/base.py
  4. RemoveGridArtifactsOptions adds component (magnitude/phase/both).
    • File: src/ptychi/api/options/base.py
  5. ProbePowerConstraintOptions adds scale_object and clarifies behavior (probe power based on probe itself).
    • File: src/ptychi/api/options/base.py
  6. ProbeSupportConstraintOptions adds fixed support mask options and params.
    • File: src/ptychi/api/options/base.py
  7. PositionAffineTransformConstraintOptions adds override_update_flexibility with validation.
    • File: src/ptychi/api/options/base.py
  8. LBFGS optimizer is now explicitly restricted to Autodiff reconstructors (raises ValueError in multiple option classes).
    • File: src/ptychi/api/options/base.py
  9. ForwardModelOptions adds diffraction_pattern_blur_sigma.
    • File: src/ptychi/api/options/base.py
  10. Task now mixes in multiprocessing and changes behavior in multi-process mode:
    - Device init uses process group, rank-based device selection.
    - run() now has reset_timer_globals arg.
    - get_data() triggers DIP generate() for object/probe.
    - New set_large_tensor_device() helper.
    - Multi-process selects reconstructor via get_multiprocess_reconstructor_by_enum.
    - Files: src/ptychi/api/task.py, src/ptychi/maps.py, src/ptychi/parallel.py
  11. New public class export: MultiprocessLSQMLReconstructor.
    - File: src/ptychi/reconstructors/__init__.py
  12. New type alias Numeric in API types.
    - File: src/ptychi/api/types.py

v1.2.0

18 Jul 16:20

Choose a tag to compare

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 Options objects as JSON
  • OptimizationPlan is now a subclass of Options and is moved to api.options.base
  • Removed depreciated Options classes
  • OPRModeWeightsSmoothingOptions.method now has a default value

v1.1.0

30 May 16:52

Choose a tag to compare

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 ASYMMETRY in 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

22 Apr 15:50
7d2c658

Choose a tag to compare

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

13 Feb 21:49

Choose a tag to compare

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_fft to False (less tested; use with caution).
  • New profiling utility.
  • Added new constraint routines including remove_object_probe_ambiguity and opr_weight_smoothing, and improved multislice_regularization.
  • Added documentation.
  • Allow switching between faster yet non-deterministic and slower yet deterministic algorithms.

v0.0.1-alpha

10 Dec 15:32

Choose a tag to compare

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)