diff --git a/code/base_eod.py b/code/base_eod.py index 5a8c5ad..bf1e757 100644 --- a/code/base_eod.py +++ b/code/base_eod.py @@ -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() diff --git a/code/plot_eodform_spikehist.py b/code/plot_eodform_spikehist.py index 19f7b5c..44892bc 100644 --- a/code/plot_eodform_spikehist.py +++ b/code/plot_eodform_spikehist.py @@ -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) diff --git a/code/stimulus_chirp.py b/code/stimulus_chirp.py index ea785e0..5208d60 100644 --- a/code/stimulus_chirp.py +++ b/code/stimulus_chirp.py @@ -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')