Skip to content

Commit

Permalink
debug
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 6a06ce1 commit 3d88227
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion discO/data/err_field/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def make_parser(*, inheritable: bool = False) -> argparse.ArgumentParser:
)

# gaia_tools
parser.add_argument("--use_local", default=True, type=bool, help="gaia_tools local query")
parser.add_argument("--use_local", action="store_true", help="gaia_tools local query")
parser.add_argument("--username", default=None, type=str, help="gaia_tools query username")

return parser
Expand Down
11 changes: 7 additions & 4 deletions discO/data/err_field/sky_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ def query_sky_distribution(
# data file
DATA_DIR = FOLDER / f"sky_distribution_{order}.ecsv"

print(user)
try:
result = table.QTable.read(DATA_DIR)
except Exception as e:
print(e)
result = do_query(adql_query, local=use_local, use_cache=False, user=user)
result.write(DATA_DIR)

Expand Down Expand Up @@ -226,7 +226,7 @@ def make_parser(*, inheritable: bool = False) -> argparse.ArgumentParser:
parser.add_argument("--plot", default=True, type=bool, help="make plots or not")

# gaia_tools
parser.add_argument("--use_local", default=True, type=bool, help="gaia_tools local query")
parser.add_argument("--use_local", action="store_true", help="gaia_tools local query")
parser.add_argument("--username", default=None, type=str, help="gaia_tools query username")

return parser
Expand Down Expand Up @@ -267,8 +267,11 @@ def main(
# /if

sky = query_sky_distribution(
order=ns.order, random_index=ns.random_index, plot=ns.plot, use_local=ns.use_local,
user=ns.username
order=ns.order,
random_index=ns.random_index,
plot=ns.plot,
use_local=ns.use_local,
user=ns.username,
)

return sky
Expand Down

0 comments on commit 3d88227

Please sign in to comment.