Skip to content

getAverageFlux in MSAFE can fail

The interpolator whose range is [0,1] is evaluated just under 0 so it crashes. Quick fix is to call FastMath.min and max to ensure range However the problem seems to originally come from the fact that the neighboors from GenericTimeStampedCache are wrong.

@evanward1 @luc any clues?

To reproduce:

MarshallSolarActivityFutureEstimation msfe = new MarshallSolarActivityFutureEstimation(MarshallSolarActivityFutureEstimation.DEFAULT_SUPPORTED_NAMES, MarshallSolarActivityFutureEstimation.StrengthLevel.STRONG);

msfe.getAverageFlux(new AbsoluteDate("2025-04-13T23:59:59.999999999999776176Z", TimeScalesFactory.getUTC()));
Edited by Romain Serra