Пример #1
0
import matplotlib.patches as patches

font = {'family': 'Arial', 'weight': 'normal', 'size': 15}
matplotlib.rc('font', **font)

scanfolder = '/Users/alec/UCSB/scan_data/'
savefolder = '/Users/alec/UCSB/scan_data/images/noaxes/'

scan_num = 135

scan_num = str(scan_num)
datapath = scanfolder + scan_num + '/' + scan_num.zfill(6) + '.scan'
infopath = scanfolder + scan_num + '/' + scan_num.zfill(6) + '.info'
savepath = savefolder + scan_num + '.pdf'
scandata = ls.load_contour(datapath)
scan_size = ls.get_scan_size(infopath)

scandata = scandata / (1e3)

plt.close('all')

fp = plt.figure(1, [4, 4])
ax1 = plt.axes()

plt.imshow(
    scandata,
    cmap='bone',
    interpolation='nearest',
    extent=[-scan_size / 2, scan_size / 2, -scan_size / 2, scan_size / 2],
    clim=[44, 62])
cbar = plt.colorbar(fraction=0.045, pad=0.06)
Пример #2
0
@author: alec
"""

import matplotlib
import matplotlib.pyplot as plt
import matplotlib.pylab as pylab
import matplotlib.patches as patches
import numpy as np
import load_scan as ls
import fourier_image as fi

font = {'family': 'Arial', 'weight': 'normal', 'size': 14}
matplotlib.rc('font', **font)

scandata = ls.load_contour('/Users/alec/UCSB/scan_data/809/000809.scan')
scan_size = ls.get_scan_size('/Users/alec/UCSB/scan_data/809/000809.info')

res = len(scandata[0])

fscandata = fi.fourier_image(scandata)
fscan_size = res / scan_size

plt.close('all')

plt.figure(1, [5, 5])
ax1 = plt.axes()

plt.imshow(
    np.abs(fscandata),
    cmap='bone',
    interpolation='nearest',