fig, ax = plt.subplots(1, 1)
N = len(self.td)
t = np.linspace(-N/(2*2560.), N/(2*2560.), N)
#------------------------------------------------------------
# Compute the wavelet PSD
f0 = np.linspace(self.sliderLowFrequency.GetValue()/10.,
self.sliderHighFrequency.GetValue()/10.,
self.sliderNBins.GetValue())
this_Q = self.sliderQ.GetValue()/10.
wPSD = wavelet_PSD(t, self.td, f0, Q=this_Q)
self.dataMin = wPSD.min()
self.dataMax = wPSD.max()
# the spectrogram
self.ax = plt.subplot(111)
self.ax.set_yticks(np.linspace(0, self.sliderNBins.GetValue(), 8))
ytl = np.logspace(np.log(f0[0])/np.log(10),
np.log(f0[-1])/np.log(10), 8,
endpoint=True, base=10.0)
self.ax.set_yticklabels([round(y,3) for y in ytl])
self.imshow_obj = self.ax.imshow(wPSD,
origin='lower',
aspect='auto',
cmap=matplotlib.cm.get_cmap(name=self.choiceColorMap.GetStringSelection()),
interpolation=self.choiceInterpolation.GetStringSelection(),
vmin=self.dataMin+((self.dataMax-self.dataMin)*self.sliderLumMin.GetValue()/100.),
vmax=self.dataMax-((self.dataMax-self.dataMin)*(1-self.sliderLumMax.GetValue()/100.)),
alpha=1.)
plt.colorbar(self.imshow_obj, orientation='vertical')
#plt.tight_layout()
self.ax.text(0.02, 0.95, ("Wavelet PSD"), color='w',
ha='left', va='top', transform=ax.transAxes)
self.ax.set_xlabel('$t$')
self.ax.set_ylabel('$f$ bin')
plt.show(False)
plt.draw()