AdvancedPhotonSource / tike

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

NEW: Add some probe initialization and orthogonalization tools #43

Closed carterbox closed 4 years ago

carterbox commented 4 years ago

Purpose

Provide some Python probe initialization and orthogonalization routines that the Swiss are using in their MATLAB code.

Pre-Merge Checklists

Submitter

Reviewer

pep8speaks commented 4 years ago

Hello @carterbox! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2020-04-15 17:42:10 UTC
nikitinvv commented 4 years ago
# Perhaps this should be an inner product
# which means one of the vectors should be conjugated?
A[i, j] = np.sum(x[i] * x[j])
A[j, i] = A[i, j]

yes, one should be conjugate

nikitinvv commented 4 years ago
for order in np.argsort(-values):
    x_sorted[order] = x_new[order]

indices are wrong

carterbox commented 4 years ago

Thanks, @nikitinvv! 🎉