width_delay_beam_experiment/DataAnalysis.py
def clean(self, trim_start=10000, trim_stop=50000,
              noise_filname='rf_noise.csv'):
        '''
        clean has two purposes: trim the data to specify the signal region,
        and remove the rf noise data from the raw voltage data.

        If None or 'None' is passed in for the noise_filename, the data is
        only trimmed.

        assumes:
        that the load() method has been already called and there is raw
        data to be cleaned.

        arguments:
        - trim_start(int): the start index (excluding indices strictly less)
        - trim_stop(int): the stop index (excluding indices greater than or equal)
        - noise_filename(string): filename containing the noise data

        returns:
        nothing -- only sets the clean data instance attributes
        '''

        if noise_filname is None or noise_filname == 'None':

            # Set the cleaned voltage data attribute;
            # exclude indices < trim_start and indices >= trim_stop
            self.clean_V = self.raw_V[trim_start:trim_stop]

        else:

            # Read noise data and store
            noise_dat = np.genfromtxt(self.data_path + noise_filname,
                                      delimiter=',', usecols=(4,))

            # Subtract noise and raw voltage data
            temp = self.raw_V - noise_dat

            # Set the cleaned and noiseless voltage data attribute;
            # exclude indices < trim_start and indices >= trim_stop
            self.clean_V = temp[trim_start:trim_stop]

        # Set the cleaned time and num_turns data instance attributes;
        # exclude indices < trim_start and indices >= trim_stop
        self.clean_t = self.raw_t[trim_start:trim_stop]
        self.clean_numturns = self.raw_numturns[trim_start:trim_stop]
        return

        clean has two purposes: trim the data to specify the signal region,
        and remove the rf noise data from the raw voltage data.

        If None or 'None' is passed in for the noise_filename, the data is
        only trimmed.

        assumes:
        that the load() method has been already called and there is raw
        data to be cleaned.

        arguments:
        - trim_start(int): the start index (excluding indices strictly less)
        - trim_stop(int): the stop index (excluding indices greater than or equal)
        - noise_filename(string): filename containing the noise data

        returns:
        nothing -- only sets the clean data instance attributes
        
clean has two purposes: trim the data to specify the signal region,
and remove the rf noise data from the raw voltage data.

If None or 'None' is passed in for the noise_filename, the data is
only trimmed.

that the load() method has been already called and there is raw
data to be cleaned.

the start index (excluding indices strictly less)
trim_stop(int): the stop index (excluding indices greater than or equal)
noise_filename(string): filename containing the noise data

- only sets the clean data instance attributes
clean has two purposes : trim the data to specify the signal region and remove the rf noise data from the raw voltage data . If None or ' None ' is passed in for the noise_filename the data is only trimmed . that the load () method has been already called and there is raw data to be cleaned . the start index ( excluding indices strictly less ) trim_stop ( int ) : the stop index ( excluding indices greater than or equal ) noise_filename ( string ) : filename containing the noise data - only sets the clean data instance attributes
def clean(self, trim_start=10000, trim_stop=50000,
              noise_filname='rf_noise.csv'):
        if noise_filname is None or noise_filname == 'None':
            self.clean_V = self.raw_V[trim_start:trim_stop]
        else:
            noise_dat = np.genfromtxt(self.data_path + noise_filname,
                                      delimiter=',', usecols=(4,))
            temp = self.raw_V - noise_dat
            self.clean_V = temp[trim_start:trim_stop]
        self.clean_t = self.raw_t[trim_start:trim_stop]
        self.clean_numturns = self.raw_numturns[trim_start:trim_stop]
        return
def clean ( self , trim_start = 10000 , trim_stop = 50000 , noise_filname = 'rf_noise.csv' ) : if noise_filname is None or noise_filname == 'None' : self . clean_V = self . raw_V [ trim_start : trim_stop ] else : noise_dat = np . genfromtxt ( self . data_path + noise_filname , delimiter = ',' , usecols = ( 4 , ) ) temp = self . raw_V - noise_dat self . clean_V = temp [ trim_start : trim_stop ] self . clean_t = self . raw_t [ trim_start : trim_stop ] self . clean_numturns = self . raw_numturns [ trim_start : trim_stop ] return
clean has two purposes: trim the data to specify the signal region,
and remove the rf noise data from the raw voltage data.
clean has two purposes : trim the data to specify the signal region and remove the rf noise data from the raw voltage data .
'''
        clean has two purposes: trim the data to specify the signal region,
        and remove the rf noise data from the raw voltage data.

        If None or 'None' is passed in for the noise_filename, the data is
        only trimmed.

        assumes:
        that the load() method has been already called and there is raw
        data to be cleaned.

        arguments:
        - trim_start(int): the start index (excluding indices strictly less)
        - trim_stop(int): the stop index (excluding indices greater than or equal)
        - noise_filename(string): filename containing the noise data

        returns:
        nothing -- only sets the clean data instance attributes
        ''' # Set the cleaned voltage data attribute; # exclude indices < trim_start and indices >= trim_stop # Read noise data and store # Subtract noise and raw voltage data # Set the cleaned and noiseless voltage data attribute; # exclude indices < trim_start and indices >= trim_stop # Set the cleaned time and num_turns data instance attributes; # exclude indices < trim_start and indices >= trim_stop
self
trim_start
trim_stop
noise_filname