AdvancedPhotonSource / tike

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

NEW: Allow enabling limits for probe position update magnitude #293

Closed mdw771 closed 10 months ago

mdw771 commented 10 months ago

Purpose

Implement a guardrail for probe position updates. When the magnitude of x/y update is larger than a user-specified value, clip the update to that value.

Approach

  1. Added update_magnitude_limit in PositionOptions.
  2. In rpie._update_position, clip values step if their magnitude is larger than position_options.update_magnitude_limit.
pep8speaks commented 10 months ago

Hello @mdw771! 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 2023-12-11 18:49:28 UTC
carterbox commented 10 months ago

Thanks, @mdw771!