def test_convert_12term_2_8term(self): converted = rf.convert_8term_2_12term(rf.convert_12term_2_8term(self.cal.coefs)) for k in converted: print(("{}-{}".format(k, abs(self.cal.coefs[k] - converted[k])))) for k in converted: self.assertTrue(abs(self.cal.coefs[k] - converted[k]) < 1e-9)
def test_convert_12term_2_8term(self): converted = rf.convert_8term_2_12term( rf.convert_12term_2_8term(self.cal.coefs)) for k in converted: print(('{}-{}'.format(k, abs(self.cal.coefs[k] - converted[k])))) for k in converted: self.assertTrue(abs(self.cal.coefs[k] - converted[k]) < 1e-9)
def test_convert_12term_2_8term(self): converted = rf.convert_8term_2_12term( rf.convert_12term_2_8term(self.cal.coefs)) #import pdb;pdb.set_trace() for k in converted: print('{}-{}'.format(k,abs(self.cal.coefs[k] - converted[k]))) for k in converted: self.assertTrue(abs(self.cal.coefs[k] - converted[k])<1e-9)
def test_convert_12term_2_8term_correction_accuracy(self): converted = rf.convert_8term_2_12term(rf.convert_12term_2_8term(self.cal.coefs)) self.cal._coefs = converted a = self.wg.random(n_ports=2) m = self.measure(a) c = self.cal.apply_cal(m) self.assertEqual(a, c)
def test_convert_12term_2_8term_correction_accuracy(self): converted = rf.convert_8term_2_12term( rf.convert_12term_2_8term(self.cal.coefs)) self.cal._coefs = converted a = self.wg.random(n_ports=2) m = self.measure(a) c = self.cal.apply_cal(m) self.assertEqual(a,c)