# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# %pylab inline
import gdr2_completeness.tap_queries as tap

# +
# Here we download the 130pc volume-complete GDR2mock sample used as CMD prior for nearby planetary hosts

distance = 0.130

# Specifying the tap query
Select_what =   """ *
                   """

under_condition = """AND 1/parallax < %f""" %(distance)

folder = 'data/130pc/'
hpx_level = 2
service = 'GDR2mock'

tap.tap_query_gdr2_hpx_sliced(service = service, hpx_level = hpx_level, folder = folder,
                              Select_what = Select_what, under_condition = under_condition,
                              verbose = True, test_1st_hpx_only=False)

# Then we combine the files to one structured array
tap.stack_healpix_files(folder)

StarcoderdataJupyterScriptsDedupFiltered