Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOSS Review - Need local paths for PHOENIXSpectrum in Masking notebook #108

Closed
wtgee opened this issue Apr 28, 2022 · 4 comments
Closed

Comments

@wtgee
Copy link

wtgee commented Apr 28, 2022

My first run of this notebook was missing gollum as it's only listed in the docs/requirements.txt file, which is fine. I installed with pip install gollum (I didn't use the full docs/requirements.txt because I didn't want to bother with sphinx, etc.).

After pip install I get the following exception on run:

In [7]: native_template = PHOENIXSpectrum(teff=9600, logg=5.0).normalize()

---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Input In [7], in <cell line: 1>()
----> 1 native_template = PHOENIXSpectrum(teff=9600, logg=5.0).normalize()

File ~/miniforge3/envs/muler_dev/lib/python3.8/site-packages/gollum/phoenix.py:72, in PHOENIXSpectrum.__init__(self, teff, logg, metallicity, path, wl_lo, wl_hi, *args, **kwargs)
     70 if (teff is not None) & (logg is not None):
     71     base_path = os.path.expanduser(path)
---> 72     assert os.path.exists(
     73         base_path
     74     ), "You must specify the path to local PHOENIX models"
     76     wl_filename = base_path + "/WAVE_PHOENIX-ACES-AGSS-COND-2011.fits"
     77     assert os.path.exists(
     78         wl_filename
     79     ), "You need to place the PHOENIX models in {}".format(base_path)

AssertionError: You must specify the path to local PHOENIX models

Looks like a hard-coded path in gollum here:

https://github.com/BrownDwarf/gollum/blob/main/src/gollum/phoenix.py#L66

Edit: this also prevents me from running the Telluric correction and Masking plus notebooks.

@gully
Copy link
Member

gully commented Apr 29, 2022

Thank you for this feedback, I will get these notebooks working by updating the guidance on the hard-coded paths.

@gully
Copy link
Member

gully commented May 4, 2022

Woohoo! I have solved this issue in a slick way--- I just released gollum v0.2.0 which introduces a new download=True option for the PHOENIX synthetic spectral models. Now muler newcomers and cloud-based venues like readthedocs can easily fetch a PHOENIX model without having to download and store the voluminous model grid locally. Yay!

@gully gully closed this as completed in c4ee2e8 May 4, 2022
@wtgee
Copy link
Author

wtgee commented May 4, 2022

Great! I'll take a look later today and get review finished up.

@gully
Copy link
Member

gully commented May 4, 2022

Just a followup here, a bug had prevented this from actually working, it should be fine now though! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants