Skip to content

Commit

Permalink
Test the radiative transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
AWehrhahn committed Mar 9, 2021
1 parent 0c79c40 commit 6c9aff4
Show file tree
Hide file tree
Showing 3 changed files with 600 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@ src/eos/eos_math_special.c
src/eos/eos.c
src/sme/hlinop.c
src/sme/hlinprof.c
debug_radiative_transfer.npz
26 changes: 13 additions & 13 deletions test/sme_synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ def InputLineList(self, linelist):
names of the elements (with Ionization level)
"""
try:
atomic = linelist.atomic.T
species = linelist.species
atomic = linelist["atomic"].T
species = linelist["species"]
except AttributeError:
raise TypeError("linelist has to be a LineList type")

nlines = len(linelist)
nlines = 1
species = np.asarray(species, "U8")

assert (
Expand Down Expand Up @@ -265,16 +265,16 @@ def InputModel(self, teff, grav, vturb, atmo):
raise ValueError("Turbulence velocity must be positive or zero")

try:
motype = atmo.depth
motype = atmo["depth"]
depth = atmo[motype]
ndepth = len(depth)
t = atmo.temp
xne = atmo.xne
xna = atmo.xna
rho = atmo.rho
t = atmo["temp"]
xne = atmo["xne"]
xna = atmo["xna"]
rho = atmo["rho"]
vt = np.full(ndepth, vturb) if np.size(vturb) == 1 else vturb
wlstd = atmo.wlstd
opflag = atmo.opflag
wlstd = atmo["wlstd"]
opflag = atmo["opflag"]
args = [
ndepth,
teff,
Expand All @@ -291,9 +291,9 @@ def InputModel(self, teff, grav, vturb, atmo):
]
type = "sdddusdddddd" # s : short, d: double, u: unicode (string)

if atmo.geom == "SPH":
radius = atmo.radius
height = atmo.height
if atmo["geom"] == "SPH":
radius = atmo["radius"]
height = atmo["height"]
motype = "SPH"
args = args[:5] + [radius] + args[5:] + [height]
type = type[:5] + "d" + type[5:] + "d"
Expand Down
Loading

0 comments on commit 6c9aff4

Please sign in to comment.