@@ -363,16 +363,17 @@ def run(
363363 DatasetProvenance .strip_provenance_from_flat_dict (catalog_match_ref .meta )
364364 DatasetProvenance .strip_provenance_from_flat_dict (catalog_match_target .meta )
365365
366- select_ref = catalog_match_ref ['match_candidate' ]
367- # Add additional selection criteria for target sources beyond those for matching
368- # (not recommended, but can be done anyway)
369366 # It would be nice to make this a Selector but those are
370367 # only available in analysis_tools for now
371- select_target = (
372- catalog_match_target ['match_candidate' ]
373- if 'match_candidate' in catalog_match_target .columns
374- else np .ones (len (catalog_match_target ), dtype = bool )
368+ select_ref , select_target = (
369+ (catalog [column ] if column else np .ones (len (catalog ), dtype = bool ))
370+ for catalog , column in (
371+ (catalog_match_ref , self .config .column_match_candidate_ref ),
372+ (catalog_match_target , self .config .column_match_candidate_target ),
373+ )
375374 )
375+ # Add additional selection criteria for target sources beyond those for matching
376+ # (not recommended, but can be done anyway)
376377 for column in config .columns_target_select_true :
377378 select_target &= catalog_target [column ]
378379 for column in config .columns_target_select_false :
0 commit comments