国产片侵犯亲女视频播放_亚洲精品二区_在线免费国产视频_欧美精品一区二区三区在线_少妇久久久_在线观看av不卡

腳本之家,腳本語言編程技術及教程分享平臺!
分類導航

Python|VBS|Ruby|Lua|perl|VBA|Golang|PowerShell|Erlang|autoit|Dos|bat|

服務器之家 - 腳本之家 - Python - Python光學仿真學習Gauss高斯光束在空間中的分布

Python光學仿真學習Gauss高斯光束在空間中的分布

2022-02-13 14:08微小冷 Python

這篇文章主要介紹了Python光學仿真學習中Gauss高斯光束在空間中的分布理解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪

Gauss光束強度的表達式為

Python光學仿真學習Gauss高斯光束在空間中的分布

如圖所示

Python光學仿真學習Gauss高斯光束在空間中的分布

左上圖和左下圖表示激光傳輸過程中的其束腰半徑的變化情況;右圖則表示高斯光束某一橫截面處激光的能量分布。

繪制代碼如下

import matplotlib.pyplot as plt
import numpy as np
def setLabel(ax,*args):
    ax.set_xlabel(args[0])
    ax.set_ylabel(args[1])
    if len(args)==3:
        ax.set_zlabel(args[2])
def drawGauss(w0=1,dWave=1.064):
    # 軸向坐標
    z = np.linspace(-10,10,1000).reshape(1000,1)
    # z處光斑半徑
    w = np.sqrt(w0**2+z**2*dWave**2/np.pi**2/w0**2)
    theta = np.linspace(0,np.pi*2,150).reshape(1,150)
    x = w*np.cos(theta)
    y = w*np.sin(theta)
    fig =  plt.figure()
    # 三維的高斯光束等功率密度面變化圖
    ax1 = fig.add_subplot(221,projection="3d")
    ax1.plot_surface(z,x,y)#,cmap=plt.get_cmap("rainbow"))
    ax1.set_title("waist shape changed by propagation")
    setLabel(ax1,"z","x","y")
    # 二維的高斯光束半徑變化圖
    ax3 = fig.add_subplot(223)
    ax3.plot(z,w,linewidth=1)
    ax3.plot(z,-w,linewidth=0.2)
    ax3.plot([z[0],z[-1]],[0,0],linewidth=0.5,linestyle=":")
    ax3.set_title("waist value changed by propagation")
    setLabel(ax3,"z","w")    
    # Gauss光束在束腰處的切片
    X,Y = np.meshgrid(np.linspace(-5,5,100),np.linspace(-5,5,100))
    Psi = np.exp(-(X**2+Y**2)/w0**2)/w0
    ax2 = fig.add_subplot(222,projection="3d")
    ax2.plot_surface(X,Y,Psi)
    ax2.set_title("Intensity distribution on waist0")
    setLabel(ax2,"x","y","Instensity")
    # Gauss光束在束腰處的徑向切片
    r = np.linspace(-5,5,200)
    Psi = np.exp(-r**2/w0**2)/w0
    ax4 = fig.add_subplot(224)
    ax4.plot(r,Psi)
    ax4.set_title("Intensity distribution on waist0")
    setLabel(ax4,"r","Instensity")
    plt.show()

如果沿著z軸方向,在不同的位置處對Gauss光束進行切片處理,則不同位置處徑向功率分布如圖所示

Python光學仿真學習Gauss高斯光束在空間中的分布

實現代碼如下

import matplotlib.animation as animation
def GaussGif1d(w0=1,dWave=1.064):
    zAxis = np.arange(100)
    # 軸向坐標
    z = np.linspace(0,10,100)
    # z處的束腰半徑
    w = np.sqrt(w0**2+z**2*dWave**2/np.pi**2/w0**2)
    x = np.linspace(-10,10,500)  
    fig = plt.figure()
    ax = fig.gca(xlim=(-5,5),ylim=(0,1))
    ax.grid()
    line, = ax.plot([],[])
    time_text = ax.text(0.1,0.9,"",transform=ax.transAxes)
    # 初始化圖像
    def init():
        line.set_data([],[])
        time_text.set_text("")
        return line, time_text    
    # 圖像迭代
    def animate(i):
        wi = w[i]
        Psi = np.exp(-x**2/wi**2)/wi
        line.set_data(x,Psi)
        time_text.set_text("z="+str(z[i]))
        return line, time_text
    ani = animation.FuncAnimation(fig, animate, zAxis,
        interval=200, init_func=init)
    ani.save("gauss.gif",writer="imagemagick")
    plt.show()

以上就是Python光學仿真學習Gauss高斯光束在空間中的分布的詳細內容,更多關于Python光學仿真Gauss高斯光束空間分布的資料請關注服務器之家其它相關文章!

原文鏈接:https://blog.csdn.net/m0_37816922/article/details/109896418

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 亚洲福利电影网 | 欧美日韩国产综合视频 | 久久久精品一区二区三区 | 黄色美女网站免费 | 一级二级在线观看 | 99国产精品| 婷婷91 | 午夜国产视频 | 精品在线一区二区 | 欧美日韩激情一区 | 久久高清片 | 午夜色播 | 久久久久久网站 | 人人人人澡人人爽人人澡 | 日本一区二区高清不卡 | 91精品国产一区二区 | 免费的av网站 | 久久国产精品99久久久久久老狼 | 国产尤物一区 | 欧美成人高清视频 | 亚洲少妇视频 | 国产精品久久久久久久久 | 国产精品国产 | 午夜社区| 欧美激情久久久 | 国产精品久久久久久久久久妞妞 | 激情久久久 | 精品亚洲永久免费精品 | 亚洲成av在线 | 三区在线| 日日夜夜综合 | 国产精品原创av片国产免费 | 天天操天天插 | 亚洲一区二区国产 | 中文字幕av一区二区三区 | 人人澡人人透人人爽 | 黄色一级免费大片 | 色爱综合网 | 在线一区 | a视频在线 | 午夜国产在线 |