lib/transient.py
def remove_DC_offset(self, window=40):  # todo: change range in case of flipped scan!!!
        """Remove DC offset.
        offset is caluclated with 40 points (~700fs) taken at negative time delays.
        such delay is at the end of the scan in raw data, or at the beginning
        if scan was reverted by flip_time """
        try:
            reverted = self.analysis_log['Flip Time']
        except KeyError:
            reverted = False

        if reverted:
            shift = np.average(self.trace[0:window:1])
        else:
            tpoints = len(self.time)
            shift = np.average(self.trace[tpoints - window:tpoints:1])

        self.trace = self.trace - shift
        self.log_it('Remove DC', window=window, shift=shift)
Remove DC offset.
        offset is caluclated with 40 points (~700fs) taken at negative time delays.
        such delay is at the end of the scan in raw data, or at the beginning
        if scan was reverted by flip_time 
Remove DC offset.
offset is caluclated with 40 points (~700fs) taken at negative time delays.
such delay is at the end of the scan in raw data, or at the beginning
if scan was reverted by flip_time
Remove DC offset . offset is caluclated with 40 points ( ~700fs ) taken at negative time delays . such delay is at the end of the scan in raw data or at the beginning if scan was reverted by flip_time
def remove_DC_offset(self, window=40):  
        try:
            reverted = self.analysis_log['Flip Time']
        except KeyError:
            reverted = False
        if reverted:
            shift = np.average(self.trace[0:window:1])
        else:
            tpoints = len(self.time)
            shift = np.average(self.trace[tpoints - window:tpoints:1])
        self.trace = self.trace - shift
        self.log_it('Remove DC', window=window, shift=shift)
def remove_DC_offset ( self , window = 40 ) : try : reverted = self . analysis_log [ 'Flip Time' ] except KeyError : reverted = False if reverted : shift = np . average ( self . trace [ 0 : window : 1 ] ) else : tpoints = len ( self . time ) shift = np . average ( self . trace [ tpoints - window : tpoints : 1 ] ) self . trace = self . trace - shift self . log_it ( 'Remove DC' , window = window , shift = shift )
Remove DC offset.
Remove DC offset .
# todo: change range in case of flipped scan!!! """Remove DC offset.
        offset is caluclated with 40 points (~700fs) taken at negative time delays.
        such delay is at the end of the scan in raw data, or at the beginning
        if scan was reverted by flip_time """
self
window