Skip to content
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

i.fft: added test file for i.fft module #4931

Merged
merged 9 commits into from
Jan 16, 2025

Conversation

jayneel-shah18
Copy link
Contributor

This PR introduces a comprehensive suite of tests for the i.fft GRASS GIS module. These tests cover a wide range of scenarios, including basic functionality, advanced properties like energy conservation and linearity, and edge cases such as all-zero and all-one rasters. Performance for larger datasets is also assessed.

Key updates in this PR include:

  • Validation of FFT output existence and dimensions.
  • Tests for linearity, energy conservation, and reconstruction via i.ifft.
  • Coverage of edge cases for specific raster patterns.
  • Performance assessment with large rasters.

Test Case Additions:

  1. Basic Functionality:

    • Verify that i.fft produces real and imaginary output rasters.
    • Ensure output dimensions match the input raster.
  2. Advanced Properties:

    • Linearity: Combine two rasters and compare FFT results to individual components.
    • Energy Conservation: Validate the energy conservation theorem.
    • Reconstruction: Test i.ifft for accurate reconstruction of the original raster.
  3. Edge Cases:

    • Behavior with an all-zero raster.
    • Behavior with an all-one raster.
  4. Performance:

    • Test FFT performance on a large 1000x1000 raster.

@github-actions github-actions bot added Python Related code is in Python module imagery tests Related to Test Suite labels Jan 10, 2025
@neteler neteler added this to the 8.5.0 milestone Jan 10, 2025
@echoix
Copy link
Member

echoix commented Jan 10, 2025

Looks great!

echoix
echoix previously approved these changes Jan 10, 2025
Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does someone else have something to add?

@wenzeslaus wenzeslaus requested a review from petrasovaa January 10, 2025 14:01
@wenzeslaus
Copy link
Member

I think @petrasovaa had some comments, but I don't know if she can get to it.

imagery/i.fft/testsuite/test_i_fft.py Outdated Show resolved Hide resolved
imagery/i.fft/testsuite/test_i_fft.py Outdated Show resolved Hide resolved
imagery/i.fft/testsuite/test_i_fft.py Outdated Show resolved Hide resolved
imagery/i.fft/testsuite/test_i_fft.py Outdated Show resolved Hide resolved
@petrasovaa
Copy link
Contributor

Great, thanks for addressing my comments!

@petrasovaa petrasovaa enabled auto-merge (squash) January 15, 2025 21:34
@petrasovaa petrasovaa merged commit a62ee2a into OSGeo:main Jan 16, 2025
27 checks passed
pesekon2 added a commit that referenced this pull request Jan 16, 2025
We don't have `trunk` anymore since we departed from SVN.
@jayneel-shah18 jayneel-shah18 deleted the i.fft_tests branch January 17, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imagery module Python Related code is in Python tests Related to Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants