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

Non official zpt functions in RedClump_GSP-Spec_SF.ipynb #56

Open
mfouesneau opened this issue Sep 11, 2024 · 0 comments
Open

Non official zpt functions in RedClump_GSP-Spec_SF.ipynb #56

mfouesneau opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mfouesneau
Copy link
Member

docs/notebooks/RedClump_GSP-Spec_SF.ipynb

In this notebook we use probably the non-official zeropoint package. The API of the official one differs.

from astroquery.gaia import Gaia
from zero_point import zpt

# Necessary line in the new API
zpt.load_tables()

# get some dummy data
query = r"""select * from gaiaedr3.gaia_source
where phot_g_mean_mag between 17.9 and 18.1
and random_index between 700000000 and 700001000
and (astrometric_params_solved = 31 or astrometric_params_solved = 95)
"""

data = Gaia.launch_job(query).get_results().to_pandas()

gmag = data['phot_g_mean_mag'].values
nueffused = data['nu_eff_used_in_astrometry'].values
psc = data['pseudocolour'].values
ecl_lat = data['ecl_lat'].values
soltype = data['astrometric_params_solved'].values  

# one line to rule them all in one shot. (no more zpt4 or zpt5)
zpvals = zpt.get_zpt(gmag, nueffused, psc, ecl_lat, soltype)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants