This commit is contained in:
efish 2018-11-27 14:50:08 +01:00
parent 1bff361bf9
commit 192d2e5c2c
3 changed files with 24 additions and 14 deletions

View File

@ -14,8 +14,8 @@ zeit = np.asarray(time)
plt.plot(zeit[0:1000], eod[0:1000])
plt.title('A.lepto EOD')#Plottitelk
plt.xlabel('Time [ms]', fontsize = 12)#Achsentitel
plt.ylabel('Amplitude[mv]', fontsize = 12)#Achsentitel
plt.xlabel('time [ms]', fontsize = 12)#Achsentitel
plt.ylabel('amplitude[mv]', fontsize = 12)#Achsentitel
plt.xticks(fontsize = 12)
plt.yticks(fontsize = 12)
plt.show()

View File

@ -31,7 +31,7 @@ ax.spines["right"].set_visible(False)
fig.tight_layout()
#plt.show()
plt.savefig('isis.pdf')
exit()
# calculate coefficient of variation
mu = np.mean(interspikeintervals)

View File

@ -2,15 +2,16 @@ import numpy as np
import matplotlib.pyplot as plt
stimulusrate = 500. # the eod frequency of the fake fish
currentchirptimes = [0.1]
chirpwidth = 0.05 # ms
currentchirptimes = [0.0]
chirpwidth = 0.014 # ms
chirpsize = 100.
chirpampl = 0.02
chirpkurtosis = 1.
p = 0.
stepsize = 0.00001
inch_factor = 2.54
time = np.arange(0.0, 0.2, stepsize)
time = np.arange(-0.05, 0.05, stepsize)
signal = np.zeros(time.shape)
ampl = np.ones(time.shape)
freq = np.ones(time.shape)
@ -34,14 +35,23 @@ for k, t in enumerate(time):
p += f * stepsize
signal[k] = a * np.sin(6.28318530717959 * p)
fig = plt.figure()
fig = plt.figure(figsize = (20/inch_factor, 15/inch_factor))
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212)
plt.yticks(fontsize=18)
ax2 = fig.add_subplot(212, sharex=ax1)
plt.setp(ax1.get_xticklabels(), visible=False)
ax1.plot(time*1000, signal, color = 'royalblue', lw = 1)
ax2.plot(time*1000, freq, color = 'royalblue', lw = 3)
ax1.plot(time, signal)
ax2.plot(time, freq)
ax1.set_ylabel("field [mV]", fontsize = 22)
ax1.set_ylabel("fake fish field [rel]")
ax2.set_xlabel("time [s]")
ax2.set_ylabel("frequency [Hz]")
plt.show()
ax1.yaxis.set_label_coords(-0.1, 0.5)
ax2.set_xlabel("time [ms]", fontsize = 22)
ax2.set_ylabel("frequency [Hz]", fontsize = 22)
ax2.yaxis.set_label_coords(-0.1, 0.5)
plt.xticks(fontsize=18)
plt.yticks(fontsize=18)
fig.tight_layout()
#plt.show()
plt.savefig('stimulus_chirp.pdf')