File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 30
30
import lsst .pipe .base as pipeBase
31
31
import lsst .pipe .base .connectionTypes as cT
32
32
from lsst .skymap import BaseSkyMap
33
+ from lsst .daf .butler import DatasetProvenance
33
34
34
35
import astropy .table
35
36
import astropy .units as u
@@ -338,6 +339,15 @@ def run(
338
339
catalog_match_ref = astropy .table .Table .from_pandas (catalog_match_ref )
339
340
if is_match_target_pd :
340
341
catalog_match_target = astropy .table .Table .from_pandas (catalog_match_target )
342
+
343
+ # Strip any provenance from tables before merging to prevent
344
+ # warnings from conflicts being issued by astropy.utils.merge during
345
+ # vstack or hstack calls.
346
+ DatasetProvenance .strip_provenance_from_flat_dict (catalog_ref .meta )
347
+ DatasetProvenance .strip_provenance_from_flat_dict (catalog_target .meta )
348
+ DatasetProvenance .strip_provenance_from_flat_dict (catalog_match_ref .meta )
349
+ DatasetProvenance .strip_provenance_from_flat_dict (catalog_match_target .meta )
350
+
341
351
# TODO: Remove pandas support in DM-46523
342
352
if is_ref_pd or is_target_pd or is_match_ref_pd or is_match_target_pd :
343
353
warnings .warn ("pandas usage in MatchProbabilisticTask is deprecated; it will be removed "
You can’t perform that action at this time.
0 commit comments