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

NEW: Implement multislice propagation operator with correct adjoint #316

Merged
merged 10 commits into from
Jun 13, 2024

Conversation

carterbox
Copy link
Contributor

@carterbox carterbox commented May 30, 2024

Purpose

Implement a correct adjoint operation for multi-slice propagation.

Approach

  • Replace placeholder class with correctly implemented MultiSlice operator
    • Adjoint function is double adjoint instead of separate for probe and object
  • Remove unused specialized adjoint methods from the Ptycho operator because these methods would require reimplementation to work with the new MultiSlice operator
  • Implement new operator tests for the new MultiSlice and Ptycho Operator APIs; these tests prove that the adjoint operations are correct

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.

@carterbox carterbox changed the title Implement multislice propagation operator with correct adjoint NEW: Implement multislice propagation operator with correct adjoint May 30, 2024
@pep8speaks
Copy link

pep8speaks commented May 30, 2024

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

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

Line 32:81: E501 line too long (83 > 80 characters)
Line 70:81: E501 line too long (81 > 80 characters)
Line 71:81: E501 line too long (81 > 80 characters)
Line 72:81: E501 line too long (81 > 80 characters)
Line 97:81: E501 line too long (83 > 80 characters)

Line 32:81: E501 line too long (83 > 80 characters)
Line 69:81: E501 line too long (81 > 80 characters)
Line 70:81: E501 line too long (81 > 80 characters)
Line 71:81: E501 line too long (81 > 80 characters)

Comment last updated at 2024-06-05 19:32:16 UTC

@carterbox carterbox marked this pull request as ready for review June 5, 2024 19:27
@carterbox carterbox requested a review from a4894z June 5, 2024 19:38
@a4894z
Copy link
Contributor

a4894z commented Jun 13, 2024

I was trying to actually run these changes on some benchmarking data, but it was ending up looking like the multislice_fwd_infrastructure branch which kinda was defeating the point of splitting the PR up like this.

By eye, it looks OK but I haven't tested it in ePIE yet.

@a4894z a4894z merged commit b24fd72 into AdvancedPhotonSource:main Jun 13, 2024
7 checks passed
@carterbox
Copy link
Contributor Author

Thanks, @a4894z. I think the way to test this PR was to just run the included adjoint tests. Reading through the changes to check for understandable documentation and typos and copypasta are also helpful.

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