Skip to content

Commit

Permalink
Set hc_in_ev_cm to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Dec 18, 2024
1 parent db8f0c2 commit 99ce646
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 20 deletions.
3 changes: 1 addition & 2 deletions artisatomic/groundstatesonlynist.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
from pathlib import Path

import pandas as pd
from astropy import constants as const

import artisatomic

hc_in_ev_cm = (const.h * const.c).to("eV cm").value
hc_in_ev_cm = 0.0001239841984332003


class EnergyLevel(t.NamedTuple):
Expand Down
7 changes: 1 addition & 6 deletions artisatomic/readboyledata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
from collections import namedtuple
from pathlib import Path

from astropy import constants as const

# from astropy import units as u


datafilepath = Path(os.path.dirname(os.path.abspath(__file__)), "..", "atomic-data-helium-boyle", "aoife.hdf5")

try:
Expand All @@ -18,7 +13,7 @@
filename_aoife_dataset = None


hc_in_ev_cm = (const.h * const.c).to("eV cm").value
hc_in_ev_cm = 0.0001239841984332003


def read_ionization_data(atomic_number, ion_stage):
Expand Down
4 changes: 1 addition & 3 deletions artisatomic/readcarsusdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
from collections import namedtuple
from pathlib import Path

from astropy import constants as const

import artisatomic

hc_in_ev_cm = (const.h * const.c).to("eV cm").value
hc_in_ev_cm = 0.0001239841984332003

gfall_reader: t.Any = None

Expand Down
3 changes: 1 addition & 2 deletions artisatomic/readdreamdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from pathlib import Path

import pandas as pd
from astropy import constants as const

import artisatomic

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


def init_dreamdata():
Expand Down
2 changes: 1 addition & 1 deletion artisatomic/readhillierdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
}

ryd_to_ev = u.rydberg.to("eV")
hc_in_ev_cm = (const.h * const.c).to("eV cm").value
hc_in_ev_cm = 0.0001239841984332003
hc_in_ev_angstrom = (const.h * const.c).to("eV angstrom").value
h_in_ev_seconds = const.h.to("eV s").value
lchars = "SPDFGHIKLMNOPQRSTUVWXYZ"
Expand Down
3 changes: 1 addition & 2 deletions artisatomic/readlisbondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
from collections import namedtuple

import pandas as pd
from astropy import constants as const

import artisatomic

# from astropy import units as u


hc_in_ev_cm = (const.h * const.c).to("eV cm").value
hc_in_ev_cm = 0.0001239841984332003


class LisbonReader:
Expand Down
2 changes: 1 addition & 1 deletion artisatomic/readnahardata.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

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

hc_in_ev_cm = (const.h * const.c).to("eV cm").value
hc_in_ev_cm = 0.0001239841984332003
hc_in_ev_angstrom = (const.h * const.c).to("eV angstrom").value
h_in_ev_seconds = const.h.to("eV s").value

Expand Down
2 changes: 1 addition & 1 deletion artisatomic/readqubdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

hc_in_ev_cm = (const.h * const.c).to("eV cm").value
hc_in_ev_cm = 0.0001239841984332003
hc_in_ev_angstrom = (const.h * const.c).to("eV angstrom").value
h_in_ev_seconds = const.h.to("eV s").value
lchars = "SPDFGHIKLMNOPQRSTUVWXYZ"
Expand Down
3 changes: 1 addition & 2 deletions artisatomic/readtanakajpltdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path

import pandas as pd
from astropy import constants as const
from xopen import xopen

import artisatomic
Expand All @@ -12,7 +11,7 @@

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


class EnergyLevel(t.NamedTuple):
Expand Down

0 comments on commit 99ce646

Please sign in to comment.