-
Notifications
You must be signed in to change notification settings - Fork 24
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
Wrong wavelet adjoint operator #106
Comments
Could you propose a PR for that at least to have orthogonnal wavelets with peridization or using zero-padding to have a well defined adjoint? |
Orthogonal wavelets already have a well-defined adjoint (or at least a very good approximation) in the inverse. The problem with zero-padding is that in the case of pywavelet it is non-orthogonal. Luckily, it turns out that for zero-padding the inverse is also a rather good approximation of the adjoint (also detailed in the article). |
Did you mean: When writing You're right, we should get unittests soon to check this property and Loubna's right too. Please send a PR. |
Yes edited. RE the PR, I will do one soon on the padding for the |
For sure. The real adjoint PR is more demanding and is not the highest priority right now. |
RE this issue, and the fact that maybe isap wavelet adjoints were wrong because of accuracy issues: To compute the adjoint you need to take the analysis filters and rotate them (using the |
Update here: |
This issue needs a fix first in pysap where we expose a function that does the adjoint operator, which later can lead to possibly some changes in code in pysap-mri to interface right. |
@AGrigis , can you please instance a version to get the above comment done in pysap? |
Going forward in future, it would also be helpful if PySAP exposed the binaries of Sparse2D at say .local/pysap/bin However, we would need this updated for CEA-COSMIC/pysap-mri#40 |
The adjoint operator of the wavelet transform operator is not correct in all cases. Namely, when using
pywt
wavelets, we have redundant wavelet transforms (currently hardcoded to be so because of #79 ). In this case, wavelets are not orthogonal and therefore the adjoint is not the inverse anymore.For the case of
isap
it is also wrong but it might be because of accuracy issues cf #53 .This paper by Folberth and Becker shows how to compute the wavelet tranform adjoint. The code is available in Matlab. The operator
wextend
might become available inpywt
under the namepad
after this issue is taken care of. It is however more or less already available.Also remember that we will have to compute 2 adjoints: one for the decomposition and one for the reconstruction (since the inverse is not the adjoint of the decomposition, there is no reason that the decomposition is going to be the adjoint of the inverse). The article only studies the synthesis case, that is the adjoint of the reconstruction operator.
Finally, we will need some unit tests to test that the adjoint property is indeed verified.
/!\ Important: this probably affects badly the code base. Indeed, people probably used the
adj_op
function in lieu of the reconstruction. This would need to be reviewed.The text was updated successfully, but these errors were encountered: