示例#1
0
    def setUp(self):
        '''
        Read in all the network data required for tests
        '''
        self.test_dir = os.path.dirname(os.path.abspath(__file__))+'/deembed/'
        
        # for open-short, open and short testing
        self.raw = rf.Network(os.path.join(self.test_dir, 'deemb_ind.s2p'))
        self.open = rf.Network(os.path.join(self.test_dir, 'deemb_open.s2p'))
        self.short = rf.Network(os.path.join(self.test_dir, 'deemb_short.s2p'))

        # for spot frequency checking
        self.raw_1f = self.raw['10GHz'] 
        self.open_1f = self.open['10GHz'] 
        self.short_1f = self.short['10GHz']

        # for short-open testing
        self.raw2 = rf.Network(os.path.join(self.test_dir, 'deemb_ind2.s2p'))
        self.open2 = rf.Network(os.path.join(self.test_dir, 'deemb_open2.s2p'))
        self.short2 = rf.Network(os.path.join(self.test_dir, 'deemb_short2.s2p'))
        
        # for spot frequency checking
        self.raw2_1f = self.raw2['10GHz'] 
        self.open2_1f = self.open2['10GHz'] 
        self.short2_1f = self.short2['10GHz']

        # create de-embedding objects
        self.dm = rf.OpenShort(self.open, self.short)
        self.dm_os = rf.OpenShort(self.open_1f, self.short_1f) 
        self.dm_o = rf.Open(self.open_1f)
        self.dm_s = rf.Short(self.short_1f)
        self.dm_so = rf.ShortOpen(self.short2_1f, self.open2_1f)

        # relative tolerance for comparisons
        self.rtol = 1e-3
示例#2
0
 def test_freqmismatch(self):
     """
     Check that error is caught when networks are of different frequencies
     """
     with self.assertRaises(ValueError):
         rf.OpenShort(self.open, self.short_1f)
     
     with self.assertRaises(ValueError):
         self.dm_os.deembed(self.raw)
示例#3
0
    def setUp(self):
        """
        Read in all the network data required for tests
        """
        self.test_dir = os.path.dirname(os.path.abspath(__file__))+'/deembed/'
        
        # for open-short, open and short testing
        self.raw = rf.Network(os.path.join(self.test_dir, 'deemb_ind.s2p'))
        self.open = rf.Network(os.path.join(self.test_dir, 'deemb_open.s2p'))
        self.short = rf.Network(os.path.join(self.test_dir, 'deemb_short.s2p'))

        # for spot frequency checking
        self.raw_1f = self.raw['10GHz'] 
        self.open_1f = self.open['10GHz'] 
        self.short_1f = self.short['10GHz']

        # for short-open testing
        self.raw2 = rf.Network(os.path.join(self.test_dir, 'deemb_ind2.s2p'))
        self.open2 = rf.Network(os.path.join(self.test_dir, 'deemb_open2.s2p'))
        self.short2 = rf.Network(os.path.join(self.test_dir, 'deemb_short2.s2p'))
        
        # for spot frequency checking
        self.raw2_1f = self.raw2['10GHz'] 
        self.open2_1f = self.open2['10GHz'] 
        self.short2_1f = self.short2['10GHz']

        # for spilit-pi testing
        self.raw3 = rf.Network(os.path.join(self.test_dir, 'deemb_ind3.s2p'))
        self.thru3 = rf.Network(os.path.join(self.test_dir, 'deemb_thru3.s2p'))
        
        # for spot frequency checking
        self.raw3_1f = self.raw3['10GHz'] 
        self.thru3_1f = self.thru3['10GHz'] 

        # for spilit-tee testing
        self.raw4 = rf.Network(os.path.join(self.test_dir, 'deemb_ind4.s2p'))
        self.thru4 = rf.Network(os.path.join(self.test_dir, 'deemb_thru4.s2p'))
        
        # for spot frequency checking
        self.raw4_1f = self.raw4['10GHz'] 
        self.thru4_1f = self.thru4['10GHz'] 

        # for admittance cancel testing
        self.raw5 = rf.Network(os.path.join(self.test_dir, 'deemb_ind5.s2p'))
        self.thru5 = rf.Network(os.path.join(self.test_dir, 'deemb_thru5.s2p'))
        
        # for spot frequency checking
        self.raw5_1f = self.raw5['10GHz'] 
        self.thru5_1f = self.thru5['10GHz'] 

        # for impedance cancel cancel testing
        self.raw6 = rf.Network(os.path.join(self.test_dir, 'deemb_ind6.s2p'))
        self.thru6 = rf.Network(os.path.join(self.test_dir, 'deemb_thru6.s2p'))
        
        # for spot frequency checking
        self.raw6_1f = self.raw6['10GHz'] 
        self.thru6_1f = self.thru6['10GHz']
        
        # for IEEEP370 NZC and ZC de-embedding checking
        self.s2xthru = rf.Network(os.path.join(self.test_dir, 's2xthru.s2p'))
        self.fdf = rf.Network(os.path.join(self.test_dir, 'fdf.s2p'))
        self.nzc_ref = rf.Network(os.path.join(self.test_dir, 'deembedded_SE_NZC_fdf.s2p'))
        self.zc_ref = rf.Network(os.path.join(self.test_dir, 'deembedded_SE_ZC_fdf.s2p'))
        nonuniform_freq = rf.Frequency(self.s2xthru.f[0], self.s2xthru.f[-1], 
                                       npoints=len(self.s2xthru), unit='Hz', 
                                       sweep_type='log')
        self.s2xthru_nu = self.s2xthru.interpolate(nonuniform_freq)
        self.fdf_nu = self.fdf.interpolate(nonuniform_freq)
        self.nzc_ref_nu = self.nzc_ref.interpolate(nonuniform_freq)
        self.zc_ref = self.zc_ref.interpolate(nonuniform_freq)

        # create de-embedding objects
        self.dm = rf.OpenShort(self.open, self.short)
        self.dm_os = rf.OpenShort(self.open_1f, self.short_1f) 
        self.dm_o = rf.Open(self.open_1f)
        self.dm_s = rf.Short(self.short_1f)
        self.dm_so = rf.ShortOpen(self.short2_1f, self.open2_1f)
        self.dm_pi = rf.SplitPi(self.thru3_1f)
        self.dm_tee = rf.SplitTee(self.thru4_1f)
        self.dm_ac = rf.AdmittanceCancel(self.thru5_1f)
        self.dm_ic = rf.ImpedanceCancel(self.thru6_1f)
        self.dm_nzc = rf.IEEEP370_SE_NZC_2xThru(dummy_2xthru = self.s2xthru, 
                                        name = '2xthru')
        self.dm_zc  = rf.IEEEP370_SE_ZC_2xThru(dummy_2xthru = self.s2xthru, 
                                       dummy_fix_dut_fix = self.fdf, 
                                       bandwidth_limit = 10e9, 
                                       pullback1 = 0, pullback2 = 0,
                                       leadin = 0,
                                       NRP_enable = False,
                                       name = 'zc2xthru')
        
        with self.assertRaises(NotImplementedError) as context:
            self.dm_nzc_nu = rf.IEEEP370_SE_NZC_2xThru(dummy_2xthru = self.s2xthru_nu, 
                                            name = '2xthru')
            self.dm_zc_nu  = rf.IEEEP370_SE_ZC_2xThru(dummy_2xthru = self.s2xthru_nu, 
                                           dummy_fix_dut_fix = self.fdf_nu, 
                                           bandwidth_limit = 10e9, 
                                           pullback1 = 0, pullback2 = 0,
                                           leadin = 0,
                                           NRP_enable = False,
                                           name = 'zc2xthru')
        # relative tolerance for comparisons
        self.rtol = 1e-3
