In [1]:
def plot(case,loc):
files = map(lambda f:'io_files/'+case+f,['inv-focus@0.npy','inv-focus@'+loc+'.npy'])
legends = ['focus a0 before entrance','focus a0 inside']
pyplot.figure(figsize=(18, 6))
pyplot.xlabel('layer number',fontsize=20)
pyplot.ylabel('population inversion',fontsize=20)
data = map(np.load,files)
for j in range(len(data)):
pyplot.plot(data[j][:,0],data[j][:,1],'o-')
#pyplot.bar(data[j][:,0],data[j][:,1],width=1.0)
#legends[j] += str("{:7.4f}".format(sum(data[j][1:50])/sum(data[j][100:150])))
pyplot.legend(legends,fontsize=22)
pyplot.show()
#return data
locations = ['10', '50','90','125','160','190']
for loc in locations:
plot('1600nm-150nm-alt-025nm-central/',loc)
#plot('1600nm-150nm-alt-05nm-central/',loc)
In [ ]: