Page MenuHomec4science

libcris.py
No OneTemporary

File Metadata

Created
Mon, Nov 25, 15:39

libcris.py

import Ptools as pt
from numpy import *
Zcode = {}
Zcode[ 0.0001 ]= "z1m4"
Zcode[ 0.0003 ]= "z3m4"
Zcode[ 0.0010 ]= "z1m3"
Zcode[ 0.0030 ]= "z3m3"
Zcode[ 0.0060 ]= "z6m3"
Zcode[ 0.0080 ]= "z8m3"
Zcode[ 0.0100 ]= "z1m2"
Zcode[ 0.0140 ]= "zsun"
Zcode[ 0.0200 ]= "z2m2"
Mcode = {}
Mcode[ 1.30 ]= "m1p3"
Mcode[ 1.50 ]= "m1p5"
Mcode[ 2.00 ]= "m2p0"
Mcode[ 2.50 ]= "m2p5"
Mcode[ 3.00 ]= "m3p0"
def ReadTable(name):
f = open(name,'r')
lines = f.readlines()
lines = lines[1:]
f.close()
Elts = []
Masses = []
for line in lines:
line = line.split()
Elts.append(line[0])
Masses.append(float(line[3]))
Elts = array(Elts)
Masses = array(Masses)
return Elts,Masses

Event Timeline