<resource schema="gedr3spur">
  <meta name="creationDate">2020-12-21T09:17:31Z</meta>
  <meta name="schema-rank">20</meta>

  <meta name="title">A classifier for spurious astrometric solutions in Gaia EDR3</meta>
  <meta name="description">
    This table contains estimates of the "fidelity" of Gaia eDR3
    astrometric solutions, a measure of the likelihood the eDR3
    solution is physical rather than spurious obtained using a neural
    network trained on a small, hand-selected sample.
  </meta>
  <meta name="subject">stellar-distance</meta>
  <meta name="subject">trigonometric-parallax</meta>
  <meta name="subject">measurement-error-model</meta>

  <meta name="creator">Rybizki, J.; Green, G.M.; Rix, H.-W.; El-Badry, K.;
  	Demleitner, M.; Zari, E.; Udalski, A.; Smart, R.L; Gould, A.</meta>
  <meta name="instrument">Neural Network</meta>
  <meta name="facility">Gaia</meta>

  <meta name="source">2022MNRAS.510.2597R</meta>
  <meta name="contentLevel">Research</meta>
  <meta name="type">Catalog</meta>

  <meta name="_news" author="MD" date="2021-10-18" role="updated">
    Corrected distances, norm_dg and theta_arcsec_worst_source
    for data coming form level 6 healpix healpix 3; these were wrong
    due to mixed up input columns.  The fidelity scores were unaffected.
  </meta>

  <meta name="coverage.waveband">Optical</meta>

  <meta name="_longdoc" format="rst">
    The full data set is also available as a postgres dump (basically,
    tab-separated values with ``\N`` as NULL).  This dump is sorted by
    source_ids, so you can bisect in it.

    To obtain the dump (which we don't link here to keep crawlers from
    needlessly pulling 48 GB of data), run your preferred variant of::

      curl -O http://vo.ari.uni-heidelberg.de/gedr3spur/dump.txt.gz

    For the metadata, inspect the column metadata below in database order.
  </meta>

  <table id="main" onDisk="True" primary="source_id" adql="True">
    <index columns="fidelity_v2"/>
    <publish sets="local,ivo_managed"/>

    <column original="gaia/q3#edr3lite.source_id"/>
    <column name="fidelity_v2" type="real"
      ucd="stat.fit"
      tablehead="fidelity"
      description="A probability that eDR3 has a good astrometric solution
        for this source, with values between 0 (meaning likely spurious
        solution) and 1 (meaning likely good solution).  This is
        the published probability estimate."
      verbLevel="1">
      <property name="statisticsTarget">2000</property>
    </column>

    <column name="theta_arcsec_worst_source"
      unit="arcsec" ucd="pos.angDistance"
      tablehead="θ"
      description="Distance to the eDR3 source within 30 arcsec
        of the object for which ΔG-θ is maximal.  See norm_dg for details."
      verbLevel="15"/>
    <column name="norm_dg"
      unit="" ucd="instr.background"
      tablehead="ΔG'"
      description="This is a heuristic measure for contamination by bright
        stars in the neighbourhood.  It is computed as ΔG-θ, where θ is the
        distance to another Gaia eDR3 object in arcsec (reported in
        theta_arcsec_worst_source), and ΔG is the magnitude difference in mag.
        This column gives the maximum of the values for all eDR3 sources
        within 30 arcsecs of the object."
      verbLevel="15"/>

    <column name="dist_nearest_neighbor_at_least_m2_brighter"
      unit="arcsec" ucd="pos.angDistance"
      tablehead="Dist Δm=-2"
      description="Distance to the nearest neighbour in gaia_source
        at least 2 m fainter than this source."/>
    <column name="dist_nearest_neighbor_at_least_0_brighter"
      unit="arcsec" ucd="pos.angDistance"
      tablehead="Dist Δm=0"
      description="Distance to the nearest neighbour in gaia_source
        at least as bright as this source."/>

    <LOOP listItems="2 4 6 10">
      <events>
        <column name="dist_nearest_neighbor_at_least_\item\+_brighter"
          unit="arcsec" ucd="pos.angDistance"
          tablehead="Dist Δm=\item"
          description="Distance to the nearest neighbour in gaia_source
            at least \item m brighter than this source."/>
      </events>
    </LOOP>

    <column name="fidelity_v1" type="real"
      ucd="stat.fit"
      tablehead="fidelity"
      description="A probablity that eDR3 has a good astrometric solution
        for this source, with values between 0 (meaning likely spurious
        solution) and 1 (meaning likely good solution).  This comes from
        a first version of the estimator that was reviewed based on
        an astro-ph paper."
      verbLevel="25">
      <property name="statisticsTarget">2000</property>
    </column>
  </table>

  <data id="import">
    <sources pattern="static/*.txt.gz"/>
    <directGrammar id="dumpboost" cBooster="res/parsedump.c"
      type="split" splitChar="\t" preFilter="zcat" autoNull="\N"/>
    <make table="main"/>
  </data>

  <regSuite title="gedr3spur regression">
    <regTest title="gedr3spur data looks right">
      <url lang="ADQL"
        query="select * from gedr3spur.main where source_id=4295806720"
          >/tap/sync</url>
      <code>
        row = self.getFirstVOTableRow()
        self.assertAlmostEqual(row["fidelity_v2"], 0.99951171875)
        self.assertEqual(row["fidelity_v1"], 1)
        self.assertEqual(row["norm_dg"], None)
      </code>
    </regTest>
  </regSuite>
</resource>
