Skip to content

Commit

Permalink
Fix out of date warnings stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujay-Shankar committed May 15, 2024
1 parent 58cc002 commit 9e7100c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/gollum/precomputed_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def rotationally_broaden(self, vsini, u1=0.0, u2=0.0):
"""
lam0 = np.median(self.wavelength.value)
x2 = (299792.458 * (self.wavelength.value - lam0) / (lam0 * vsini)) ** 2
with catch_warnings(action="ignore", category=RuntimeWarning):
with catch_warnings():
filterwarnings("ignore", category=RuntimeWarning)
kernel = np.where(
x2 < 1,
np.pi / 2 * u1 * (1 - x2)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_phoenix.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def test_resample():
def test_grid():
"""Testing the PHOENIXGrid methods"""

with catch_warnings(action='ignore', category=DeprecationWarning):
with catch_warnings():
filterwarnings("ignore", category=DeprecationWarning)
grid = PHOENIXGrid(
teff_range=(5000, 5100), logg_range=(2, 2.5), Z_range=(0, 0.5), experimental=True, download=True
)
Expand Down

0 comments on commit 9e7100c

Please sign in to comment.