[ot][spam][random][crazy][random][crazy]
Undescribed Horrific Abuse, One Victim & Survivor of Many
gmkarl at gmail.com
Thu Nov 10 09:01:15 PST 2022
here is my draft. to test it, i should give a full range and verify
it's the same as the fft.
def micro_ft(time_data, max_period):
N = time_data.shape[-1]
# for the highest frequencies, we can still probably do k * n / N
# but rather than starting at k = 0, we'll want to start at the
minimum, and have
# fractional k's prior to that.
# max_period is number of samples
# k is calculable from it
min_k = N / max_period
k = np.linspace(min_k / N, 1, N)
n = np.arange(N)
# freq[k] = sum_over_n(time[n] * exp(-2 * pi * i * k * n / N))
return time_data * np.exp(-2j * np.pi * k * n)
def micro_ift(freq_data, max_period):
N = time_data.shape[-1]
min_k = N / max_period
k = np.linspace(min_k / N, 1, N)
n = np.arange(N)
# time[n] = sum_over_k(freq[k] * exp(2 * pi * i * k * n / N))
return freq_data * exp(2j * np.pi * k * n)
More information about the cypherpunks
mailing list