The point of the DataSet class is to hold the element concentration data and to be able to access and perform operations on it.

Methods Summary:

printdata(self):

''' print the data to the screen'''

readXLS(self):

'''reads in self.data and self.meta from self.file (only for excell files)'''

writeCSV(self, filename):

'''Param filename: file in which to write the data to'''

value(self, row, col):

'''param row: row index of value in question

param col: column index of value in question

return: value in question'''

point(self, row):

''' param row: the index of the desired data point

return: the data point in an array'''

dimensions(self):

''' return: the number of elements per data point'''

size(self):

''' return: the number of data points'''

range(self, col=-1):

'''param col: the index of the column in question

return: a list with the minimum and maximum values in the desired column or a list lists of the min and max of all columns when no column is given'''

mean(self, col=-1):

'''param col: the index of the column in question

return: the mean of the desired column or a list of the means of all columns when no column is given'''

stdev(self, col=-1) :

'''param col: the index of the column in question

return: the standard deviation of the desired column or a list of the standard deviations of all columns when no column is given'''

getElementIdx(self, element):

'''returns the index of the column corresponding to the desired element, -1 if it does not exist'''

computeEquation(self, equation):

'''param equation: a string such as "Al2O3 / (CaO + MgO + NaO + K2O)"

return: a 2-D array with 2 columns. Each row is depth, result'''

select(self, cols):

'''param cols: a list of indices of the desired columns

return: a 2D numpy array containing only the desired columns'''