基于大量的反复试验后的评论和加仔细阅读Miepython文档(!),我设法回答我的问题:
的问题,我没能重现散射和后向散射效率qsca美元和qback美元(或相应的横截面\σ美元在第一个情节从相位函数的值在第二个情节(更新)在我的问题:我有两个问题,或者更好地说有两个缺陷:
- 我做了一个等距\ vartheta美元向量并转换为μ= cos (\ vartheta)美元计算相位函数p(\μ)美元并绘制极坐标图和直方图,然后我试着集成(总结)。那是当然不工作$ \μ= cos (\ vartheta) $不再是等距的。现在我在做一个等距$ \μ= cos (\ vartheta) $向量计算和整合。因密谋反对\ vartheta美元我只是计算\ vartheta美元从\μ美元使用美元$ arccos ()。结果是non-equidistant据点的直方图,但分辨率足够高时,你看不到它. .
- 有miepython相位函数的正常化,这是默认设置为单一散射反照率美元= qsca / qext美元。之后总结(集成)qsca美元你需要乘qext美元。(但有其他选项可以通过Miepython正常化,默认是公正的qsca / qext美元…看到https://miepython.readthedocs.io/en/latest/03a_normalization.html)
这样,我可以复制的值qsca美元和qback美元在500纳米。这是代码:
进口numpy np进口miepython matplotlib进口。pyplot作为plt进口matplotlib matplotlib.rcParams.update({”字体。大小:10})# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #参数# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # m = 1.335 - 1 e-9j #复杂折射率水滴从https://refractiveindex.info/? 500海里货架=主要著作= H2O&page =恶魔- 24.0μc lambda0 = 0.5 #,即500 nm直径在μ= 1 # #气溶胶半径r = 0.5 *直径x = 2 * np。π* r / lambda0 #尺寸参数# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Miepython计算-计算散射效率#计算相位函数和情节极坐标图和直方图# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #μ= np.linspace(1, - 1, 100001) #μeqidistant和计算(情节)θ,而不是反之亦然(重要我们整合后的直方图,是μ的函数,所以μ需要等距简单总结- >集成)θ= np.arccos(μ)* 180 / np。π#计算灭绝,散射和后向散射效率qext500, qsca500, qback500, g2_500 = miepython.mie (m, x) #现在计算相位函数正常化=反照率的#默认反照率= qsca / qext,见https://miepython.readthedocs.io/en/latest/03a_normalization。html p_mu = miepython。i_unpolarized (m x,μ,正常化)# p_mu现在正常= qsca / qext #测试计算相位函数的替代方法:s1, s2 = miepython。mie_S1_S2 (m x,μ)阶段= (np.abs (s1) * * 2 + np.abs (s2) * * 2) / 2如果np。allclose (p_mu阶段):打印(p_mu和相位是相同的向量)#情节相函数极坐标图和直方图fig (ax₁, ax2) = plt.subplots (1、2、figsize = (5)) ax₁= plt。次要情节(121年,投影=“极地”)ax1.plot(θ/ 180 * np。π,p_mu颜色= ax₁“蓝”)。set_title (r是= ' + str (np.around (m, 9)) + ', d = ' + str(直径)+ r '\μ美元米,\λ美元= ' + str (np.around (1000 * lambda0, 0)) + r“纳米”)ax2 = plt.subplot (122) ax2。情节(θ,p_mu) ax2.set_xlabel (r '\ vartheta美元(^ \保监会美元)”)ax2。set_ylabel(“非偏振散射光(1 / sr)”) ax2。网格(= '小'颜色=“灰色”,线型= ':')ax2。网格(= '重大'颜色=“灰色”,线型= ':')ax2。set_title (r是= ' + str (np.around (m, 9)) + ', d = ' + str(直径)+ r '\μ美元米,\λ美元= ' + str (np.around (1000 * lambda0, 0)) + r“纳米”)plt.tight_layout () plt.show () fig.savefig(相位函数。png, dpi =无花果。dpi bbox_inches =“紧”)# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #现在集成直方图繁殖散射和后向散射效益# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #打印值比较打印(' qback500 = ' + str (qback500))打印(' qsca500 = ' + str (qsca500))打印(' qext500 = ' + str (qext500))打印(“qsca和qext几乎是相同的,因为几乎没有吸收(复折射率的虚部,所以灭绝(损失)主要是由散射…)”)打印(‘\ nNow计算散射相位函数的效率:“)#间距dmu的集成oben = np.abs(μ[1:])unten = np.abs(μ(:1))dmu = np.mean (np。abs (oben unten)打印(‘\ ndmu = + str (dmu))打印(dmu是间距μ= cos(θ)轴的)# qsca直方图:打印(“集成阶段的功能完整的立体角:“)打印(”——没有依赖方位,所以集成/方位为2 *π,其余集成/μ。”)打印(‘-集成/μ从1到1,即从θ= 0°- 180°的)integral_p_mu = 2 * np.pi * dmu * np.sum (p_mu)打印(p_mu直方图的积分= ' + str (integral_p_mu)) # qsca从这个,提醒,p_mu = qsca / qext正常化。因此,qsca,需要把获得的结果与qext:打印(‘\ nqsca计算相位函数= ' + str (integral_p_mu * qext500))打印(从physe \ nBackscattering效率计算函数)idx180 = np.where (np。abs(180 -θ)< 0.01)[0][0]#向后方向指数#再一次,我们需要乘以qext因为正常化#我们只使用阶段的180°的数据功能,但仍需要集成立体角,也只给了4 *π”)打印(“p_mu idx180 * qext500 * 4 * np。π= ' + str (p_mu [idx180] * qext500 * 4 * np.pi))
和我最初的问题的答案是:
- qsca美元在各个方向的总散射效率(集成在一个实心球的4 \π美元),即不仅向前头枕左右. .
- qback美元在向后散射方向的^ \保监会180美元只有一个方向,而不是整个后头枕左右…)