Closed kimyoungjin06 closed 4 years ago
Interesting. Thanks for letting me know. I'll try to take at look at this in the coming days and hopefully get some more details.
Directly from the error I can tell is that for a single proto-IMF at least one spanned envelope has smaller length (82) than expected (100). A reason for this might be that there aren't enough extrema to span it (but that's a bug that should have been reported), or that some extrema were identified incorrectly (either bug or numerical instability). Given that you have big temporal resolution (small difference in time values) and integers as values, may I suggest to try something like:
t
. Simply run what you have but with eIMFs = eemd.eemd(s)
. Result should be the same.t
, for example T = (t - 1977) * 100
.s = s.astype(np.float32)
.The reason why these might help is that in parabol mode, we're estimating extrema with a parabol interpolation. These require differences in temporal axis and plenty a couple multiplication (code is here). The x-difference is tiny and then dividing something big by that will explode.
Still that's likely a bug.
Just confirmed. If you don't provide time array t
, or scale it appropriately, then all is fine. The exceptions I'm getting are indeed in small (zero) number divisions.
In addition I added time array normalization in 664aa28 so scaling isn't necessary (though still suggested).
Hope this helps 👍
Problem
data
example code
Error log