width_delay_beam_experiment/DataAnalysis.py
def load(self, path_to_file, filename):
        '''
        load's purpose is to load in the raw data.

        assumes:
        - valid path_to_file and filenames

        - that the data file is comma separated and contains time and voltage
          data in columns 3 and 4, respectively.

        arguments:
        - path_to_file(string): the path to the folder containing data

        - filename: the filename of the data

        returns:
        - nothing: sets the filename, data_path, and raw data instance attributes
        '''

        # Set filename and data_path instance attribute
        self.filename = filename
        self.data_path = path_to_file

        # Read raw data and store
        mat = np.genfromtxt(self.data_path + self.filename, delimiter=',',
                            usecols=(3,4))

        # Set the raw data instance attributes
        self.raw_t, self.raw_V = mat[:,0]-mat[0,0], mat[:,1]
        self.raw_numturns = self.true_freq*self.raw_t

        # Set the experiment parameter instance attributes
        nocsv, empty = self.filename.split('.csv')
        self.LINAC_delay, self.pulse_width = (float(nocsv.split('_')[2]),
                                              float(nocsv.split('_')[-1]))
        return

        load's purpose is to load in the raw data.

        assumes:
        - valid path_to_file and filenames

        - that the data file is comma separated and contains time and voltage
          data in columns 3 and 4, respectively.

        arguments:
        - path_to_file(string): the path to the folder containing data

        - filename: the filename of the data

        returns:
        - nothing: sets the filename, data_path, and raw data instance attributes
        
load's purpose is to load in the raw data.
assumes:
valid path_to_file and filenames

that the data file is comma separated and contains time and voltage
data in columns 3 and 4, respectively.

the path to the folder containing data

the filename of the data

sets the filename, data_path, and raw data instance attributes
load ' s purpose is to load in the raw data . assumes : valid path_to_file and filenames that the data file is comma separated and contains time and voltage data in columns 3 and 4 respectively . the path to the folder containing data the filename of the data sets the filename data_path and raw data instance attributes
def load(self, path_to_file, filename):
        self.filename = filename
        self.data_path = path_to_file
        mat = np.genfromtxt(self.data_path + self.filename, delimiter=',',
                            usecols=(3,4))
        self.raw_t, self.raw_V = mat[:,0]-mat[0,0], mat[:,1]
        self.raw_numturns = self.true_freq*self.raw_t
        nocsv, empty = self.filename.split('.csv')
        self.LINAC_delay, self.pulse_width = (float(nocsv.split('_')[2]),
                                              float(nocsv.split('_')[-1]))
        return
def load ( self , path_to_file , filename ) : self . filename = filename self . data_path = path_to_file mat = np . genfromtxt ( self . data_path + self . filename , delimiter = ',' , usecols = ( 3 , 4 ) ) self . raw_t , self . raw_V = mat [ : , 0 ] - mat [ 0 , 0 ] , mat [ : , 1 ] self . raw_numturns = self . true_freq * self . raw_t nocsv , empty = self . filename . split ( '.csv' ) self . LINAC_delay , self . pulse_width = ( float ( nocsv . split ( '_' ) [ 2 ] ) , float ( nocsv . split ( '_' ) [ - 1 ] ) ) return
load's purpose is to load in the raw data.
load ' s purpose is to load in the raw data .
'''
        load's purpose is to load in the raw data.

        assumes:
        - valid path_to_file and filenames

        - that the data file is comma separated and contains time and voltage
          data in columns 3 and 4, respectively.

        arguments:
        - path_to_file(string): the path to the folder containing data

        - filename: the filename of the data

        returns:
        - nothing: sets the filename, data_path, and raw data instance attributes
        ''' # Set filename and data_path instance attribute # Read raw data and store # Set the raw data instance attributes # Set the experiment parameter instance attributes
self
path_to_file
filename