Trend removal fails
Closed this issue · 1 comments
thelampire commented
Trend removal fails for int16 data with the following message:
File "/Users/mlampert/work/repos/flap_repos/flap/spectral_analysis.py", line 235, in _trend_removal
d -= p[0]
UFuncTypeError: Cannot cast ufunc 'subtract' output from dtype('float64') to dtype('int16') with casting rule 'same_kind'
I think the same thing has happened at filtering but that resulted in over/underflow.
thelampire commented
I found the culprit. If one uses the d -= notation instead of d = d- then trend removal fails. Otherwise it works. I submitted the fix into thelampire-patch-2.