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
[x] Write a helpfully descriptive pull request title.
[x] Organize changes into logically grouped commits with descriptive commit messages.
[x] Document all new functions.
[x] Click 'details' on the readthedocs check to view the updated docs.
[x] Write tests for new functions or explain why they are not needed.
[x] Address any complaints from pep8speaks.
Reviewer
[x] Actually read all of the code.
[x] Run the new code yourself; the included tests should make this easy.
[x] Write a summary of the changes as you understand them.
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