@@ -432,7 +432,7 @@ def adc(self, expanded=False, inplace=False):
432
432
for ch in range (self .n_sig ):
433
433
# NAN locations for the channel
434
434
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 ()
436
436
np .multiply (ch_d_signal , self .adc_gain [ch ], ch_d_signal )
437
437
np .add (ch_d_signal , self .baseline [ch ], ch_d_signal )
438
438
ch_d_signal = ch_d_signal .astype (intdtype , copy = False )
@@ -704,9 +704,14 @@ def convert_dtype(self, physical, return_res, smooth_frames):
704
704
if current_dtype != return_dtype :
705
705
self .p_signal = self .p_signal .astype (return_dtype , copy = False )
706
706
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 )
710
715
else :
711
716
return_dtype = 'int' + str (return_res )
712
717
if smooth_frames is True :
0 commit comments