コード例 #1
0
 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.Xf = wg.random(n_ports =2, name = 'Xf')
     self.Xr = wg.random(n_ports =2, name = 'Xr')
     self.Yf = wg.random(n_ports =2, name='Yf')
     self.Yr = wg.random(n_ports =2, name='Yr')
    
     ideals = [
         wg.short(nports=2, name='short'),
         wg.open(nports=2, name='open'),
         wg.match(nports=2, name='load'),
         wg.attenuator(-20,name='atten'),
         wg.line(45,'deg',name = 'line') ,          
         ]
     
 
     measured = [ self.measure(k) for k in ideals]
     
     
     self.cal= TwelveTerm(
         ideals = NetworkSet(ideals).to_dict(), 
         measured = NetworkSet(measured).to_dict(),
         n_thrus=None,
         )
コード例 #2
0
    def setUp(self):
        self.n_ports = 2
        self.wg = WG
        wg = self.wg
        self.Xf = wg.random(n_ports=2, name='Xf')
        self.Xr = wg.random(n_ports=2, name='Xr')
        self.Yf = wg.random(n_ports=2, name='Yf')
        self.Yr = wg.random(n_ports=2, name='Yr')
        #No leakage as it can interfere with thru detection, which is done
        #based on S21 and S12
        self.If = wg.match(n_ports=1, name='If')
        self.Ir = wg.match(n_ports=1, name='Ir')

        ideals = [
            wg.short(nports=2, name='short'),
            wg.open(nports=2, name='open'),
            wg.match(nports=2, name='load'),
            wg.attenuator(-20, name='atten'),
            wg.line(45, 'deg', name='line'),
        ]

        measured = [self.measure(k) for k in ideals]

        self.cal = TwelveTerm(
            ideals=NetworkSet(ideals).to_dict(),
            measured=NetworkSet(measured).to_dict(),
            n_thrus=None,
        )
コード例 #3
0
 def setUp(self):
     self.n_ports = 2
     wg= rf.wr10
     wg.frequency = rf.F.from_f([100])
     self.wg = 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')
     
     
     ideals = [
         wg.short(nports=2, name='short'),
         wg.open(nports=2, name='open'),
         wg.match(nports=2, name='load'),
         wg.thru(name='thru'),
         ]
     
 
     measured = [ self.measure(k) for k in ideals]
     
     self.cal = rf.TwelveTerm(
         ideals = ideals,
         measured = measured,
         )
     
     coefs = rf.calibration.convert_12term_2_8term(self.cal.coefs, redundant_k=1)
     coefs = NetworkSet.from_s_dict(coefs,
                                 frequency=self.cal.frequency).to_dict()
     self.coefs= coefs
コード例 #4
0
    def setUp(self):
        self.n_ports = 2
        wg= rf.wr10
        wg.frequency = rf.F.from_f([100])
        self.wg = 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')
        #Isolation terms
        self.If = wg.random(n_ports=1, name='If')
        self.Ir = wg.random(n_ports=1, name='Ir')

        ideals = [
            wg.short(nports=2, name='short'),
            wg.open(nports=2, name='open'),
            wg.match(nports=2, name='load'),
            wg.thru(name='thru'),
            ]

        measured = [ self.measure(k) for k in ideals]
        with warnings.catch_warnings(record=False):
            self.cal = rf.TwelveTerm(
            ideals = ideals,
            measured = measured,
            isolation=measured[2]
            )


        coefs = rf.calibration.convert_12term_2_8term(self.cal.coefs, redundant_k=1)
        coefs = NetworkSet.from_s_dict(coefs,
                                    frequency=self.cal.frequency).to_dict()
        self.coefs= coefs
コード例 #5
0
    def setUp(self):
        self.n_ports = 2
        wg = rf.wr10
        wg.frequency = rf.F.from_f([100])
        self.wg = 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")

        ideals = [
            wg.short(nports=2, name="short"),
            wg.open(nports=2, name="open"),
            wg.match(nports=2, name="load"),
            wg.thru(name="thru"),
        ]

        measured = [self.measure(k) for k in ideals]

        self.cal = rf.TwelveTerm(ideals=ideals, measured=measured)

        coefs = rf.calibration.convert_12term_2_8term(self.cal.coefs, redundant_k=1)
        coefs = NetworkSet.from_s_dict(coefs, frequency=self.cal.frequency).to_dict()
        self.coefs = coefs