33 lines
1.0 KiB
Python
33 lines
1.0 KiB
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):
|
|
return self.get_stimulus_start_s() * 1000
|
|
|
|
def get_stimulus_start_s(self):
|
|
raise NotImplementedError("This is an abstract class!")
|
|
|
|
def get_stimulus_duration_ms(self):
|
|
return self.get_stimulus_duration_s() * 1000
|
|
|
|
def get_stimulus_duration_s(self):
|
|
raise NotImplementedError("This is an abstract class!")
|
|
|
|
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_start_s() + self.get_stimulus_duration_s()
|
|
|
|
def get_amplitude(self):
|
|
raise NotImplementedError("This is an abstract class!")
|
|
|
|
def as_array(self, time_start, total_time, step_size):
|
|
raise NotImplementedError("This is an abstract class!")
|