Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions astrodbkit/astrodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -553,6 +553,8 @@ def search_object(

# Verify provided tables exist in database
for k in table_names.keys():
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")

Expand Down