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

Tutorial reduction_sequence_std_stars #414

Open
miguelglezb opened this issue May 10, 2024 · 6 comments
Open

Tutorial reduction_sequence_std_stars #414

miguelglezb opened this issue May 10, 2024 · 6 comments
Assignees
Labels
bug Something isn't working docs-tutorials

Comments

@miguelglezb
Copy link
Collaborator

First cell after

Corrections

fails because pykoala.mplstyle is not a valid package style.

@miguelglezb
Copy link
Collaborator Author

To avoid making a new issue, this problem is also present in tutorial create_combined_throughput

@PabloCorcho
Copy link
Member

This is a problem that @angelrls encountered in the past but I never got to fix. There seems to be a problem with a latex dependency within matplotlib. My guess is that lines 63 and 73 of src/plotting/pykoala.mplstyle are the ones responsible for this issue. Can you please have a look if by removing those the problem is solved?

@PabloCorcho PabloCorcho added the bug Something isn't working label May 10, 2024
@miguelglezb
Copy link
Collaborator Author

I fixed the problem by copying pykoala.mplstyle in ~/.local/lib/python3.10/site-packages/pykoala/plotting/. However, this worked because I installed pykoala in my machine with
pip install .
The problem is that the notebooks don't work unless I install pykoala locally due to issues when importing pykoala modules from relative paths.

There is two ways to fix this:

  • Installing locally and modifying the paths of pykoala.mplstyle (also of telluric_lines.txt that present the same error in the notebook) for consistency.
  • Not installing locally, but adding (where needed):
import sys
import os

sys.path.append('../')

There are pros and cons with each option, but I leave @PabloCorcho to decide which, if any, of these options is the most appropiate for this.

@PabloCorcho
Copy link
Member

I duplicate this comment from #415 :

I have created a branch that includes the mplstyle in the MANIFEST.in file, so it is also included during the installation. Hopefully this solves this issue. @miguelglezb could you please try it in your environment?

@miguelglezb
Copy link
Collaborator Author

Yes, that fixes it. However the tutorial still fails because it can't find input_data/sky_lines/telluric_lines.txt. I suspect this is caused by issues with pykoala/corrections/sky.py in line 632 (relative paths?)

@miguelglezb
Copy link
Collaborator Author

In last cell of the notebook, there is no key 'response', maybe use results['HILT600']['response_fig']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs-tutorials
Projects
None yet
Development

No branches or pull requests

2 participants