Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
respace query
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Starkman (@nstarman) <nstarkman@protonmail.com>
  • Loading branch information
nstarman committed Oct 9, 2021
1 parent 3d88227 commit 39ffa23
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions discO/data/err_field/sky_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,28 @@ def query_sky_distribution(
# make ADQL
random_index = "" if random_index is None else "AND random_index < {int(random_index)}"
adql_query = f"""
SELECT
source_id, hpx{order},
parallax, parallax_error,
ra, ra_error,
dec, dec_error
FROM (
SELECT
source_id, hpx{order},
source_id, random_index,
GAIA_HEALPIX_INDEX({order}, source_id) AS hpx{order},
parallax, parallax_error,
ra, ra_error,
dec, dec_error
FROM (
SELECT
source_id, random_index,
GAIA_HEALPIX_INDEX({order}, source_id) AS hpx{order},
parallax, parallax_error,
ra, ra_error,
dec, dec_error
FROM gaiadr2.gaia_source AS gaia
) AS gaia
FROM gaiadr2.gaia_source AS gaia
) AS gaia
WHERE parallax >= 0
{random_index}
WHERE parallax >= 0
{random_index}
ORDER BY hpx{order};
"""
ORDER BY hpx{order};
"""

# data folder
FOLDER = THIS_DIR / f"order_{order}"
Expand Down

0 comments on commit 39ffa23

Please sign in to comment.