Closed veni-vidi-vici-dormivi closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.80%. Comparing base (
9b0b76b
) to head (671a46b
). Report is 51 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Doing this, I made two interesting observations:
for the sixth harmonic, the coefficients of the sine term will always end up at the first guess: $sin( \frac{\pi \cdot 6 \cdot mon}{6}) = sin(\pi * mon)$ with $mon \in [1, 12]$ as integers, this will always give 0 so there is no fit for the first two coefficients of this order. I think it is still fine to include the sixth harmonic in the fit because the cosine term can to some extent make up for missing the sine term. But we cannot test if coefficients are close for this order (in a straight forward way at least - still thinking about that).
the tests I do here work fine if we have n_ts = 10 but for more time steps, the fitted orders increase to an extent where at 100 time steps, all the orders come out to be six which makes the fitting take muuuch longer. I am not sure why this happens yet. When fitting real data, it's fine.
I'll work on this next week I guess.
In this PR I add a more sophisticated test for the xarray harmonic model. I also deleted Shrutis test file because I think I already implemented all the ideas that were in that file.