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

Inference_Labels2Labels.ipynb KeyError: 'G' #1

Open
DCY1117 opened this issue Nov 30, 2023 · 2 comments
Open

Inference_Labels2Labels.ipynb KeyError: 'G' #1

DCY1117 opened this issue Nov 30, 2023 · 2 comments

Comments

@DCY1117
Copy link

DCY1117 commented Nov 30, 2023

When running the following line:
nn_logsol = fakemag_to_logsol(result["g_fakemag"], band="G")

It shows KeyError: 'G'

Further investigation shows that fakemag_to_sol only have
:type band: str(['U', 'B', 'V', 'R', 'I', 'J', 'H', 'K','u', 'g', 'r', 'i', 'z']) as type of band

Trying with "g" shows the exact same result.

@henrysky
Copy link
Owner

henrysky commented Nov 30, 2023

I cannot reproduce the error. Can you give the output of the following code?

import sys
import astroNN

print(sys.version)
print(astroNN.__version__)

I think you need to use the latest commit of astroNN which I can do a versioned release later this week but in the meantime please try to download the latest commit by

git clone https://github.com/henrysky/astroNN.git

and then go into the folder astroNN and do the following

pip install -e .

@DCY1117
Copy link
Author

DCY1117 commented Nov 30, 2023

import sys
import astroNN

print(sys.version)
print(astroNN.__version__)

Gives me the following output:

3.9.18 (main, Sep 11 2023, 14:09:26) [MSC v.1916 64 bit (AMD64)]
1.1.0

After installing the last commit:

3.9.18 (main, Sep 11 2023, 14:09:26) [MSC v.1916 64 bit (AMD64)]
1.2.dev0

The update resolved the issue. It seems that the last release 1.1.0 doesn't have the G as a band type.

Thanks for the assistance.

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