Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Add leading dimension to object for multi-slice #314

Merged
merged 14 commits into from
Jun 3, 2024

Conversation

carterbox
Copy link
Contributor

Purpose

Adds a leading dimension to the reconstructed object in preparation for multi-slice objects.

Approach

  • Refactor the Pytcho Operator and related Operators to accept a 3-dimensional psi array, where the first dimension is a placeholder singleton dimension for future multi-slice operations.
  • Remove unused adjoint methods which will make implementing multi-slice more difficult
  • Add a ZeroPropagation Operator as a placeholder for the between-slice Operator.
  • Add a SingleSlice Operator as a placeholder for a MultiSlice Operator.

Pre-Merge Checklists

Submitter

  • Write a helpfully descriptive pull request title.
  • Organize changes into logically grouped commits with descriptive commit messages.
  • Document all new functions.
  • Click 'details' on the readthedocs check to view the updated docs.
  • Write tests for new functions or explain why they are not needed.
  • Address any complaints from pep8speaks.

Reviewer

  • Actually read all of the code.
  • Run the new code yourself; the included tests should make this easy.
  • Write a summary of the changes as you understand them.
  • Thank the submitter.

@pep8speaks
Copy link

pep8speaks commented May 28, 2024

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

Line 51:81: E501 line too long (81 > 80 characters)

Line 162:81: E501 line too long (85 > 80 characters)

Comment last updated at 2024-05-28 17:44:57 UTC

@carterbox carterbox requested a review from a4894z May 28, 2024 17:48
Copy link
Contributor

@a4894z a4894z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few random comments:

  1. In convolution.py, it looks like we just have a name change of the class (e.g. Convolution --> ConvolutionFFT)?

  2. In tests/ptycho/io.py, it still seems like it should be average instead of sum for plotting phase and magnitude of sample...this is also closer to what fold_slice does for the final 2D sample projection for sinogram creation

  3. The new unit tests for the stuff changed look OK, I haven't run them since I'm not sure about the bigger context of what they're testing.

  4. Fresnel Spect Prop has been removed from this; will be reintroduced in subsequent pull request.

  5. Introduced a SingleSlice instance of Multislice class in order to make this whole TIKE single slice --> TIKE multislice upgrade process easier to follow.

@a4894z a4894z merged commit b72a20b into AdvancedPhotonSource:main Jun 3, 2024
7 checks passed
@carterbox carterbox deleted the object-leading-dimension branch June 5, 2024 19:06
@carterbox carterbox changed the title NEW: Add leading dimension to object for multi-slice API: Add leading dimension to object for multi-slice Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants