Add forward and adjoint gradient operators for regularization, and 2d USFFT functions#82
Add forward and adjoint gradient operators for regularization, and 2d USFFT functions#82nikitinvv wants to merge 8 commits intoAdvancedPhotonSource:mainfrom
Conversation
|
Hello @nikitinvv! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-08-13 17:32:11 UTC |
|
@slnsrydn @carterbox could some of you merge 2d USFFT and 3d USFFT into 1 function? |
|
Is an ND USFFT separable like the an ND FFT is separable into the product of 1D FFTs or whatever? |
carterbox
left a comment
There was a problem hiding this comment.
The regularization part of this PR has no tests and is out of date now that there are no NumPy Operators. I'm also not seeing any tests for the new 2D USFFT function though it seems like it is probably correct?
|
@carterbox, I just added the regularization operators that should be used in ptycho-tomo admm. They can be tested only when the admm is ready. Yes, Nd usfft can be done as separate 1d usfft, but on GPU it will be faster to do Nd FFT once than 1D FFT many times. As I see, in the current code it is enough to control only the number of inner loops in the scatter and gather operators, depending on the number of usfft dimensions. It can be done by recursive function calls. |
Purpose
Add implementation of the forward gradient operator and its adjoint (negative divergence), and 2D usfft functions.
Approach
The operators were implemented by taking differences between neighboring elements for x,y,z dimensions. They can be used inside joint iterative schemes with several subproblems, where one of the subproblems is regularization given in terms of the TV or Tikhonov terms.
2d USFFT functions are the same as for 3D except for the dimensions change and one constant. It is worth to merge them into one USFFT function.
Pre-Merge Checklists
Submitter
yapfto format python code.Reviewer