Esempio n. 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))
Esempio n. 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))
Esempio n. 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]]])))
Esempio n. 4
0
 def test_cascade_4(self):
     r = spfun.cascadeS(self.a, self.c)
     self.assertTrue(np.allclose(r, self.c))
Esempio n. 5
0
 def test_cascade_3(self):
     r = spfun.cascadeS(self.b, self.b)
     self.assertTrue(np.allclose(r, self.a * 4))
Esempio n. 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]]])))
Esempio n. 7
0
 def test_cascade_4(self):
     r = spfun.cascadeS(self.a, self.c)
     self.assertTrue(np.allclose(r, self.c))
Esempio n. 8
0
 def test_cascade_3(self):
     r = spfun.cascadeS(self.b, self.b)
     self.assertTrue(np.allclose(r, self.a * 4))