#plt.plot(R,pot(R)/pot(0)) phigrid=np.linspace(0.001,1,int(2**9+1)) pgrid=pot_pl(R,1,1)#+pot_pl(R,10,5) dgrid=dens_pl(R,1,1) pgrid=pgrid/np.max(pgrid) dgrid=dgrid/np.max(dgrid) print(R) print(dgrid) e,fe=df_isotropic(dgrid,pgrid) #_,_,dff=nip(dgrid,pgrid) fig=plt.figure() ax1=fig.add_axes((0.1,0.5,0.8,0.45)) ax2=fig.add_axes((0.1,0.3,0.8,0.2)) ax3=fig.add_axes((0.1,0.1,0.8,0.20)) ax1.set_xticklabels([]) ax1.set_ylabel(r'$\tilde{f}(\tilde{\epsilon})$',fontsize=18) ax1.yaxis.set_tick_params(labelsize=15) ax2.set_xticklabels([])
Rplot = np.linspace(0, 10, 1000) e = np.logspace(np.log10(0.001), np.log10(1), 512) #plt.plot(R,dens(R)/dens(0)) #plt.plot(R,pot(R)/pot(0)) phigrid = np.linspace(0.001, 1, int(2**9 + 1)) pgrid = pot_pl(R, 1, 1) #+pot_pl(R,10,5) dgrid = dens_pl(R, 1, 1) pgrid = pgrid / np.max(pgrid) dgrid = dgrid / np.max(dgrid) print(R) print(dgrid) e, fe = df_isotropic(dgrid, pgrid) #_,_,dff=nip(dgrid,pgrid) fig = plt.figure() ax1 = fig.add_axes((0.1, 0.5, 0.8, 0.45)) ax2 = fig.add_axes((0.1, 0.3, 0.8, 0.2)) ax3 = fig.add_axes((0.1, 0.1, 0.8, 0.20)) ax1.set_xticklabels([]) ax1.set_ylabel(r'$\tilde{f}(\tilde{\epsilon})$', fontsize=18) ax1.yaxis.set_tick_params(labelsize=15) ax2.set_xticklabels([]) ax2.yaxis.set_ticks([0, 0.001, 0.002]) ax2.yaxis.tick_right() ax2.yaxis.set_ticks_position('both')
return c*(a+b) R=np.logspace(np.log10(3E-3),np.log10(300),512) dens,mass,pot=henrquist(R) dens=dens/np.max(dens) mass=mass/np.max(mass) pot=pot/np.max(pot) ''' plt.plot(R,dens) plt.plot(R,pot) plt.xlim(0,1) ''' e,df=df_isotropic(dens,pot) dff=UnivariateSpline(e[::-1],df[::-1],k=1,s=0) dft=df_h(pot) plt.plot(e,np.log(dff(e)/dff(0.3)),label='P') plt.plot(e,np.log(dft/df_h(0.3)),label='T') #plt.plot(pot,np.log(dff),label='F') ''' ee=np.logspace(np.log10(0.0001),np.log10(0.997),512) dft=df_h(ee) dft=dft/np.max(dft) plt.plot(ee,np.log(dft),label='T-e=0.997')