我试图绘制相对于光子能量 的横截面,但对于在同一轴上
在哪里
e
是最终态和基态的能量,并且
这是我在 Python 中解决这个问题的尝试:
from scipy.integrate import quad
import numpy as np
from scipy.special import gamma
from scipy.constants import pi, alpha
import matplotlib.pyplot as plt
#Constants
epsilon = 13.1 #dielectric constant of the material
gamma_C = 0.5 # donor impurity linewidth
nr = 3.2 #refractive index of semiconductor
m = 0 # magnetic number
flux = 0 # Phi in eqn 8 magnetic flux
R = 5 #radius of the qunatum ring in nm
r = np.linspace(0, 6 * R)
rho = r / R
m_0 = 0.0067*0.511 # electron effective mass
h = 4.13e-15 # Planck constant in eV
hbar = 6.58e-16 # reduced Planck constant in eV
#Photon energy
h_ni = np.linspace(0, 100/h) #in eV
#Function that calculates the integrand
def func(rho, gama):
beta = np.sqrt((m - flux)**2 + gama**4/4)
return ((gama * rho)**2*beta * np.exp(-1/2*(gama * rho)**2)
* (gama * rho)**2/2 )
def cross_section(h_ni, gama):
#function that calculates the photoionisation cross sectio
beta = np.sqrt((m - flux)**2 + gama**4/4)
Ei = gama**2*(1+beta)-gama**4/2
Ef = gama**2*(3+beta)-gama**4/2
return ((nr/epsilon) * 4*pi/3 * alpha * h_ni *
R ** 2 / (2**beta * gamma(beta + 1)) *
abs(quad(func, 0, np.infty))**2 *
hbar*gamma_C/(((Ef-Ei-h_ni))**2 + ( hbar*gamma_C)**2))
#Plot
plt.figure();plt.clf()
for gama in [1.0, 1.5, 2.0]:
plt.plot(h_ni, cross_section(h_ni, gama))
但我收到以下错误
TypeError: func() missing 1 required positional argument: 'gama'
我该如何解决这个问题?欢迎任何帮助。