Commit ee98a52
authored
Feature/monogenic (#38)
* Enhance documentation for version management in conf.py and .readthedocs.yaml
- Updated conf.py to clarify version retrieval from source and its implications for stable documentation builds.
- Added detailed comments in .readthedocs.yaml regarding dynamic version generation and stable documentation configurations.
* Update pyproject.toml to support Python 3.13 and 3.14, and enhance pytest configuration
- Added support for Python versions 3.13 and 3.14 in the classifiers section.
- Updated filterwarnings and markers sections for improved pytest configuration consistency.
* Remove deprecated Python 3.14t classifier from pyproject.toml to streamline version support.
* Refactor UDCT and tests to remove Meyer wavelet support
- Removed Meyer wavelet mode from UDCT class and associated tests, simplifying the implementation.
- Updated documentation to reflect the removal of Meyer wavelet references.
- Adjusted tests to ensure compatibility with the new structure, focusing on curvelet and wavelet modes only.
- Enhanced error handling and validation for remaining modes to improve robustness.
* Refactor curvelet vs wavelet example to remove Meyer wavelet references
- Eliminated all code and print statements related to Meyer wavelet, simplifying the example.
- Updated visualizations to focus solely on curvelet and wavelet transforms, enhancing clarity.
- Adjusted subplot configurations to ensure proper display of remaining windows and coefficients.
- Improved documentation to reflect the changes and clarify the example's focus on curvelet and wavelet comparisons.
* Enhance monogenic curvelet transform implementation
- Introduced new functions for processing monogenic transforms, including `_process_wedge_monogenic` and `_apply_forward_transform_monogenic`, to handle scalar and Riesz components.
- Updated the UDCT class to include `forward_monogenic` and `backward_monogenic` methods for applying and reconstructing monogenic coefficients.
- Enhanced type annotations and documentation for clarity, ensuring compatibility with real-valued inputs and providing detailed parameter descriptions.
- Refactored existing typing definitions to include new type aliases for improved type safety and readability.
* Refactor UDCT and MeyerWavelet classes for improved functionality and error handling
- Enhanced the UDCT class with a new _CoefficientsList class to manage highpass bands, ensuring thread safety and preventing data corruption during transformations.
- Updated forward and backward methods to validate highpass band presence and improve error handling.
- Implemented validation for odd dimensions in the MeyerWavelet class, raising appropriate errors for invalid inputs.
- Enhanced dtype handling in the MeyerWavelet class for upsampled arrays, ensuring correct preservation of data types.
- Added comprehensive tests to cover new features and validate error paths, improving overall test coverage and robustness.
* Enhance UDCT and MeyerWavelet classes with improved error handling and validation
- Introduced a new _CoefficientsList class in the UDCT to manage highpass bands, ensuring thread safety and preventing data corruption during transformations.
- Updated forward and backward methods to validate highpass band presence and improve error handling for incomplete coefficients.
- Implemented validation for odd dimensions in the MeyerWavelet class, raising appropriate errors for invalid inputs.
- Enhanced dtype handling in the MeyerWavelet class for upsampled arrays, ensuring correct preservation of data types.
- Added comprehensive tests to cover new features and validate error paths, improving overall test coverage and robustness.
* Enhance monogenic curvelet visualization and consistency checks
- Updated the monogenic curvelet example to improve clarity in mathematical definitions and visualizations.
- Introduced a smaller window overlap parameter in the UDCT transform for better reconstruction accuracy.
- Added comprehensive round-trip consistency checks to validate the monogenic transform against direct computations.
- Enhanced visual comparisons of scalar and Riesz components, including detailed statistics on differences and ratios.
- Improved frequency domain analysis to facilitate understanding of discrepancies between direct and round-trip transformations.
* Update monogenic curvelet example for improved reconstruction accuracy and consistency checks
- Increased window overlap parameter in the UDCT transform to 0.1 for better reconstruction accuracy.
- Simplified the monogenic transformation process by removing redundant small overlap methods.
- Enhanced visualizations and statistics for scalar and Riesz component comparisons.
- Improved print statements for clarity in output comparisons and error analysis.
* Refine tolerances in monogenic tests for improved accuracy
- Adjusted tolerance levels for scalar and Riesz component comparisons in the monogenic round-trip tests to account for numerical precision.
- Removed the skip marker from the test for monogenic matches with backward_monogenic, indicating readiness for execution after addressing known issues.
* Remove extensive round-trip consistency checks and visualizations from monogenic curvelet example
- Eliminated detailed component comparisons and frequency domain analyses to streamline the example.
- Removed print statements and visualizations related to scalar and Riesz component comparisons.
- Simplified the overall structure of the example for better clarity and focus on core functionalities.
* Enhance monogenic curvelet transform documentation and implementation
- Updated documentation to clarify the 2D limitation of the monogenic curvelet transform, emphasizing that it is mathematically defined only for 2D signals and that only the first two Riesz components (R_1 and R_2) are computed for higher dimensions.
- Introduced a new method in the UDCT class to compute the monogenic signal directly, providing a quaternion-like representation and simplifying the transformation process.
- Added detailed parameter descriptions and examples to improve usability and understanding of the monogenic functionality.
* Update monogenic curvelet example for improved clarity and accuracy
- Enhanced documentation with clearer mathematical definitions and references.
- Adjusted window overlap parameter for the UDCT transform to optimize reconstruction accuracy.
- Improved component comparison visualizations and statistics for scalar and Riesz components.
- Streamlined the layout of plots and print statements for better readability and output clarity.
- Removed redundant comments and sections to focus on core functionalities and results.
* Add optimal window overlap computation to UDCT class
- Introduced a new static method to compute the optimal window overlap based on Nguyen & Chauris (2010) constraint, enhancing reconstruction quality.
- Updated the UDCT methods to utilize the computed window overlap when not provided, replacing hardcoded defaults for improved flexibility.
- Enhanced documentation with detailed explanations, parameters, and examples for the new method, ensuring better usability and understanding.
* Refactor monogenic curvelet transform to support variable-length Riesz components
- Updated the implementation to handle an arbitrary number of Riesz components, enhancing flexibility for ND signals.
- Modified type annotations and return structures to reflect the new list format for coefficients, replacing fixed tuples.
- Improved documentation to clarify the extension of the monogenic transform to arbitrary dimensions and the handling of Riesz components.
- Adjusted tests to verify the correct number of components returned and ensure consistency with the new implementation.
* Refactor UDCT transform initialization and add tests for optimal window overlap
- Removed hardcoded window_overlap parameter in UDCT initialization for improved flexibility.
- Added a comprehensive test suite for the UDCT._compute_optimal_window_overlap method, validating its correctness and constraints.
- Ensured that auto-computed window_overlap is utilized when not explicitly provided, enhancing usability.
* Refactor UDCT and related components for improved clarity and functionality
- Renamed parameters and adjusted type annotations for consistency, particularly in the UDCT class, enhancing code readability.
- Updated documentation to clarify the extension of the monogenic curvelet transform to N-D signals and improved descriptions of parameters.
- Streamlined the implementation of forward and backward monogenic transforms, ensuring better handling of Riesz components.
- Enhanced test cases for monogenic transformations, ensuring correct component counts and improved error messages for assertions.
- Removed redundant comments and improved code structure for better maintainability.
* Refactor backward transform functions to improve code clarity and maintainability
- Added pylint disable comments for nested blocks and duplicate code to enhance readability.
- Streamlined the handling of wavelet and curvelet modes in the backward transform implementations.
- Removed unnecessary imports and adjusted type annotations for consistency across the UDCT module.
* Update type annotations in _typing.py for compatibility with Python 3.10
- Adjusted type annotations for UDCTCoefficients, UDCTWindows, and MUDCTCoefficients to utilize modern list and tuple syntax.
- Updated import statements to reflect changes in typing for improved clarity and maintainability.
- Ensured compatibility with Python versions 3.10 and above by modifying conditional imports.
* Add MUDCTCoefficients to documentation and update imports
- Included MUDCTCoefficients in the Sphinx nitpick_ignore list for improved documentation clarity.
- Updated the __all__ list in the numpy module to include MUDCTCoefficients, ensuring it is publicly accessible.
- Adjusted import statements in the numpy module to reflect the addition of MUDCTCoefficients, enhancing type consistency across the codebase.
* Update type annotations in _typing.py for Python 3.10 compatibility
- Adjusted the import statement for Union to enhance clarity and maintain consistency with modern typing practices.
- Updated the type annotations for UDCTCoefficients and UDCTWindows to utilize the latest list syntax, ensuring compatibility with Python 3.10 and above.
* Add comprehensive tests for MeyerWavelet class
- Introduced a new test suite for the MeyerWavelet class, covering 1D and multi-dimensional forward and inverse transforms.
- Implemented tests for various input types, including real and complex signals, ensuring shape and dtype preservation.
- Added round-trip accuracy tests for different data types and dimensions.
- Included tests for internal methods and edge cases in the transform process, enhancing overall test coverage.
* Refactor test cases in test_udct_from_sparse.py for improved readability
- Reformatted the parameterization of the test_from_sparse_different_dtypes method for better clarity.
- Enhanced the readability of nested loops in the test cases by adjusting line breaks and indentation.
- Ensured that the tests maintain their functionality while improving overall code structure.
* Remove dependency on pre-commit in CI workflow for Python checks
* Refactor test cases in test_meyerwavelet.py and test_udct_from_sparse.py for improved clarity
- Simplified the assertion for dtype preservation in the MeyerWavelet tests by consolidating the absolute tolerance logic.
- Removed unnecessary parameters from test methods in both test suites, enhancing readability and reducing complexity.
- Ensured that the functionality of the tests remains intact while improving overall code structure.1 parent b820ab6 commit ee98a52
26 files changed
Lines changed: 3652 additions & 813 deletions
File tree
- .github/workflows
- docs
- examples
- src/curvelets/numpy
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
| |||
52 | 46 | | |
53 | 47 | | |
54 | 48 | | |
55 | | - | |
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
59 | 52 | | |
60 | | - | |
61 | 53 | | |
62 | 54 | | |
63 | | - | |
64 | 55 | | |
65 | 56 | | |
66 | 57 | | |
| |||
82 | 73 | | |
83 | 74 | | |
84 | 75 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
89 | 80 | | |
90 | 81 | | |
91 | 82 | | |
| |||
103 | 94 | | |
104 | 95 | | |
105 | 96 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 97 | | |
127 | 98 | | |
128 | 99 | | |
129 | 100 | | |
130 | 101 | | |
131 | 102 | | |
132 | 103 | | |
133 | | - | |
| 104 | + | |
134 | 105 | | |
135 | 106 | | |
136 | 107 | | |
| |||
140 | 111 | | |
141 | 112 | | |
142 | 113 | | |
143 | | - | |
| 114 | + | |
144 | 115 | | |
145 | 116 | | |
146 | | - | |
147 | 117 | | |
148 | | - | |
149 | | - | |
| 118 | + | |
| 119 | + | |
150 | 120 | | |
151 | 121 | | |
152 | 122 | | |
| |||
174 | 144 | | |
175 | 145 | | |
176 | 146 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 147 | | |
206 | 148 | | |
207 | 149 | | |
208 | | - | |
| 150 | + | |
209 | 151 | | |
210 | 152 | | |
211 | 153 | | |
| |||
224 | 166 | | |
225 | 167 | | |
226 | 168 | | |
227 | | - | |
| 169 | + | |
228 | 170 | | |
229 | 171 | | |
230 | 172 | | |
231 | 173 | | |
232 | 174 | | |
233 | 175 | | |
234 | | - | |
| 176 | + | |
235 | 177 | | |
236 | 178 | | |
237 | 179 | | |
| |||
243 | 185 | | |
244 | 186 | | |
245 | 187 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | 188 | | |
257 | 189 | | |
258 | 190 | | |
259 | 191 | | |
260 | | - | |
| 192 | + | |
261 | 193 | | |
262 | 194 | | |
263 | 195 | | |
| |||
268 | 200 | | |
269 | 201 | | |
270 | 202 | | |
271 | | - | |
272 | 203 | | |
273 | | - | |
274 | | - | |
| 204 | + | |
| 205 | + | |
275 | 206 | | |
276 | 207 | | |
277 | 208 | | |
| |||
294 | 225 | | |
295 | 226 | | |
296 | 227 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | 228 | | |
319 | 229 | | |
320 | 230 | | |
321 | | - | |
| 231 | + | |
322 | 232 | | |
323 | 233 | | |
324 | 234 | | |
| |||
330 | 240 | | |
331 | 241 | | |
332 | 242 | | |
333 | | - | |
| 243 | + | |
334 | 244 | | |
335 | 245 | | |
336 | 246 | | |
| |||
346 | 256 | | |
347 | 257 | | |
348 | 258 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | 259 | | |
356 | 260 | | |
357 | 261 | | |
| |||
0 commit comments