TransformationCache re-uses FFTs in situations where it shouldn't
(This is mostly a reminder ... the problem should go away automatically once the
byebye_zerocenter branch is merged.)
Currently the TransformationCache for FFTs caches and re-uses transforms even when the harmonic base has changes in the meantime, which leads to wrong results. This can be avoided by simply not changing the harmonic base during a run, but this approach seems impractical, since we violate this constraint already in test_fft_operator.py.
Apparently, the whole test environment is not torn down and set up again between individual tests. I verified this by printing the size of the transformation cache whenever its create() method is called (line 27 in transformation_cache.py) and then ran
nosetests test/test_operators/test_fft_operator.py -s
I would have expected the length of the cache to be 1 all the time, but it went up beyond 100.
This is possibly also the cause for the strange behaviour in
To verify this, I suggest running the tests on maste ran on
byebye_zerocenter and compare the convergence behaviour.