Unfinished bug fix: tracking down gradient error in rotating gaussian