AdvancedPhotonSource / tike

Repository for ptychography software
http://tike.readthedocs.io
Other
29 stars 15 forks source link

NEW: Orthogonal probe tools using hermite basis #222

Closed carterbox closed 2 years ago

carterbox commented 2 years ago

Purpose

Adjust probe orthogonalization method and add new probe initialization method

Approach

Used unit tests to make probe orthogonality closer to ptychoshelves implementation. It seems to be identical on CPU, but on the GPU, the phase of the principal components is randomly off by PI. This basically means the principal components are equally valid but opposite direction, and there's probably nothing I can do about it.

There are multiple probe initialization methods including the random one that already is implemented, but this hermite-like basis initialization method is the default in Yi's script. It basically takes a primary probe then multiplies by the hermite basis functions (in order of 2D coordinates of the parameters used to generate the basis functions).

There is no tests for adjust_probe_power(), it's a very simple function, but I'm open to test ideas.

Pre-Merge Checklists

Submitter

Reviewer