Files
DP44/docs/ai/DataPRO/FftSharp.Test.md
2026-04-17 14:55:32 -04:00

1.3 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DataPRO/FftSharp.Test/PowerSpectralDensityShould.cs
2026-04-17T16:30:54.516212+00:00 zai-org/GLM-5-FP8 1 cf0aa492a8193a8d

FftSharp.Test

Purpose

This module contains unit tests for the FftSharp library, specifically validating Power Spectral Density (PSD) calculations using the Welch method. It ensures that the library's FFT frequency generation and PSD calculations match expected results derived from pre-computed CSV data files, verifying mathematical accuracy within a specific tolerance.

Public Interface

  • class PowerSpectralDensityShould: A NUnit test fixture containing tests for PSD functionality.
    • void BasicWelch_1_RawTestDataShouldParse(): Verifies that Raw.csv parses correctly into two lists of length 304478.
    • void BasicWelch_2_PSDResultsDataShouldParse(): Verifies that PSD.csv parses correctly into two lists of length 2049.
    • void BasicWelch_3_FFTSharpFreqShouldMatchPSDResultFreq(): Validates that FftSharp.Transform.FFTfreq generates frequency axes matching the reference data in PSD.csv.
    • void BasicWelch_4_TestBasicFlatTopNoOverlap4096Width(): Validates the FftSharp.Transform.PSD_Welch method output against reference PSD data using a Rectangular window.
  • Private Helpers:
    • `