atom_py¶
This library is a superclass of Helita. Helita documentation can be found http://helita.readthedocs.io/en/latest/index.html
EbysusData class¶
ebysus.py includes the EbysusData class (among others) which is needed for atom_tools.
BifrostData class¶
bifrost.py includes the EbysusData class (among others) which is needed for atom_tools.
atom_tools class¶
Reads and handles data from atom files in Ebysus format.
[8]:
from br_py import atom_tools as at
[9]:
# The following creates from a Bifrost models to MFMS atmosphere in statistical equillibrium.
elements=['h','he']
atomfiles=['H_2.atom','He_2.atom']
nlevels=[2,2]
#density = 1.10e-8 # g/cm3
ntot = 1e10
units = u()
dd=br.BifrostData('rootname',snap=7)
rho= dd.get_var('r',snap=7)*units.u_r
Temp= dd.get_var('tg',mf_ispecies=1,mf_ilevel=2,snap=7)
popco=at.pop_over_species_atomf([rho/units.m_H*units.mu],[Temp],atomfiles=atomfiles,GENCOL_KEY='voronov',threebody=True)
for isp in range(0,2):
heat=at.atom_tools(atom_file=atomfiles[isp])
atomweight = heat.params['weight']*u.AMU.value
nlevel = heat.params['nk']
for i in range(0,nlevel):
if (isp == 0):
popc = popco['h'][0,:,0,:,i]
else:
popc = popco['he'][0,:,0,:,i]