Example #1
0
    def __init__(self, name='Ramp', amplitude=1, delay=0, offset=0):
        Signal.__init__(self, name)

        def function(t):
            if t < delay:
                return offset
            else:
                return (t-delay) * amplitude + offset
        self.function = function
Example #2
0
 def __init__(self, name, function):
     Signal.__init__(self, name)
     self.function = function
Example #3
0
 def __init__(self, name='Sinus', amplitude=1, w=1, phase=0, offset=0):
     Signal.__init__(self, name)
     self.function = lambda t: amplitude * np.sin(w * t + phase) + offset