File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -551,23 +551,14 @@ def adc_inplace_2d(p_signal):
551551 if inplace :
552552 if expanded :
553553 for ch in range (self .n_sig ):
554- # NAN locations for the channel
555- ch_nanlocs = np .isnan (self .e_p_signal [ch ])
556- np .multiply (
557- self .e_p_signal [ch ],
558- self .adc_gain [ch ],
559- self .e_p_signal [ch ],
560- )
561- np .add (
562- self .e_p_signal [ch ],
563- self .baseline [ch ],
564- self .e_p_signal [ch ],
565- )
566- np .round (self .e_p_signal [ch ], 0 , self .e_p_signal [ch ])
567- self .e_p_signal [ch ] = self .e_p_signal [ch ].astype (
568- intdtype , copy = False
569- )
570- self .e_p_signal [ch ][ch_nanlocs ] = d_nans [ch ]
554+ ch_p_signal = self .e_p_signal [ch ]
555+ ch_nanlocs = np .isnan (ch_p_signal )
556+ np .multiply (ch_p_signal , self .adc_gain [ch ], ch_p_signal )
557+ np .add (ch_p_signal , self .baseline [ch ], ch_p_signal )
558+ np .round (ch_p_signal , 0 , ch_p_signal )
559+ ch_d_signal = ch_p_signal .astype (intdtype , copy = False )
560+ ch_d_signal [ch_nanlocs ] = d_nans [ch ]
561+ self .e_p_signal [ch ] = ch_d_signal
571562 self .e_d_signal = self .e_p_signal
572563 self .e_p_signal = None
573564 else :
You can’t perform that action at this time.
0 commit comments