PDGGK commented on PR #18006: URL: https://github.com/apache/iotdb/pull/18006#issuecomment-5036209939
Nice addition — the parameter handling (inferred interval, NORM forward/ortho, null rejection, strictly-ascending check) reads cleanly, and the frequency formula (`signedIndex / (N·Δt)`, two-sided) checks out. One signal-processing question on the non-uniform-sampling path. When `SAMPLE_INTERVAL` is omitted the interval is inferred as the average `(lastTime - firstTime)/(N-1)`, and the transform then treats the samples as evenly spaced — the individual timestamps aren't used beyond that average. Since the input only has to be strictly ascending (not uniformly spaced), a genuinely non-uniform series would produce a spectrum whose frequency axis is approximate and whose bin magnitudes correspond to the samples re-placed at uniform positions rather than the original signal, i.e. the usual "a DFT assumes uniform sampling" caveat. Would it be worth documenting that the result is exact only for uniformly-sampled input — and maybe optionally warning when the spacing varies beyond some tolerance? Not blocking; the uniform case looks correct. Just flagging so users of irregular series aren't surprised by the spectrum. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
