@@ -432,7 +432,7 @@ def adc(self, expanded=False, inplace=False):
432432 for ch in range (self .n_sig ):
433433 # NAN locations for the channel
434434 ch_nanlocs = np .isnan (self .e_p_signal [ch ])
435- ch_d_signal = self .e_p_signal .copy ()
435+ ch_d_signal = self .e_p_signal [ ch ] .copy ()
436436 np .multiply (ch_d_signal , self .adc_gain [ch ], ch_d_signal )
437437 np .add (ch_d_signal , self .baseline [ch ], ch_d_signal )
438438 ch_d_signal = ch_d_signal .astype (intdtype , copy = False )
@@ -704,9 +704,14 @@ def convert_dtype(self, physical, return_res, smooth_frames):
704704 if current_dtype != return_dtype :
705705 self .p_signal = self .p_signal .astype (return_dtype , copy = False )
706706 else :
707- for ch in range (self .n_sig ):
708- if self .e_p_signal [ch ].dtype != return_dtype :
709- self .e_p_signal [ch ] = self .e_p_signal [ch ].astype (return_dtype , copy = False )
707+ if self .e_p_signal is not None :
708+ for ch in range (self .n_sig ):
709+ if self .e_p_signal [ch ].dtype != return_dtype :
710+ self .e_p_signal [ch ] = self .e_p_signal [ch ].astype (return_dtype , copy = False )
711+ else :
712+ for ch in range (self .n_sig ):
713+ if self .p_signal [ch ].dtype != return_dtype :
714+ self .p_signal [ch ] = self .p_signal [ch ].astype (return_dtype , copy = False )
710715 else :
711716 return_dtype = 'int' + str (return_res )
712717 if smooth_frames is True :
0 commit comments