Пример #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)))
Пример #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)))
Пример #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]]]))
Пример #4
0
 def test_cascade_3(self):
     r = spfun.deembed(self.a, self.b, self.b)
     self.assertTrue(np.allclose(r, self.a))
Пример #5
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]]]))
Пример #6
0
 def test_cascade_3(self):
     r = spfun.deembed(self.a, self.b, self.b)
     self.assertTrue(np.allclose(r, self.a))