align KNL Morlet wav build with the one in FFT#48
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors 2D kernel-based wavelet construction in STL_2D_Kernel_Torch to build spatial-domain kernels by taking an IFFT of the corresponding Fourier-domain wavelet banks, aligning the “Morlet” kernel path with the FFT implementation. It also refreshes several documentation/certification notebooks to reflect re-executed outputs.
Changes:
- Refactor kernel wavelet construction into
_build_wavelet_kernel_from_ifft_crop(...)and reuse it for both bump-steerable and Morlet wavelets. - Switch Morlet kernel construction to be derived from
WaveletOperator2D_FFT_torch.gaussian_bankvia IFFT + crop. - Update multiple notebooks’ stored outputs/execution counts/timings after reruns.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
STL_main/STL_2D_Kernel_Torch.py |
Refactors wavelet-kernel construction and aligns Morlet kernel build with FFT wavelet banks. |
tests/certification_notebooks/2D_Kernel_Torch/Certification_Notebook_2D_kernel.ipynb |
Updated stored execution metadata/outputs after rerun. |
docs/user_notebook/synthesis_from_stats.ipynb |
Updated stored execution outputs/timings. |
docs/user_notebook/synthesis_from_maps.ipynb |
Updated stored execution metadata/outputs/timings. |
docs/user_notebook/scattering_stats.ipynb |
Updated stored execution metadata (execution counts). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -610,81 +605,15 @@ def _build_bump_steerable_wavelet_kernel(self): | |||
| kernel = kernel.to(device=self.device) | |||
Comment on lines
+599
to
600
| kernel = fft_wavelet_builder(self.J, self.L, size=(N, N))[0] # [L, N, N] | ||
| kernel = torch.fft.fftshift(torch.fft.ifft2(kernel, dim=(-2, -1)), dim=(-2, -1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.