On Saturday, 9 April 2016 at 14:15:38 UTC, Nordlöw wrote:
Has anybody more than I thought about representing the sample
rate of a sampled signal collected from sources such as
microphones and digital radio receivers?
With it we could automatically relate DFT/FFT bins to real
frequencies and other cool stuff.
Maybe we could make it part of the standard solution for linear
algebra processing and units of measurement in D.
Destroy.
I don't have time to do much on this, but would be happy to
advise and/or answer questions if anyone wants to get in to it.
I've spent an unhealthy number of hours in discrete fourier
space, as has my computer.
Damn it, now I'm thinking about it...
The units are easy (either 1/s or 2*pi / s), but in the DFT the
topology of the space is the important/difficult thing (it's a
torus, which in 1-D is just a circle).
When dealing with arrays in fourier space, you can make a lot of
things easy by implementing indexing in terms of an integer type
modulo-N, but there's often tricks to avoid having to do so many
%s. Compilers seem unpredictably fantastic or terrible at
optimising this sort of code.
P.s. very basic definitions that might be vaguely useful, just
because I have them lying around:
https://dl.dropboxusercontent.com/u/910836/fourier.pdf