@@ -118,7 +118,7 @@ def __init__(self, *, environment='PDR', tap_plus_conn_handler=None, datalink_ha
118
118
self .get_status_messages ()
119
119
120
120
def cross_match_basic (self , * , table_a_full_qualified_name , table_a_column_ra , table_a_column_dec ,
121
- table_b_full_qualified_name = '' , table_b_column_ra = '' , table_b_column_dec = '' ,
121
+ table_b_full_qualified_name = None , table_b_column_ra = None , table_b_column_dec = None ,
122
122
results_name = None ,
123
123
radius = 1.0 , background = False , verbose = False ):
124
124
"""Performs a positional cross-match between the specified tables.
@@ -131,7 +131,7 @@ def cross_match_basic(self, *, table_a_full_qualified_name, table_a_column_ra, t
131
131
132
132
The result is a join table with the identifies of both tables and the distance (degrees), that is returned
133
133
without metadata units. If desired, units can be added using the Units package of Astropy as follows:
134
- results[‘separation’].unit = u.degree. To speed up the cross-match, pass the biggest table to the
134
+ `` results[‘separation’].unit = u.degree`` . To speed up the cross-match, pass the biggest table to the
135
135
``table_b_full_qualified_name`` parameter.
136
136
TAP+ only
137
137
@@ -176,10 +176,13 @@ def cross_match_basic(self, *, table_a_full_qualified_name, table_a_column_ra, t
176
176
if not schema_a :
177
177
raise ValueError (f"Schema name is empty in full qualified table: '{ table_a_full_qualified_name } '" )
178
178
179
- if not table_b_full_qualified_name :
179
+ if table_b_full_qualified_name is None :
180
180
table_b_full_qualified_name = self .main_table
181
181
table_b_column_ra = self .main_table_ra
182
182
table_b_column_dec = self .main_table_dec
183
+ else :
184
+ if table_b_column_ra is None or table_b_column_dec is None :
185
+ raise ValueError (f"Invalid ra or dec column names: '{ table_b_column_ra } ' and '{ table_b_column_dec } '" )
183
186
184
187
schema_b = self .__get_schema_name (table_b_full_qualified_name )
185
188
if not schema_b :
@@ -252,11 +255,8 @@ def __get_table_metadata(self, full_qualified_table_name, verbose):
252
255
"""
253
256
Get the table metadata for the input table
254
257
"""
255
- try :
256
- table_metadata = self .load_table (table = full_qualified_table_name , verbose = verbose )
257
- except Exception :
258
- raise ValueError (f"Not found table '{ full_qualified_table_name } ' in the archive" )
259
- return table_metadata
258
+
259
+ return self .load_table (table = full_qualified_table_name , verbose = verbose )
260
260
261
261
def __get_schema_name (self , full_qualified_table_name ):
262
262
"""
0 commit comments