I'm trying out testing extracting a repeating signal from a larger and there is a bug that looks debuggable! I generated a repeating signal by indexing the random vector with the floor of modular time, and added a custom wavelet parameter to the fourier functions to model it, and passed a square wave as the wavelet so as to model sampling by indexing with floors. It currently throws an assertion failure, but the mismatching vectors have the same values in them, just in different spots, which should really help figure the bug out!
/shared/src/scratch/fourier.py(208)test() -> assert np.allclose(longvec, inserting_spectrum @ inserting_ift) (Pdb) p longvec array([0.73764179, 0.73764179, 0.73764179, ..., 0.85448175, 0.85448175, 0.85448175]) (Pdb) p inserting_spectrum @ inserting_ift array([0.73764179, 0.85448175, 0.23715969, ..., 0.330343 , 0.82712795, 0.66150281])
I was thinking I would just go through the composition of sums via the two code paths and compare them, like earlier. The first sample seems to generally match, so it would be the second sample that's of interest. The previous fourier.py did not have this test and so does not raise an assertion failure.