Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- filename=input("name of the file:")
- data = np.genfromtxt(filename, unpack=True, delimiter='\t')
- dataname=filename[:-4]
- x=data[0,2:]
- y=data[1:,0]
- xmin=x[0]
- xmax=x[-1]
- ymin=y[0]
- ymax=y[-1]
- values = data[1:,2:]
- values2=np.rot90(values.T)
- values3=(values2-np.min(values2))/(np.max(values2)-np.min(values2))
- fig = plt.figure(figsize=(8,8))
- ax = fig.gca()
- ax.set_xlim(xmin, xmax)
- ax.set_ylim(ymin, ymax)
- ax.imshow(values3, cmap='jet', extent=[xmin, xmax, ymin, ymax],vmin=0,vmax=0.6)
- ax.set_xlabel('emission wavelength [nm]')
- ax.set_ylabel('excitation wavelength [nm]')
- plt.title('PLE map for ' + dataname)
- plt.savefig(dataname+'.png',dpi=150)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement