Gradients of all PowerEnergy classes and NoiseEnergy seem to be broken
I was curious why my minimizations often produce overflows during the power spectrum estimation. Therefore, I wrote (partly together with @reimar) tests which compare the gradient with finite differences. It turns out that something is massively broken unless I overlook something.
In order to reproduce this phenomenon just check out the branch
energy_tests and run
nosetests test/test_energies. The mismatch is in one example -2.421884e+12 vs 48303.217449. That doesn't look good.
Since you have implemented the energies, @kjako, do you have any ideas what possibly goes wrong here?
The curvatures are not even tested yet...