From 6755f1cfdff7cd5f4eef8a26ce43ff83b0ad9802 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Sat, 15 Feb 2025 19:19:52 +0000 Subject: [PATCH 1/2] Removing shortname from search_object defaults --- astrodbkit/astrodb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/astrodbkit/astrodb.py b/astrodbkit/astrodb.py index 7b89545..d3b0955 100644 --- a/astrodbkit/astrodb.py +++ b/astrodbkit/astrodb.py @@ -497,7 +497,7 @@ def search_object( name, output_table=None, resolve_simbad=False, - table_names={"Sources": ["source", "shortname"], "Names": ["other_name"]}, + table_names={"Sources": ["source"], "Names": ["other_name"]}, fmt="table", fuzzy_search=True, verbose=True, @@ -517,7 +517,7 @@ def search_object( Get additional names from Simbad. Default: False table_names : dict Dictionary of tables to search for name information. Should be of the form table name: column name list. - Default: {'Sources': ['source', 'shortname'], 'Names': 'other_name'} + Default: {'Sources': ['source'], 'Names': 'other_name'} fmt : str Format to return results in (pandas, astropy/table, default). Default is astropy table fuzzy_search : bool @@ -553,6 +553,7 @@ def search_object( # Verify provided tables exist in database for k in table_names.keys(): + print(f"Using table '{k}' with columns {table_names[k]} for matching object names") if k not in self.metadata.tables: raise RuntimeError(f"Table {k} is not in the database") From b2be7a69de44715c33b6d585d18842080498ab30 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Sat, 15 Feb 2025 19:21:34 +0000 Subject: [PATCH 2/2] moving print statements under verbose option --- astrodbkit/astrodb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/astrodbkit/astrodb.py b/astrodbkit/astrodb.py index d3b0955..8e5a9f0 100644 --- a/astrodbkit/astrodb.py +++ b/astrodbkit/astrodb.py @@ -553,7 +553,8 @@ def search_object( # Verify provided tables exist in database for k in table_names.keys(): - print(f"Using table '{k}' with columns {table_names[k]} for matching object names") + if verbose: + print(f"Using table '{k}' with columns {table_names[k]} for matching object names") if k not in self.metadata.tables: raise RuntimeError(f"Table {k} is not in the database")