Skip to content

Commit

Permalink
fixed some of the nist data
Browse files Browse the repository at this point in the history
  • Loading branch information
wkerzendorf committed Nov 14, 2012
1 parent ed2837e commit 1ac064c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tardis/tests/data/nist_si2.dat
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-------------------------------------------------------------------------------------------------------------------------
Configuration | Term | J | Level | Leading percentages | Reference
----------------------|--------|------|---------------------------|------------------------------------------|-----------
| | | | |
3s2.3p | 2P* | 1/2 | 0.00000 | 94 : 3 3p3 2P* | L5815
| | 3/2 | 0.035613 | 94 : 3 3p3 2P* |
| | | | |
Expand Down Expand Up @@ -144,4 +148,4 @@
3s.3p.(3P*).4p | 4D | 1/2 | 16.33924 | |
| | 3/2 | 16.348795 | |
| | 5/2 | 16.364432 | |
| | 7/2 | 16.386035 | |
| | 7/2 | 16.386035 | |
8 changes: 7 additions & 1 deletion tardis/tests/data/nist_si3.dat
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
----------------------------------------------------------------------------------------------------------------------
Configuration | Term | J | Level | Leading percentages | Reference
--------------------|-----------|-----|----------------------------|--------------------------------------|-----------
| | | | |
2p6.3s2 | 1S | 0 | 0.00000 | 95 : 5 3p2 1S | L5815
| | | | |
3s.3p | 3P* | 0 | 6.537028 | |
Expand Down Expand Up @@ -266,4 +270,6 @@
| | | | |
3p.4d | 1D*? | 2 | 33.163771 | |
| | | | |
3p.4d | 3F*? | 4 | 33.188892 |
3p.4d | 3F*? | 4 | 33.188892 | |
| | 2 | | |
| | 3 | | |
15 changes: 14 additions & 1 deletion tardis/tests/test_plasma.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,25 @@
from ..import atomic, plasma
from numpy import testing
import pytest
from astropy import units
import numpy as np
from astropy import units, table

atom_model = atomic.AtomData.from_hdf5()

fe_mass = atom_model._atom[25]['mass']


def read_nist_data(fname):
data = np.genfromtxt(fname, skip_header=3, delimiter='|', usecols=(2, 3),
converters={3: lambda s: float(s.strip().strip('?[]'))}, names=('j', 'energy'))
table.Table(data)


nist_si1 = read_nist_data('data/nist_si1.dat')
nist_si2 = read_nist_data('data/nist_si2.dat')
nist_si3 = read_nist_data('data/nist_si3.dat')


@pytest.mark.parametrize(("abundances", "abundance_fraction_fe"), [
(dict(Fe=0.5, Ni=0.5), 0.5),
(dict(Fe=1., Ni=0.5), 1. / 1.5)
Expand Down

0 comments on commit 1ac064c

Please sign in to comment.