Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85261961
pycool_plot_cooling_from_hdf5_bis
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Sep 27, 21:07
Size
861 B
Mime Type
text/x-python
Expires
Sun, Sep 29, 21:07 (2 d)
Engine
blob
Format
Raw Data
Handle
21151009
Attached To
rGEAR Gear
pycool_plot_cooling_from_hdf5_bis
View Options
#!/usr/bin/env python
from numpy import *
import PyCool.compute_lambda_interface as cl
import sys
import Ptools as pt
# read tables
cl.updateCoolingTable();
nHe = 0.16
rho_H = 0.2
#z = 8. # redshift ???? not used !!!
metalicity = 0.01; #
Z_s = arange(0,20,0.1)
Lambda_n_s = zeros(len(Z_s),float32)
T = 1e5
for i,Z in enumerate(Z_s):
cl.SetRedshift(Z)
cl.checkRedshiftForUpdate();
Lambda_n_s[i] = fabs(cl.computeLambda(rho_H, T, nHe, metalicity))
print " ",i,T,Lambda_n_s[i]
########################################################################
# plot
########################################################################
import Ptools as pt
pt.axis([0,20,-30,-20])
pt.xlabel('Z')
pt.ylabel('log Lambda/nH2')
pt.plot(Z_s,log10(Lambda_n_s))
#pt.legend(loc=4)
pt.show()
cl.freeMemory();
Event Timeline
Log In to Comment