Beispiel #1
0
    def deembed(self, left=None, right=None):
        """Deembed *left* and *right from *self*.

        Converts *self*, *left*, and *right* to S-parameters first if
        necessary.
        """
        if left is None and right is None:
            return self
        elif left is None:
            return self.__class__(deembedright(SArray(self),
                                               SArray(right)))
        elif right is None:
            return self.__class__(deembedleft(SArray(left),
                                              SArray(self)))
        else:
            return self.__class__(deembed(SArray(left),
                                          SArray(self),
                                          SArray(right)))
 def test_cascade_3(self):
     r = spfun.deembedleft(self.b, self.c)
     self.assertTrue(np.allclose(r, make_array([[[0.025, 0j], [0, 0.1]]])))
 def test_cascade_2(self):
     r = spfun.deembedleft(self.b, self.b)
     self.assertTrue(np.allclose(r, self.a))