示例#4
0
    def setUp(self):
        """
        Read in all the network data required for tests
        """
        self.test_dir = os.path.dirname(
            os.path.abspath(__file__)) + '/deembed/'

        # for open-short, open and short testing
        self.raw = rf.Network(os.path.join(self.test_dir, 'deemb_ind.s2p'))
        self.open = rf.Network(os.path.join(self.test_dir, 'deemb_open.s2p'))
        self.short = rf.Network(os.path.join(self.test_dir, 'deemb_short.s2p'))

        # for spot frequency checking
        self.raw_1f = self.raw['10GHz']
        self.open_1f = self.open['10GHz']
        self.short_1f = self.short['10GHz']

        # for short-open testing
        self.raw2 = rf.Network(os.path.join(self.test_dir, 'deemb_ind2.s2p'))
        self.open2 = rf.Network(os.path.join(self.test_dir, 'deemb_open2.s2p'))
        self.short2 = rf.Network(
            os.path.join(self.test_dir, 'deemb_short2.s2p'))

        # for spot frequency checking
        self.raw2_1f = self.raw2['10GHz']
        self.open2_1f = self.open2['10GHz']
        self.short2_1f = self.short2['10GHz']

        # for spilit-pi testing
        self.raw3 = rf.Network(os.path.join(self.test_dir, 'deemb_ind3.s2p'))
        self.thru3 = rf.Network(os.path.join(self.test_dir, 'deemb_thru3.s2p'))

        # for spot frequency checking
        self.raw3_1f = self.raw3['10GHz']
        self.thru3_1f = self.thru3['10GHz']

        # for spilit-tee testing
        self.raw4 = rf.Network(os.path.join(self.test_dir, 'deemb_ind4.s2p'))
        self.thru4 = rf.Network(os.path.join(self.test_dir, 'deemb_thru4.s2p'))

        # for spot frequency checking
        self.raw4_1f = self.raw4['10GHz']
        self.thru4_1f = self.thru4['10GHz']

        # for admittance cancel testing
        self.raw5 = rf.Network(os.path.join(self.test_dir, 'deemb_ind5.s2p'))
        self.thru5 = rf.Network(os.path.join(self.test_dir, 'deemb_thru5.s2p'))

        # for spot frequency checking
        self.raw5_1f = self.raw5['10GHz']
        self.thru5_1f = self.thru5['10GHz']

        # for impedance cancel cancel testing
        self.raw6 = rf.Network(os.path.join(self.test_dir, 'deemb_ind6.s2p'))
        self.thru6 = rf.Network(os.path.join(self.test_dir, 'deemb_thru6.s2p'))

        # for spot frequency checking
        self.raw6_1f = self.raw6['10GHz']
        self.thru6_1f = self.thru6['10GHz']

        # create de-embedding objects
        self.dm = rf.OpenShort(self.open, self.short)
        self.dm_os = rf.OpenShort(self.open_1f, self.short_1f)
        self.dm_o = rf.Open(self.open_1f)
        self.dm_s = rf.Short(self.short_1f)
        self.dm_so = rf.ShortOpen(self.short2_1f, self.open2_1f)
        self.dm_pi = rf.SplitPi(self.thru3_1f)
        self.dm_tee = rf.SplitTee(self.thru4_1f)
        self.dm_ac = rf.AdmittanceCancel(self.thru5_1f)
        self.dm_ic = rf.ImpedanceCancel(self.thru6_1f)

        # relative tolerance for comparisons
        self.rtol = 1e-3