Skip to content

Commit

Permalink
Replace local crossmatch for VSX with a call to Vizier using the CDS …
Browse files Browse the repository at this point in the history
…xmatch service (#790)
  • Loading branch information
JulienPeloton authored Jan 30, 2024
1 parent fa84b59 commit b91f22f
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions fink_broker/science.py
Original file line number Diff line number Diff line change
@@ -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");
Expand Down Expand Up @@ -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,
Expand All @@ -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')
)
)

Expand Down

0 comments on commit b91f22f

Please sign in to comment.