Exemple #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)))
Exemple #2
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)))
Exemple #3
0
 def test_cascade_4(self):
     r = spfun.deembed(self.b, self.c, self.b)
     self.assertAllclose(r, make_array([[[0.025, 0j], [0, 0.025]]]))
Exemple #4
0
 def test_cascade_3(self):
     r = spfun.deembed(self.a, self.b, self.b)
     self.assertTrue(np.allclose(r, self.a))
 def test_cascade_4(self):
     r = spfun.deembed(self.b, self.c, self.b)
     self.assertAllclose(r,  make_array([[[0.025, 0j], [0, 0.025]]]))
 def test_cascade_3(self):
     r = spfun.deembed(self.a, self.b, self.b)
     self.assertTrue(np.allclose(r, self.a))