예제 #1
0
    def cascade(self, other):
        """Make a cascade connection of *self* and *other*.

        Converts *self* and *other* to S-parameters first if necessary.
        """
        a = SArray(self)
        b = SArray(other)
        return self.__class__(cascadeS(a, b))
예제 #2
0
    def cascade(self, other):
        """Make a cascade connection of *self* and *other*.

        Converts *self* and *other* to S-parameters first if necessary.
        """
        a = SArray(self)
        b = SArray(other)
        return self.__class__(cascadeS(a, b))
예제 #3
0
 def test_cascade_6(self):
     r = spfun.cascadeS(self.c, self.b)
     self.assertTrue(np.allclose(r, make_array([[[0.1, 0j], [0, 0.4]]])))
예제 #4
0
 def test_cascade_4(self):
     r = spfun.cascadeS(self.a, self.c)
     self.assertTrue(np.allclose(r, self.c))
예제 #5
0
 def test_cascade_3(self):
     r = spfun.cascadeS(self.b, self.b)
     self.assertTrue(np.allclose(r, self.a * 4))
예제 #6
0
 def test_cascade_6(self):
     r = spfun.cascadeS(self.c, self.b)
     self.assertTrue(np.allclose(r, make_array([[[0.1, 0j], [0, 0.4]]])))
예제 #7
0
 def test_cascade_4(self):
     r = spfun.cascadeS(self.a, self.c)
     self.assertTrue(np.allclose(r, self.c))
예제 #8
0
 def test_cascade_3(self):
     r = spfun.cascadeS(self.b, self.b)
     self.assertTrue(np.allclose(r, self.a * 4))