def test_pulsetrain(self): dt = equations.PulseTrain() assert dt.parameters == { 'onset': 30.0, 'tau': 13.0, 'T': 42.0, 'amp': 1.0 }
def test_pulsetrain(self): dt = equations.PulseTrain() self.assertEqual(dt.parameters, { 'onset': 30.0, 'tau': 13.0, 'T': 42.0, 'amp': 1.0 })
def test_pulsetrain(self): dt = equations.PulseTrain() self.assertEqual(dt.parameters, { 'onset': 30.0, 'tau': 13.0, 'T': 42.0, 'amp': 1.0 }) self.assertEqual(dt.ui_equation, 'amp if (var % T) < tau else 0.0 * var')
def test_pulsetrain(self): t = np.linspace(0,100) dt = equations.PulseTrain() assert dt.parameters == {'onset': 30.0, 'tau': 13.0, 'T': 42.0, 'amp': 1.0} np.testing.assert_allclose( dt.evaluate(t)[10:], dt.evaluate(t[10:]))