simplify interface
This commit is contained in:
parent
3f91162055
commit
c7bcefedbe
@ -2,7 +2,7 @@
|
||||
class AbstractStimulus:
|
||||
|
||||
def value_at_time_in_ms(self, time_point):
|
||||
raise NotImplementedError("This is an abstract class!")
|
||||
return self.value_at_time_in_s(time_point / 1000)
|
||||
|
||||
def value_at_time_in_s(self, time_point):
|
||||
raise NotImplementedError("This is an abstract class!")
|
||||
|
@ -16,9 +16,6 @@ class StepStimulus(AbstractStimulus):
|
||||
self.start = start / 1000
|
||||
self.duration = duration / 1000
|
||||
|
||||
def value_at_time_in_ms(self, time_point):
|
||||
return self.value_at_time_in_s(time_point/1000)
|
||||
|
||||
def value_at_time_in_s(self, time_point):
|
||||
if self.start <= time_point <= self.start + self.duration:
|
||||
return self.value
|
||||
|
Loading…
Reference in New Issue
Block a user