def S_eta(L_vec, c2_val):
c2 = c2_val
traj = np.zeros([x_ang.shape[0]*2+1,L_vec.shape[0]])
n=0
for L in L_vec:
slope = (m*(m+1)+c2-L)/(m+1)/2.
z0 = [1+step*slope,slope]
z = odeint(f,z0,x_ang,args=(c2,L,m))
temp=1-pow(x_ang,2.0)
temp=pow(temp,m/2.)
zz=temp*z[:,0]
first_zz = np.array([1])
zz=np.append(first_zz, zz)
sloper = -(m*(m+1)+c2-L)/(m+1)/2.
z0r = [1-step*sloper,sloper]
zr = odeint(f,z0r,x_angr,args=(c2,L,m))
zzr=temp*zr[:,0]
zzr=np.append(first_zz, zzr)
traj[:,n] = np.append(zz,zzr[::-1][1:])
n += 1
x_tot = np.arange(-1,1.+step,step)
figure = plt.figure(figsize=(12, 11))
plt.plot(x_tot,traj, linewidth=2.0, label = '')
plt.ylabel('S($\\eta$)')#, fontdict=font)
plt.xlabel('$\\eta$')#, fontdict=font)
#plt.xlim(-1.0,1.0)
#plt.ylim(0.3,1.0)
plt.locator_params(axis='x', nbins=10)
plt.locator_params(axis='y', nbins=10)
plt.tick_params(axis='x', pad=15)
#plt.legend(loc=1)
plt.show()
plt.close()
评论列表
文章目录