# Path: pyneb/utils/misc.py
# def parseAtom(atom):
#     '''
#     Parses an atom label into the element and spectrum parts
#     '''
# 
#     iso = ''
#     elem = ''
#     spec = ''
#     cont = True
#     firstdigit = True
#     for l in atom:
#         if l.isalpha() and cont:
#             elem += l
#             firstdigit = False
#         elif l.isdigit():
#             if firstdigit:
#                 iso += l
#             else:
#                 spec += l
#                 cont = False
#     return iso+str.capitalize(elem), spec
# 
# def roman_to_int(input_):
#     """
#     Convert a roman numeral to an integer.
#     
#     >>> r = range(1, 4000)
#     >>> nums = [int_to_roman(i) for i in r]
#     >>> ints = [roman_to_int(n) for n in nums]
#     >>> print r == ints
#     1
#     
#     >>> roman_to_int('VVVIV')
#     Traceback (most recent call last):
#      ...
#     ValueError: input is not a valid roman numeral: VVVIV
# 
#     >>> roman_to_int(1)
#     Traceback (most recent call last):
#      ...
#     TypeError: expected string, got <type 'int'>
# 
#     >>> roman_to_int('a')
#     Traceback (most recent call last):
#      ...
#     ValueError: input is not a valid roman numeral: A
# 
#     >>> roman_to_int('IL')
#     Traceback (most recent call last):
#      ...
#     ValueError: input is not a valid roman numeral: IL
# 
#     """   
#     if type(input_) != type(""):
#         #raise TypeError, "expected string, got %s" % type(input_)
#         return None
#     input_ = input_.upper()
#     nums = ['M', 'D', 'C', 'L', 'X', 'V', 'I']
#     ints = [1000, 500, 100, 50, 10, 5, 1]
#     places = []
#     for c in input_:
#         if not c in nums:
#             #raise ValueError, "input is not a valid roman numeral: %s" % input_
#             return None
#     for i in range(len(input_)):
#         c = input_[i]
#         value = ints[nums.index(c)]
#         # If the next place holds a larger number, this value is negative.
#         try:
#             nextvalue = ints[nums.index(input_[i + 1])]
#             if nextvalue > value:
#                 value *= -1
#         except IndexError:
#             # there is no next place.
#             pass
#         places.append(value)
#     sum_ = 0
#     for n in places: sum_ += n
#     # Easiest test for validity...
#     if int_to_roman(sum_) == input_:
#         return sum_
#     else:
#         #raise ValueError, 'input is not a valid roman numeral: %s' % input_
#         return None


import numpy as np
import pyneb as pn
from .misc import parseAtom, roman_to_int
from glob import glob
from copy import deepcopy
    from .manage_atomic_data import getLevelsNIST
Z["Ti"] = 22
Z["V"] = 23
Z["Cr"] = 24
Z["Mn"] = 25
Z["Fe"] = 26
Z["Co"] = 27
Z["Ni"] = 28
Z["Cu"] = 29
Z["Zn"] = 30
Z["Ga"] = 31
Z["Ge"] = 32
Z["As"] = 33
Z["Se"] = 34
Z["Br"] = 35
Z["Kr"] = 36
Z["Rb"] = 37
Z["Sr"] = 38
Z["Y"] = 39
Z["Zr"] = 40
Z["Nb"] = 41
Z["Mo"] = 42
Z["Tc"] = 43
Z["Ru"] = 44
Z["Rh"] = 45
Z["Pd"] = 46
Z["Ag"] = 47
Z["Cd"] = 48
Z["In"] = 49
Z["Sn"] = 50
Z["Sb"] = 51

# Path: pyneb/utils/misc.py
# def parseAtom(atom):
#     '''
#     Parses an atom label into the element and spectrum parts
#     '''
# 
#     iso = ''
#     elem = ''
#     spec = ''
#     cont = True
#     firstdigit = True
#     for l in atom:
#         if l.isalpha() and cont:
#             elem += l
#             firstdigit = False
#         elif l.isdigit():
#             if firstdigit:
#                 iso += l
#             else:
#                 spec += l
#                 cont = False
#     return iso+str.capitalize(elem), spec
# 
# def roman_to_int(input_):
#     """
#     Convert a roman numeral to an integer.
#     
#     >>> r = range(1, 4000)
#     >>> nums = [int_to_roman(i) for i in r]
#     >>> ints = [roman_to_int(n) for n in nums]
#     >>> print r == ints
#     1
#     
#     >>> roman_to_int('VVVIV')
#     Traceback (most recent call last):
#      ...
#     ValueError: input is not a valid roman numeral: VVVIV
# 
#     >>> roman_to_int(1)
#     Traceback (most recent call last):
#      ...
#     TypeError: expected string, got <type 'int'>
# 
#     >>> roman_to_int('a')
#     Traceback (most recent call last):
#      ...
#     ValueError: input is not a valid roman numeral: A
# 
#     >>> roman_to_int('IL')
#     Traceback (most recent call last):
#      ...
#     ValueError: input is not a valid roman numeral: IL
# 
#     """   
#     if type(input_) != type(""):
#         #raise TypeError, "expected string, got %s" % type(input_)
#         return None
#     input_ = input_.upper()
#     nums = ['M', 'D', 'C', 'L', 'X', 'V', 'I']
#     ints = [1000, 500, 100, 50, 10, 5, 1]
#     places = []
#     for c in input_:
#         if not c in nums:
#             #raise ValueError, "input is not a valid roman numeral: %s" % input_
#             return None
#     for i in range(len(input_)):
#         c = input_[i]
#         value = ints[nums.index(c)]
#         # If the next place holds a larger number, this value is negative.
#         try:
#             nextvalue = ints[nums.index(input_[i + 1])]
#             if nextvalue > value:
#                 value *= -1
#         except IndexError:
#             # there is no next place.
#             pass
#         places.append(value)
#     sum_ = 0
#     for n in places: sum_ += n
#     # Easiest test for validity...
#     if int_to_roman(sum_) == input_:
#         return sum_
#     else:
#         #raise ValueError, 'input is not a valid roman numeral: %s' % input_
#         return None


# Path: pyneb/utils/physics.py
import numpy as np
import pyneb as pn
from .misc import parseAtom, roman_to_int
from glob import glob
from copy import deepcopy
    from .manage_atomic_data import getLevelsNIST

Z["Ti"] = 22
Z["V"] = 23
Z["Cr"] = 24
Z["Mn"] = 25
Z["Fe"] = 26
Z["Co"] = 27
Z["Ni"] = 28
Z["Cu"] = 29
Z["Zn"] = 30
Z["Ga"] = 31
Z["Ge"] = 32
Z["As"] = 33
Z["Se"] = 34
Z["Br"] = 35
Z["Kr"] = 36
Z["Rb"] = 37
Z["Sr"] = 38
Z["Y"] = 39
Z["Zr"] = 40
Z["Nb"] = 41
Z["Mo"] = 42
Z["Tc"] = 43
Z["Ru"] = 44
Z["Rh"] = 45
Z["Pd"] = 46
Z["Ag"] = 47
Z["Cd"] = 48
Z["In"] = 49
Z["Sn"] = 50
Z["Sb"] = 51

Z["Te"] = 52