AdvancedPhotonSource / tike

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

API: Move finite support probe constraints to probe constraints section #326

Closed carterbox closed 3 months ago

carterbox commented 3 months ago

Purpose

Organize the code and make algorithm implementation less complicated by moving the probe constraints all to one section.

Approach

Convert the additional probe penalty and finite support probe constraints to the probe constraint section, and implement them as soft constraints.

Adjust the constrain center peak function to only take single pixel steps. This prevents large and sudden movements of the probe function in order to keep it centered. The method for determining the center is now also center of mass instead of finding the brightest spot.

Pre-Merge Checklists

Submitter

Reviewer

pep8speaks commented 3 months ago

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

Line 180:1: E302 expected 2 blank lines, found 1 Line 184:8: E231 missing whitespace after ',' Line 184:10: E231 missing whitespace after ','