FFT sample ordering with odd N I have series of $ N =133 $ data sampled symmetrically around the origin in an actual space at $ x(n \tau) = x_n $ with $ n \in \{ -(N-1)/2, \, ..., \, 0, \, ... , \, (N-1)/2 \} $. Now, I'm a bit unsure of how a typical FFT implementation performed on my data will be correct as a result of $ N $ being odd. My data will be zero padded to a length of $ (2N-1)_2 = 512 $, which is even. Ordering the sample from $ 0 $ to $ N $ as is done in an implementation,
$$
X_f = \frac{1}{N} \sum_{n=0}^{N-1} x_n e^{-2 \pi i f n / N}
$$
I know that $ x_0 = 0 $, and $ X_0 \stackrel{!}{=} 0 $ needs to be my DC term, as $ f $ is sampled at intervals of $ m / N \tau, \, m \in \{0, \, ..., \, N-1 \}$. But now my data has one more element on one side of my zero-datum than the other since all the spatial frequencies above $ N/2 = 256 $ are negative frequencies due to the periodicity $ X_{-m} = X_{N-m} $: there are $ 256 $ points to the right of zero, and $ 255 $ points to the left (as $ X_{257} \rightarrow -255 $ cycles per length, ..., $ X_{511} \rightarrow -1 $ cycles per length).
So my real data is sample-symmetric about the origin, but a zero-padded data set isn't. It's hard to explain exactly what I'm having difficulty with, but it seems like my transform is going to have some kind of &quot;fencepost&quot; error in it due to some kind of offset by one in my data about the center. There will be one extra zero-pad data point on the right side than the left. In fact, if I had taken an even number of real samples from the start, there is no datum actually associated with the origin at all, so shouldn't an $ n = 0 $ term zero out some poor piece of data that doesn't deserve it? I know my fear is unjustified, but I can't seem to work through whatever imaginary problem it is I'm having.
Since your input is discrete the spectrum is periodic with the DFT length. $X_0$ is your DC term, but so is $X_{512}$, $X_{1024}$, $X_{-512}$, etc.
It really doesn't matter which exact period you pick: [0 511], [-255 256], [-256 255], etc. Any choice will work and you always get the same amount of data. Note that $X_{-256} = X_{256}$.