def CoreShellScatteringFunction(mCore,mShell,wavelength,dCore,dShell,minAngle=0, maxAngle=180, angularResolution=0.5, normed=False):
# http://pymiescatt.readthedocs.io/en/latest/forwardCS.html#CoreShellScatteringFunction
xCore = np.pi*dCore/wavelength
xShell = np.pi*dShell/wavelength
theta = np.linspace(minAngle,maxAngle,int((maxAngle-minAngle)/angularResolution))*np.pi/180
thetaSteps = len(theta)
SL = np.zeros(thetaSteps)
SR = np.zeros(thetaSteps)
SU = np.zeros(thetaSteps)
for j in range(thetaSteps):
u = np.cos(theta[j])
S1,S2 = CoreShellS1S2(mCore,mShell,xCore,xShell,u)
SL[j] = (np.sum((np.conjugate(S1)*S1))).real
SR[j] = (np.sum((np.conjugate(S2)*S2))).real
SU[j] = (SR[j]+SL[j])/2
if normed:
SL /= np.max(SL)
SR /= np.max(SR)
SU /= np.max(SU)
return theta,SL,SR,SU
评论列表
文章目录