def setUp(self): self.n_ports = 2 self.wg = rf.RectangularWaveguide(rf.F(75,100,NPTS), a=100*rf.mil,z0=50) wg= self.wg self.X = wg.random(n_ports =2, name = 'X') self.Y = wg.random(n_ports =2, name='Y') self.gamma_f = wg.random(n_ports =1, name='gamma_f') self.gamma_r = wg.random(n_ports =1, name='gamma_r') actuals = [ wg.short(nports=2, name='short'), wg.open(nports=2, name='open'), wg.match(nports=2, name='match'), wg.impedance_mismatch(50,45)**wg.line(20,'deg',name='line')**wg.impedance_mismatch(45,50) ] ideals = [ wg.short(nports=2, name='short'), wg.open(nports=2, name='open'), wg.match(nports=2, name='match'), wg.thru(name='thru'), ] measured = [self.measure(k) for k in actuals] self.cal = rf.UnknownThru( ideals = ideals, measured = measured, switch_terms = [self.gamma_f, self.gamma_r] )
def setUp(self): self.n_ports = 2 self.wg = WG wg = self.wg self.X = wg.random(n_ports=2, name='X') self.Y = wg.random(n_ports=2, name='Y') #No leakage self.If = wg.match(n_ports=1, name='If') self.Ir = wg.match(n_ports=1, name='Ir') self.gamma_f = wg.random(n_ports=1, name='gamma_f') self.gamma_r = wg.random(n_ports=1, name='gamma_r') actuals = [ wg.short(nports=2, name='short'), wg.open(nports=2, name='open'), wg.match(nports=2, name='match'), wg.impedance_mismatch(50, 45)**wg.line( 20, 'deg', name='line')**wg.impedance_mismatch(45, 50) ] ideals = [ wg.short(nports=2, name='short'), wg.open(nports=2, name='open'), wg.match(nports=2, name='match'), wg.thru(name='thru'), ] measured = [self.measure(k) for k in actuals] self.cal = rf.UnknownThru(ideals=ideals, measured=measured, switch_terms=[self.gamma_f, self.gamma_r])