def plotPolarFFT( self ):
self.fig.clear()
self.axes = self.fig.add_axes( [0.0, 0.0, 1.0, 1.0] )
self.axes.hold(False)
polarFFTimage = zorro.util.img2polar( np.log10( 1.0 + np.abs( np.fft.fftshift( np.fft.fft2( self.plotDict['image'] )))) )
if "lowPass" in self.plotDict:
polarFFTimage = ni.gaussian_filter( polarFFTimage, self.plotDict["lowPass"] )
FFTclim = zorro.util.ciClim( polarFFTimage, sigma=2.0 )
mage = self.axes.imshow( polarFFTimage, interpolation='bicubic', vmin=FFTclim[0], vmax=FFTclim[1],
cmap=self.plotDict['image_cmap'] )
if 'pixlsize' in self.plotDict:
# Egh, this scalebar is sort of wrong, maybe I should transpose the plot?
inv_ps = 1.0 / (polarFFTimage.shape[0] * self.plotDict['pixelsize'] )
zorro.util.plotScalebar( mage, inv_ps, units=u'nm^{-1}' )
self.axes.set_axis_off()
if bool(self.plotDict['colorbar']):
self.fig.colorbar( mage, fraction=0.046, pad=0.04)
return self.printPlot( dpi_key=u'image_dpi' )
# TODO: render Gautoauto outputs? Maybe I should make the Gautomatch boxes seperately as a largely
# transparent plot, and just add it on top or not?
评论列表
文章目录