diff --git a/fink_broker/science.py b/fink_broker/science.py index 78c1052c..dd3d9fab 100644 --- a/fink_broker/science.py +++ b/fink_broker/science.py @@ -1,4 +1,4 @@ -# Copyright 2020-2023 AstroLab Software +# Copyright 2020-2024 AstroLab Software # Author: Julien Peloton # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -224,7 +224,7 @@ def apply_science_modules(df: DataFrame, noscience: bool = False) -> DataFrame: _LOG.info("New processor: cdsxmatch") df = xmatch_cds(df) - _LOG.info("New processor: Gaia xmatch") + _LOG.info("New processor: Gaia xmatch (1.0 arcsec)") df = xmatch_cds( df, distmaxarcsec=1, @@ -233,25 +233,26 @@ def apply_science_modules(df: DataFrame, noscience: bool = False) -> DataFrame: types=['string', 'float', 'float'] ) - _LOG.info("New processor: GCVS") - df = df.withColumn( - 'gcvs', - crossmatch_other_catalog( - df['candidate.candid'], - df['candidate.ra'], - df['candidate.dec'], - F.lit('gcvs') - ) + _LOG.info("New processor: VSX (1.5 arcsec)") + df = xmatch_cds( + df, + catalogname="vizier:B/vsx/vsx", + distmaxarcsec=1.5, + cols_out=['Type'], + types=['string'] ) + # legacy -- rename `Type` into `vsx` + # see https://github.com/astrolabsoftware/fink-broker/issues/787 + df = df.withColumnRenamed('Type', 'vsx') - _LOG.info("New processor: VSX") + _LOG.info("New processor: GCVS (1.5 arcsec)") df = df.withColumn( - 'vsx', + 'gcvs', crossmatch_other_catalog( df['candidate.candid'], df['candidate.ra'], df['candidate.dec'], - F.lit('vsx') + F.lit('gcvs') ) )