From d40db504807360bff8ec733b8e0afd15ec3450aa Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Sat, 4 Jul 2026 16:02:01 +0200 Subject: [PATCH] Baseline subtraction is doing an unallowed cast by using the inplace operator "-=" on int16 arrays (If it is an ADC_Result, or single scan Accumulation) and subtracting the mean (float) from it. This is a mandatory TypeErrror since numpy 1.10.0. This fixes 22. --- src/damaris/data/DamarisFFT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/damaris/data/DamarisFFT.py b/src/damaris/data/DamarisFFT.py index def34e6..a4b43e2 100644 --- a/src/damaris/data/DamarisFFT.py +++ b/src/damaris/data/DamarisFFT.py @@ -63,7 +63,7 @@ class DamarisFFT: # Heuer, A; Haeberlen, U.: J. Mag. Res.(1989) 85, Is 1, 79-94 n = int( self.x.size * last_part ) for ch in range( len( self.y ) ): - self.y[ ch ] -= self.y[ ch ][ -n: ].mean( ) + self.y[ ch ] = self.y[ ch ] - self.y[ ch ][ -n: ].mean( ) return self def exp_window( self, line_broadening=10 ):