Skip to content

Commit

Permalink
verner issues
Browse files Browse the repository at this point in the history
  • Loading branch information
profxj committed Jul 29, 2016
1 parent 0edebfe commit 2cdb2a4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion linetools/abund/ions.py
Expand Up @@ -43,7 +43,7 @@ def ion_name(ion, flg=0, nspace=None):
Returns
-------
name : str
e.g. Si II, {\\rm Si}^{+}
e.g. SiII, {\\rm Si}^{+}
"""
if isinstance(ion,tuple):
Expand Down
Binary file modified linetools/data/lines/verner96_tab1.fits.gz
Binary file not shown.
25 changes: 18 additions & 7 deletions linetools/lists/parse.py
Expand Up @@ -13,7 +13,7 @@
from astropy.io import fits, ascii
from astropy.table import QTable, Column, Table, vstack

from ..abund import roman
from ..abund import roman, ions
from ..abund.elements import ELEMENTS

lt_path = imp.find_module('linetools')[1]
Expand Down Expand Up @@ -93,7 +93,7 @@ def line_data(nrows=1):

return ldict, tbl

#

def read_sets(infil=None):
""" Read sets file
Expand All @@ -113,7 +113,7 @@ def read_sets(infil=None):
# Return
return set_data

#

def read_euv():
""" read additional EUV lines
Expand All @@ -130,7 +130,8 @@ def read_euv():

# Return
return data
#


def read_H2():
""" Simple def to read H2 data
Expand Down Expand Up @@ -170,7 +171,7 @@ def read_H2():
# Return
return data

#

def read_CO():
""" Simple def to read CO UV data
Expand Down Expand Up @@ -212,7 +213,7 @@ def read_CO():
return data


#

def read_verner94():
""" Read Verner1994 Table
"""
Expand All @@ -239,7 +240,12 @@ def read_verner94():
row['Species'][0:2].strip() + row['Species'][2:].strip() +
' {:d}'.format(int(row['lambda'].value)))
#xdb.set_trace()

# name
names = []
for row in data:
ionnm = ions.ion_name((row['Z'], row['ion']))
names.append('{:s} {:d}'.format(ionnm, int(row['wrest'])))
data['name'] = names
# Finish
data['group'] = 1
data['Ref'] = 'Verner1994'
Expand Down Expand Up @@ -416,6 +422,10 @@ def parse_verner96(orig=False, write=False):
data[kk]['ion'] = int(line[2:4].strip())
# wrest
data[kk]['wrest'] = float(line[47:56].strip())
# name
ionnm = ions.ion_name((data[kk]['Z'], data[kk]['ion']))
data[kk]['name'] = '{:s} {:d}'.format(ionnm,
int(data[kk]['wrest']))
# Ej, Ek
data[kk]['Ej'] = float(line[59:73].strip())
data[kk]['Ek'] = float(line[73:89].strip())
Expand Down Expand Up @@ -910,6 +920,7 @@ def _write_ref_ISM_table():
produced to linetools/data/lines/ISM_table.fits inside the github
repository, and then check it in.
"""
from linetools.lists.linelist import LineList

ism = LineList('ISM', use_ISM_table=False)
strong = LineList('Strong', use_ISM_table=False)
Expand Down
2 changes: 1 addition & 1 deletion linetools/lists/sets/llist_v1.0.ascii
Expand Up @@ -14,7 +14,7 @@
| 507.7178 | HeI 507 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 508.6431 | HeI 508 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 509.9979 | HeI 509 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 515.6165 | HeI 515 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 515.6166 | HeI 515 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 522.2128 | HeI 522 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 533.5099 | NII 533 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 537.0296 | HeI 537 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Expand Down

0 comments on commit 2cdb2a4

Please sign in to comment.