henrysky / astroNN_stars_foundation

Code for Leung & Bovy 2023

Home Page:https://ui.adsabs.harvard.edu/abs/2024MNRAS.527.1494L/abstract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inference_Labels2Labels.ipynb KeyError: 'G'

DCY1117 opened this issue · comments

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.

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 .
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.