Skip to content

Commit

Permalink
Updated pyproject.toml, adjusted unit tests after updated AMES-Cond/D…
Browse files Browse the repository at this point in the history
…usty grids
  • Loading branch information
tomasstolker committed Oct 7, 2024
1 parent b3fcce9 commit 1187de3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Repository = "https://github.com/tomasstolker/species"
Issues = "https://github.com/tomasstolker/species/issues"

[tool.setuptools]
packages = []
packages = ["species"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
Expand Down
12 changes: 6 additions & 6 deletions species/plot/plot_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,16 @@ def plot_cooling(
ax[i].set_xlabel("Age (Myr)", fontsize=13)

if cooling_param == "luminosity":
ax[i].set_ylabel("$\log(L/L_\odot)$", fontsize=13)
ax[i].set_ylabel(r"$\log(L/L_\odot)$", fontsize=13)

elif cooling_param == "radius":
ax[i].set_ylabel("Radius ($R_\mathrm{J}$)", fontsize=13)
ax[i].set_ylabel(r"Radius ($R_\mathrm{J}$)", fontsize=13)

elif cooling_param == "teff":
ax[i].set_ylabel("$T_\mathrm{eff}$ (K)", fontsize=13)
ax[i].set_ylabel(r"$T_\mathrm{eff}$ (K)", fontsize=13)

elif cooling_param == "logg":
ax[i].set_ylabel("$\log\,g$", fontsize=13)
ax[i].set_ylabel(r"$\log\,g$", fontsize=13)

if xlim is not None:
ax[i].set_xlim(xlim[0], xlim[1])
Expand Down Expand Up @@ -471,9 +471,9 @@ def plot_isochrones(
ax[i].xaxis.set_minor_locator(AutoMinorLocator(5))

if i == n_planets - 1:
ax[i].set_xlabel("Mass ($M_\\mathrm{J}$)", fontsize=13)
ax[i].set_xlabel(r"Mass ($M_\mathrm{J}$)", fontsize=13)

ax[i].set_ylabel("$\\log(L/L_\\odot)$", fontsize=13)
ax[i].set_ylabel(r"$\log(L/L_\odot)$", fontsize=13)

ax[i].set_xscale(xscale)
ax[i].set_yscale(yscale)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_read/test_isochrone.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ def test_get_color_magnitude(self):
assert colormag_box.magnitude.shape == (10,)

assert np.sum(colormag_box.color) == pytest.approx(
2.5273839990069202, rel=self.limit, abs=0.0
2.5462019923597694, rel=self.limit, abs=0.0
)

assert np.sum(colormag_box.magnitude) == pytest.approx(
109.43143567522718, rel=self.limit, abs=0.0
109.47573797323406, rel=self.limit, abs=0.0
)

assert np.sum(colormag_box.mass) == pytest.approx(
Expand All @@ -111,11 +111,11 @@ def test_get_color_color(self):
assert colorcolor_box.color2.shape == (10,)

assert np.sum(colorcolor_box.color1) == pytest.approx(
2.5273839990069202, rel=self.limit, abs=0.0
2.5462019923597694, rel=self.limit, abs=0.0
)

assert np.sum(colorcolor_box.color2) == pytest.approx(
3.372082948643385, rel=self.limit, abs=0.0
3.389656823597827, rel=self.limit, abs=0.0
)

assert np.sum(colorcolor_box.mass) == pytest.approx(
Expand Down
12 changes: 6 additions & 6 deletions tests/test_read/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_get_model(self):
92.26773310928259, rel=self.limit, abs=0.0
)
assert np.sum(model_box.flux) == pytest.approx(
1.6860901110289526e-12, rel=self.limit, abs=0.0
1.6945971163643736e-12, rel=self.limit, abs=0.0
)

model_box = read_model.get_model(
Expand All @@ -65,7 +65,7 @@ def test_get_model(self):
92.26773310928259, rel=self.limit, abs=0.0
)
assert np.sum(model_box.flux) == pytest.approx(
649.430993208349, rel=self.limit, abs=0.0
648.9049503923534, rel=self.limit, abs=0.0
)

def test_get_data(self):
Expand All @@ -76,24 +76,24 @@ def test_get_data(self):
92.26773310928259, rel=self.limit, abs=0.0
)
assert np.sum(model_box.flux) == pytest.approx(
1.6863709658488778e-12, rel=self.limit, abs=0.0
1.6950143880366162e-12, rel=self.limit, abs=0.0
)

def test_get_flux(self):
read_model = ReadModel("ames-cond", filter_name="Paranal/NACO.H")
flux = read_model.get_flux(self.model_param)

assert flux[0] == pytest.approx(3.4861363676916346e-14, rel=self.limit, abs=0.0)
assert flux[0] == pytest.approx(3.447662507191274e-14, rel=self.limit, abs=0.0)

def test_get_magnitude(self):
read_model = ReadModel("ames-cond", filter_name="Paranal/NACO.H")
magnitude = read_model.get_magnitude(self.model_param)

assert magnitude[0] == pytest.approx(
11.292257422183816, rel=self.limit, abs=0.0
11.304306485835093, rel=self.limit, abs=0.0
)
assert magnitude[1] == pytest.approx(
11.292257422183816, rel=self.limit, abs=0.0
11.304306485835093, rel=self.limit, abs=0.0
)

def test_get_bounds(self):
Expand Down

0 comments on commit 1187de3

Please sign in to comment.