コード例 #1
0
gamma_ave = gamma.mean()
sig_gamma = gamma.std()
gamma0 = gamma[0]
delta_gamma = gamma0 - gamma_ave
'''

for i in range(10800, 10801):

    iter = 10800  #ts_laser.iterations[factor*i]
    print('Iteration:%d' % iter)

    #fig, ax = plt.subplots()

    Elaser, ElaserInfo = ts_laser.get_laser_envelope(iteration=iter,
                                                     pol='x',
                                                     m='all',
                                                     index='all',
                                                     plot=True)
    #freq_filter=0
    ElaserSlice, ElaserSliceInfo = ts_laser.get_laser_envelope(iteration=iter,
                                                               pol='x',
                                                               slicing_dir='y',
                                                               theta=0)

    #fig=plt.imshow(Elaser)

    #ax.imshow(Elaser, aspect='auto',zorder=0)
    plt.savefig('test2%09i.png' % (iter), bbox_inches='tight', dpi=100)
    #plt.plot(ElaserSlice)
    #plt.close()
    ax = plt.gca()
# Setting factor=2 will process every other file and so on.
factor = 1
a0PerSnapshot=[]
PulsewaistPerSnapshot=[]
PulselengthPerSnapshot=[]
EzMinPerSnapshot=[]
MaxFrequencyTrailingPulse=[]


#for i in range(0,int(ts_laser.iterations.size/factor)):    
for i in range(10800,10801): 
    iter =10800
    #iter = ts_laser.iterations[factor*i]
    print('Iteration:%d' %iter)
    
    Elaser=ts_laser.get_laser_envelope(iteration=iter, pol='x',m='all',index='all', plot=True); #freq_filter=0
    plt.savefig('%s/LaserEvelope_Iteration%09i.png' %(Path+'/LaserEnvelope', iter), bbox_inches='tight')
    plt.close()

    #1D Outline of laser envelope
    ElaserSlice=ts_laser.get_laser_envelope(iteration=iter, pol='x',slicing_dir='y',theta=0, plot=True);
    plt.savefig('%s/LineoutLaserEvelope_Iteration%09i.png' %(Path+'/LaserEnvelope/Lineout', iter), bbox_inches='tight')
    plt.close()
 


    Laser3D,Laser3DInfo=ts_laser.get_laser_envelope(iteration=iter, pol='x',m='all',index='all', plot=True);

    print(Laser3D)
    print(Laser3DInfo.z)
    print(Laser3DInfo.z[0])