def test_mapCtoD_1(self):
        # The first test comes straight from the DSToolbox doc
        # We map the standard continuous time DS modulator to its DT counterpart
        # and we check whether the TF is (1 - 1/z)**2
        LFc = (np.array([[0., 0.], [1., 0.]]),
               np.array([[1., -1.], [0., -1.5]]),
               np.array([[0., 1.]]),
               np.array(([[0., 0.]]))
              )
        tdac = [0, 1]
        LF, Gp = ds.mapCtoD(LFc, tdac)
        ABCD = np.vstack((np.hstack((LF[0], LF[1])),
                          np.hstack((LF[2], LF[3]))
                        ))
        H = ds.calculateTF(ABCD)
        num, den = zpk2tf(*H[0])
        self.assertTrue(np.allclose(num, [ 1., -2.,  1.], atol=1e-8, rtol=1e-5))
        self.assertTrue(np.allclose(den, [1., 0., 0.], atol=1e-8, rtol=1e-5))
Test function for mapCtoD() 1/6
dataset/ETHPy150Open ggventurini/python-deltasigma/deltasigma/tests/test_mapCtoD.py/TestMapCtoD.test_mapCtoD_1