How to use the rdtools.degradation_ols function in rdtools

To help you get started, we’ve selected a few rdtools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NREL / rdtools / tests / degradation_test_v1.py View on Github external
def test_degradation_with_ols(self):
        ''' Test degradation with ols. '''

        funcName = sys._getframe().f_code.co_name
        print '\r', 'Running ', funcName

        # test ols degradation calc
        print 'Frequency: ', self.input_freq
        rd_result = degradation_ols(self.test_ols_corr_energy)
        self.assertAlmostEqual(rd_result[0], 100*self.rd, places=1)
        print 'Actual: ', 100*self.rd
        print 'Estimated: ', rd_result[0]
github NREL / rdtools / tests / degradation_test_v2.py View on Github external
def test_degradation_with_ols(self):
        ''' Test degradation with ols. '''

        funcName = sys._getframe().f_code.co_name
        print '\r', 'Running ', funcName

        # test ols degradation calc
        for input_freq in self.list_ols_input_freq:
            print 'Frequency: ', input_freq
            rd_result = degradation_ols(self.test_corr_energy[input_freq])
            self.assertAlmostEqual(rd_result[0], 100 * self.rd, places=1)
            print 'Actual: ', 100 * self.rd
            print 'Estimated: ', rd_result[0]