gollum icon indicating copy to clipboard operation
gollum copied to clipboard

test_phoenix.py produces warnings, and its operation is unclear

Open rhdtownsend opened this issue 9 months ago • 1 comments

When attempting to run test_phoenix.py, I get the following warnings:

(gollum_dev) townsend@laphroaig ~/devel/gollum/tests $ py.test -vs test_phoenix.py
============================================================== test session starts ===============================================================
platform darwin -- Python 3.12.3, pytest-8.2.0, pluggy-1.5.0 -- /Users/townsend/miniconda3/envs/gollum_dev/bin/python3.12
cachedir: .pytest_cache
rootdir: /Users/townsend/devel/gollum
configfile: pyproject.toml
plugins: anyio-4.3.0, asdf-3.2.0
collected 3 items                                                                                                                                

test_phoenix.py::test_spectrum PASSED
test_phoenix.py::test_resample PASSED
Processing Teff=5100K|log(g)=2.50|Z=+0.5: 100%|████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 111.64it/s]
PASSED

================================================================ warnings summary ================================================================
tests/test_phoenix.py::test_spectrum
  /Users/townsend/devel/gollum/src/gollum/precomputed_spectrum.py:117: RuntimeWarning: invalid value encountered in sqrt
    + np.sqrt(1 - x2) * (2 - 2 * u1 - 4 / 3 * u2 * u2 * x2),

tests/test_phoenix.py::test_spectrum
  /Users/townsend/devel/gollum/src/gollum/precomputed_spectrum.py:175: AstropyDeprecationWarning: The radial_velocity function is deprecated and may be removed in a future version.
          Use set_radial_velocity_to or shift_spectrum_to instead.
    shifted_spec.radial_velocity = rv * u.km / u.s

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================= 3 passed, 2 warnings in 2.60s ==========================================================

I'm guessing that gollum is automatically downloading a spectrum from the Phoenix server in Germany, but it's not clear where this spectrum is being placed. I had guessed it would be in ~/library/raw/PHOENIX, but there's nothing there. Can you clarify?

Review link: https://github.com/openjournals/joss-reviews/issues/6601

rhdtownsend avatar May 14 '24 15:05 rhdtownsend