Closed thelampire closed 4 years ago
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.
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.
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.