30 lines
923 B
Python
30 lines
923 B
Python
|
|
class AbstractStimulus:
|
|
|
|
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):
|
|
raise NotImplementedError("This is an abstract class!")
|
|
|
|
def get_stimulus_start_ms(self):
|
|
raise NotImplementedError("This is an abstract class!")
|
|
|
|
def get_stimulus_start_s(self):
|
|
return self.get_stimulus_start_ms() / 1000
|
|
|
|
def get_stimulus_duration_ms(self):
|
|
raise NotImplementedError("This is an abstract class!")
|
|
|
|
def get_stimulus_duration_s(self):
|
|
return self.get_stimulus_duration_ms() / 1000
|
|
|
|
def get_stimulus_end_ms(self):
|
|
return self.get_stimulus_start_ms() + self.get_stimulus_duration_ms()
|
|
|
|
def get_stimulus_end_s(self):
|
|
return self.get_stimulus_end_ms() / 1000
|
|
|
|
def get_amplitude(self):
|
|
raise NotImplementedError("This is an abstract class!")
|