Examples with the SolarAbund Class (v1.1)¶
Download
this notebook.
# import
from linetools.abund import solar as labsol
Init¶
sol = labsol.SolarAbund()
Loading abundances from Asplund2009
Abundances are relative by number on a logarithmic scale with H=12
sol
<SolarAbund: Asplund2009>
Usage¶
# Simple calls
print(sol['C'])
print(sol[6])
8.43
8.43
# Ratio
print(sol.get_ratio('C/Fe'))
0.98
# Multiple calls
print(sol[6,12,'S'])
[ 8.43 7.53 7.15]
Bits and pieces¶
from linetools.abund import ions as laions
# Ion name
laions.ion_name((6,2))
'CII'
# Name to ion
laions.name_ion('CII')
(6, 2)
from linetools.abund.elements import ELEMENTS
ele = ELEMENTS['C']
ele.eleconfig_dict
{(1, 's'): 2, (2, 'p'): 2, (2, 's'): 2}