def test_is_hfss_touchstone(self): ''' Test if Touchstone files have been generated by HFSS or not ''' # Touchstone file generated by HFSS self.assertTrue(rf.Touchstone(self.hfss_oneport_file).is_from_hfss()) self.assertTrue(rf.Touchstone(self.hfss_twoport_file).is_from_hfss()) self.assertTrue(rf.Touchstone(self.hfss_threeport_file).is_from_hfss()) # Touchstone file not from HFSS self.assertFalse( rf.Touchstone(os.path.join(self.test_dir, 'ntwk1.s2p')).is_from_hfss())
def test_is_hfss_touchstone(self): """ Test if Touchstone files have been generated by HFSS and has port impedances for each frequency point. """ # Touchstone file generated by HFSS self.assertTrue(rf.Touchstone(self.hfss_oneport_file).has_hfss_port_impedances) self.assertTrue(rf.Touchstone(self.hfss_twoport_file).has_hfss_port_impedances) self.assertTrue(rf.Touchstone(self.hfss_threeport_file).has_hfss_port_impedances) self.assertTrue(rf.Touchstone(self.hfss_18dot2).has_hfss_port_impedances) self.assertTrue(rf.Touchstone(self.hfss_8ports).has_hfss_port_impedances) self.assertTrue(rf.Touchstone(self.hfss_10ports).has_hfss_port_impedances) # Touchstone file not from HFSS self.assertFalse(rf.Touchstone(os.path.join(self.test_dir, 'ntwk1.s2p')).has_hfss_port_impedances)