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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jayneel-shah18
Copy link

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!

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.

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.

4 participants