Skip to content

Commit 99ce646

Browse files
committed
Set hc_in_ev_cm to constant
1 parent db8f0c2 commit 99ce646

9 files changed

+9
-20
lines changed

artisatomic/groundstatesonlynist.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
from pathlib import Path
55

66
import pandas as pd
7-
from astropy import constants as const
87

98
import artisatomic
109

11-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
10+
hc_in_ev_cm = 0.0001239841984332003
1211

1312

1413
class EnergyLevel(t.NamedTuple):

artisatomic/readboyledata.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
from collections import namedtuple
44
from pathlib import Path
55

6-
from astropy import constants as const
7-
8-
# from astropy import units as u
9-
10-
116
datafilepath = Path(os.path.dirname(os.path.abspath(__file__)), "..", "atomic-data-helium-boyle", "aoife.hdf5")
127

138
try:
@@ -18,7 +13,7 @@
1813
filename_aoife_dataset = None
1914

2015

21-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
16+
hc_in_ev_cm = 0.0001239841984332003
2217

2318

2419
def read_ionization_data(atomic_number, ion_stage):

artisatomic/readcarsusdata.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
from collections import namedtuple
44
from pathlib import Path
55

6-
from astropy import constants as const
7-
86
import artisatomic
97

10-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
8+
hc_in_ev_cm = 0.0001239841984332003
119

1210
gfall_reader: t.Any = None
1311

artisatomic/readdreamdata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from pathlib import Path
66

77
import pandas as pd
8-
from astropy import constants as const
98

109
import artisatomic
1110

@@ -16,7 +15,7 @@
1615
os.path.dirname(os.path.abspath(__file__)), "..", "atomic-data-dream", "DREAM_atomic_data_20241106-1325.h5"
1716
)
1817
dreamdata: pd.DataFrame | None = None
19-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
18+
hc_in_ev_cm = 0.0001239841984332003
2019

2120

2221
def init_dreamdata():

artisatomic/readhillierdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
}
202202

203203
ryd_to_ev = u.rydberg.to("eV")
204-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
204+
hc_in_ev_cm = 0.0001239841984332003
205205
hc_in_ev_angstrom = (const.h * const.c).to("eV angstrom").value
206206
h_in_ev_seconds = const.h.to("eV s").value
207207
lchars = "SPDFGHIKLMNOPQRSTUVWXYZ"

artisatomic/readlisbondata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
from collections import namedtuple
33

44
import pandas as pd
5-
from astropy import constants as const
65

76
import artisatomic
87

98
# from astropy import units as u
109

1110

12-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
11+
hc_in_ev_cm = 0.0001239841984332003
1312

1413

1514
class LisbonReader:

artisatomic/readnahardata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
ryd_to_ev = u.rydberg.to("eV")
1313

14-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
14+
hc_in_ev_cm = 0.0001239841984332003
1515
hc_in_ev_angstrom = (const.h * const.c).to("eV angstrom").value
1616
h_in_ev_seconds = const.h.to("eV s").value
1717

artisatomic/readqubdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
ryd_to_ev = u.rydberg.to("eV")
1414

15-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
15+
hc_in_ev_cm = 0.0001239841984332003
1616
hc_in_ev_angstrom = (const.h * const.c).to("eV angstrom").value
1717
h_in_ev_seconds = const.h.to("eV s").value
1818
lchars = "SPDFGHIKLMNOPQRSTUVWXYZ"

artisatomic/readtanakajpltdata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pathlib import Path
44

55
import pandas as pd
6-
from astropy import constants as const
76
from xopen import xopen
87

98
import artisatomic
@@ -12,7 +11,7 @@
1211

1312
# the h5 file comes from Andreas Floers's DREAM parser
1413
jpltpath = (Path(__file__).parent.resolve() / ".." / "atomic-data-tanaka-jplt" / "data_v1.1").resolve()
15-
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
14+
hc_in_ev_cm = 0.0001239841984332003
1615

1716

1817
class EnergyLevel(t.NamedTuple):

0 commit comments

Comments
 (0)