Skip to content

Add L-BFGS reconstruction engine#485

Open
jfowkes wants to merge 28 commits into
ptycho:devfrom
jfowkes:jari_lbfgs
Open

Add L-BFGS reconstruction engine#485
jfowkes wants to merge 28 commits into
ptycho:devfrom
jfowkes:jari_lbfgs

Conversation

@jfowkes

@jfowkes jfowkes commented Mar 17, 2023

Copy link
Copy Markdown
Collaborator

Resurrecting #400 as GitHub broke the original PR.

Add Limited-memory BFGS reconstruction engine to as an alternative to ML.

Caveats:

  • L-BFGS does not support the object smoothing preconditioner for technical reasons (this would require the ability to invert the Gaussian filter, i.e. exactly de-blur and this is known to be impossible). However probe preconditioning (i.e. probe-object scaling) is supported and this is enough to reconstruct on the moonflower example with a lower error than ML.

@jfowkes jfowkes marked this pull request as ready for review March 17, 2023 08:22
@jfowkes

jfowkes commented Mar 17, 2023

Copy link
Copy Markdown
Collaborator Author

@daurer this L-BFGS pull request is now ready for review and potential merge.

@daurer

daurer commented Feb 6, 2024

Copy link
Copy Markdown
Contributor

Needs a CuPy engine before it can be merged. @ptim0626 maybe something for you?

@ptim0626

Copy link
Copy Markdown
Contributor

A quick comment, the tolerance for LBFGS's tests is increased as it is very likely the discrepancy is a result of numerical instability instead of the problem of implementation.

@jfowkes

jfowkes commented Jan 29, 2025

Copy link
Copy Markdown
Collaborator Author

@daurer this PR will soon need to be updated to use the wavefield preconditioner, I'm happy to do this.

@jfowkes

jfowkes commented May 1, 2025

Copy link
Copy Markdown
Collaborator Author

@daurer I've now added the wavefield preconditioner to LBFGS with tests and templates. Unfortunately pytest has stopped picking up the LBFGS tests in the CI, I assume this is the same issue that we had with the ML engine tests not being picked up?

@daurer

daurer commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

@daurer I've now added the wavefield preconditioner to LBFGS with tests and templates. Unfortunately pytest has stopped picking up the LBFGS tests in the CI, I assume this is the same issue that we had with the ML engine tests not being picked up?

just saw this comment now. I think the tests should be name <something>_test.py

@jfowkes

jfowkes commented Sep 18, 2025

Copy link
Copy Markdown
Collaborator Author

just saw this comment now. I think the tests should be name <something>_test.py

Done. All tests now running (aside from the serial wavefield caveat as in #607) and passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants