update stimulus development figur + fix Bug in sinusoidalStepStim class
This commit is contained in:
parent
6f83f3b171
commit
ad1ddbb041
@ -97,11 +97,11 @@ def model_comparison():
|
||||
|
||||
|
||||
def stimulus_development():
|
||||
time_start = -0.020
|
||||
time_duration = 0.080
|
||||
|
||||
stimulus = SinusoidalStepStimulus(745, 0.2, 0.1, 0.1)
|
||||
step_size = 0.000005
|
||||
time_start = -0.040
|
||||
time_duration = 0.80
|
||||
# freq, contrast, start_time=0, duration=np.inf, amplitude=1
|
||||
stimulus = SinusoidalStepStimulus(745, 0.5, 0, 0.02)
|
||||
step_size = 0.00005
|
||||
stim_array = stimulus.as_array(time_start, time_duration, step_size)
|
||||
|
||||
rectified = hF.rectify_stimulus_array(stim_array)
|
||||
@ -119,14 +119,13 @@ def stimulus_development():
|
||||
axes[2].plot(time, filtered)
|
||||
axes[2].set_title("rectified plus dendritic filter")
|
||||
|
||||
axes[0].set_ylim((-1.15, 1.15))
|
||||
axes[1].set_ylim((-1.15, 1.15))
|
||||
axes[2].set_ylim((-1.15, 1.15))
|
||||
for ax in axes:
|
||||
ax.set_ylim((-1.55, 1.55))
|
||||
|
||||
for ax in axes:
|
||||
ax.set_ylabel("Amplitude [mV]")
|
||||
axes[2].set_xlabel("Time [s]")
|
||||
axes[0].set_xlim((0, 0.05))
|
||||
axes[0].set_xlim((-0.02, 0.04))
|
||||
# axes[2].set_ylim((0, 1.05))
|
||||
|
||||
plt.tight_layout()
|
||||
|
@ -45,7 +45,9 @@ class SinusoidalStepStimulus(AbstractStimulus):
|
||||
def convert_to_array(frequency, amplitude, contrast, start_time, duration, time_start, total_time, step_size_s):
|
||||
full_time = np.arange(time_start, time_start + total_time, step_size_s)
|
||||
full_carrier = np.sin(2 * np.pi * frequency * full_time)
|
||||
if start_time > time_start+duration or start_time+duration < time_start:
|
||||
if start_time > time_start+total_time or start_time+duration < time_start:
|
||||
if contrast != 0:
|
||||
print("SinusoidalStepStimulus: converted to array in a range outside of step!")
|
||||
return full_carrier * amplitude
|
||||
else:
|
||||
if start_time >= time_start:
|
||||
|
@ -1,4 +1,4 @@
|
||||
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2018.11.12) 4 SEP 2020 10:57
|
||||
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2018.11.12) 5 SEP 2020 11:22
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
%&-line parsing enabled.
|
||||
@ -595,9 +595,9 @@ ublic/amsfonts/cm/cmr8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/am
|
||||
sfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts
|
||||
/cm/cmsy8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmt
|
||||
i12.pfb>
|
||||
Output written on Masterthesis.pdf (13 pages, 327767 bytes).
|
||||
Output written on Masterthesis.pdf (13 pages, 325756 bytes).
|
||||
PDF statistics:
|
||||
345 PDF objects out of 1000 (max. 8388607)
|
||||
344 PDF objects out of 1000 (max. 8388607)
|
||||
222 compressed objects within 3 object streams
|
||||
50 named destinations out of 1000 (max. 500000)
|
||||
114 words of extra memory for PDF output out of 10000 (max. 10000000)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user