one with everything
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from stimuli.AbstractStimulus import AbstractStimulus
|
||||
import numpy as np
|
||||
from numba import jit, njit
|
||||
from warnings import warn
|
||||
|
||||
|
||||
class SinusAmplitudeModulationStimulus(AbstractStimulus):
|
||||
@@ -67,8 +68,9 @@ def convert_to_array(carrier_freq, amplitude, modulation_freq, contrast, start_t
|
||||
idx_end = (am_end - time_start) / step_size_s
|
||||
|
||||
if idx_start != round(idx_start) or idx_end != round(idx_end):
|
||||
raise ValueError("Didn't calculate integers when searching the start and end index. start:", idx_start, "end:", idx_end)
|
||||
# print("am_start: {:.0f}, am_end: {:.0f}, length: {:.0f}".format(am_start, am_end, am_end-am_start))
|
||||
warn("Didn't calculate integers when searching the start and end index. start: {} end: {}".format(idx_start, idx_end))
|
||||
# raise ValueError("Didn't calculate integers when searching the start and end index. start:", idx_start, "end:", idx_end)
|
||||
# print("am_start: {:.0f}, am_end: {:.0f}, length: {:.0f}".format(am_start, am_end, am_end-am_start))
|
||||
|
||||
idx_start = int(idx_start)
|
||||
idx_end = int(idx_end)
|
||||
|
||||
Reference in New Issue
Block a user