Exemplo n.º 1
0
    def setUp(self):

        # Set up a mock set of tableData similar to the Qt table with 3 rows
        self.tableData = [

            ['0.6', '0.3', '0.9', '5750', '23'],
            ['', '', '', '5930', '24'],
            ['', '', '', '5850', '24'],
            ['', '', '', '5950', '25'],

            ['1', '0.5', '1.5', '3650', '30'],
            ['', '', '', '3690', '30'],
            ['', '', '', '3670', '30'],
            ['', '', '', '3710', '30'],

            ['1.6', '0.8', '2.4', '1462', '31'],
            ['', '', '', '1820', '31'],
            ['', '', '', '1787', '31'],
            ['', '', '', '1840', '31']
            
            ]
            
        self.rowCount = len(self.tableData)

        # Set up test for both types of arrays to calculate apparentResistivity
        voltageSpacing, meanVoltage, meanCurrent = aggregateTable(
            self.tableData, self.rowCount)

        self.voltageSpacing = voltageSpacing
        self.meanVoltage = meanVoltage
        self.meanCurrent = meanCurrent

        self.Vm = self.meanVoltage
        self.I = self.meanCurrent
Exemplo n.º 2
0
Arquivo: main.py Projeto: ajoros/ves
    def aggregateTableForPlot(self):
        """Apply the  aggregation function and assign the outputs to the class

        Notes
        -----
        This method assures that the voltageSpacing, meanVoltage, and
        meanCurrent properties are up to date with the table

        """
        voltageSpacing, meanVoltage, meanCurrent = aggregateTable(
            self.model.table)

        self.voltageSpacing = voltageSpacing
        self.meanVoltage = meanVoltage
        self.meanCurrent = meanCurrent
Exemplo n.º 3
0
    from aggregate import aggregateTable


    schlumberferFilterCoefficients, wennerFilterCoefficients = coefficients
    sampleInterval = np.log(10) / 3.


    # Print out the table that is the "input" table from the field survey
    print('Schlumberger example:')
    time.sleep(sleep_time)
    print('This is the starting table:')
    for row in tableData:
        print(row)

    # Aggregate the table to get the mean voltage and current
    voltageSpacing, meanVoltage, meanCurrent = aggregateTable(
        tableData)
    # Print out the aggregated values
    print('\nVoltage Spacing: {}\nMean Voltage: {}'.format(
        voltageSpacing, meanVoltage))
    print('Mean Current: {}'.format(meanCurrent))
    # Use the modified Schlumberger equation like that used in the spreadsheet
    apparentResistivity = schlumbergerResistivityModified(
        voltageSpacing, meanVoltage, meanCurrent)
    print('\nApparent resistivity (same formula as ' +
          'spreadsheet for Schlum):\n{}'.format(apparentResistivity))

    # Interpolate the field data to get values at Gosh's suggested intervals
    voltageSpacingExtrapolated, newRestivity = interpolateFieldData(
        voltageSpacing, apparentResistivity, 'schlumberger')
    print('\nNew Resitivity values:\n{}'.format(newRestivity))