Change the behavior of FancyPtycho.center_probes to always center the probe in real space #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've found myself using
FancyPtycho.center_probes()quite a lot recently. The point is to take an in-progress probe reconstruction, which might appear near the edge or corner of the field of view in real space, and move it to the center of the field of view. This is often needed so the tails of the beam can be well reconstructed.I think the behavior of this function should be to always do the centering in real space, because this is a very common step that's needed in reconstructions. Centering in Fourier space is rarely needed, and it's always easy to forget if the behavior of this function changes when you switch to using fourier_probe=True
I also added some test coverage and updated the docs