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 compare_with_external_photo #413

Closed
miguelglezb opened this issue May 10, 2024 · 8 comments
Closed

Tutorial compare_with_external_photo #413

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

Comments

@miguelglezb
Copy link
Collaborator

Cannot unpack the output (tuple?) in argument np.unravel_index(i, sampling[0].shape) in:
sampling[:2, *np.unravel_index(i, sampling[0].shape)] = (

Every cell after this fails because of this issue.

@PabloCorcho
Copy link
Member

PabloCorcho commented May 10, 2024

I could not find any issue with the current version on main of this tutorial. Can you post which line of code is generating the error?

@PabloCorcho PabloCorcho added bug Something isn't working docs-tutorials labels May 14, 2024
@miguelglezb
Copy link
Collaborator Author

This happens in the fourth cell and can be traced back to pykoala/corrections/external_data.py in line 107:

                ^
SyntaxError: invalid syntax

@PabloCorcho
Copy link
Member

This issue should be fixed by now. @miguelglezb can you confirm that you do not have any problem when using the latest version of main?

@PabloCorcho
Copy link
Member

If so, please close the issue 😄

@miguelglezb
Copy link
Collaborator Author

Still having the same issue, even with the latest version of main:


  File ~/koala/venv_koala/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3577 in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  Cell In[20],   [line 1](vscode-notebook-cell:?execution_count=20&line=1)
    from pykoala.corrections.external_data import AncillaryDataCorrection

  File ~/koala/venv_koala/lib/python3.10/site-packages/pykoala/corrections/external_data.py:107
    sampling[:2, *np.unravel_index(i, sampling[0].shape)] = (
                 ^
SyntaxError: invalid syntax

@PabloCorcho
Copy link
Member

There was a compatibility issue between python3.11 and 3.10. I have fixed that in #425

@miguelglezb
Copy link
Collaborator Author

Notebook still failing but in fifth cell:

File ~/koala/venv_koala/lib/python3.10/site-packages/pykoala/corrections/external_data.py:387, in AncillaryDataCorrection.get_dc_aperture_fluxes(self, filter_names, dc_intensity_units, aperture_diameter, sample_every)
    [386](https://file+.vscode-resource.vscode-cdn.net/home/mbolivar/koala/tutorials/~/koala/venv_koala/lib/python3.10/site-packages/pykoala/corrections/external_data.py:386) try:
--> [387](https://file+.vscode-resource.vscode-cdn.net/home/mbolivar/koala/tutorials/~/koala/venv_koala/lib/python3.10/site-packages/pykoala/corrections/external_data.py:387)     from pst.observables import Filter
    [388](https://file+.vscode-resource.vscode-cdn.net/home/mbolivar/koala/tutorials/~/koala/venv_koala/lib/python3.10/site-packages/pykoala/corrections/external_data.py:388) except:

ModuleNotFoundError: No module named 'pst.observables'
``

@PabloCorcho
Copy link
Member

Sorry Miguel, I missed that. That is a known issue. PST is a dependency of that particular correction and you haven't installed it. I will fix it once PST is on pypi. I am closing this issue and open a dedicated one for this.

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