Statistical Methods
Read the bins of a real-valued Fourier transform
Define the task
Start with a short, equally spaced sequence and record the sample interval in seconds. A Fourier transform describes combinations of oscillations over the recorded span; it does not diagnose a biological rhythm. Irregular timestamps, missing samples and an unknown sampling rate must be resolved before interpreting frequencies from an ordinary discrete transform.
Carry out the check
For N observations at interval dt, bin k has frequency k/(N × dt). Use the conventional unnormalized forward transform: sum x[j] times exp(−2πijk/N). For real inputs, retain bins zero through floor(N/2). Report real and imaginary coefficients and their normalization. The zero bin is the sum, not the mean. A one-sided amplitude convention doubles interior magnitudes divided by N, but does not double zero or the even-N Nyquist bin.
Worked hypothetical example
For the hypothetical sequence 1, 0, −1, 0 sampled every 0.25 seconds, N is 4 and the sampling rate is 4 Hz. The retained bins are 0, 1 and 2 Hz; their real coefficients are 0, 2 and 0, with zero imaginary parts up to rounding. The 1 Hz cosine amplitude is 1. This exact-bin example avoids leakage; a noninteger number of cycles in the record can spread energy across bins. Zero padding adds displayed bins without adding observed information.
Method checked 15 November 2026 against SciPy documentation: rfft.