probe from numpy array will not be rescaled to photon count#596
Open
probe from numpy array will not be rescaled to photon count#596
Conversation
Patch release 0.7.1
Release 0.8
Patch release 0.8.1
Patch Release 0.8.2
Bump version to 0.8.2 (#575)
Contributor
Author
Contributor
Author
|
python 3.8 tests fail when installing dependencies... not in the changed bits of the code |
Contributor
Tests should work if you create the PR against dev. Should also male sure your branch is rebased against dev. |
* Drop Python <= 3.8 support * Add py 3.13 in CI tests * Use conda-incubator to set up conda env * Ensure correct activation throughout the tests * Migrate to importlib in script2rst * Migrate to importlib in resources * Migrate to packaging.version
* Include accelerate base tests by default * Change expected output in FFT filter tests to reflect support for single precision in Numpy > 2.0 * Adjust tolerance in pycuda fft filter tests
Contributor
|
Make a change to the parameter logic
|
pierrethibault
approved these changes
Feb 20, 2026
Member
pierrethibault
left a comment
There was a problem hiding this comment.
Approved. This does not break anything and gives a more natural meaning for None.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


When a probe was initalized from a numpy array, the _process(ing) applied to that loaded wavefront always scaled it to the number of photons estimated from the loaded diffraction patterns. This happened even when illumiantion.photons was specifically set to None:
p.scans.scan00.illumination.photons = NoneA similar bug was fixed when loading probes from previous reconstruction (.ptyr) files by specifically setting p.photons to None again. The same "fix" can be used here as well.
The loaded numpy array now remains unchanged.
But now it is also impossible to scale a loaded np.array if the users specifically wishes for it.