gaia_access 0.1.1

Access the Gaia ESA Archive for astronomical data.
Documentation
// This code is generated by generate_code.py, do not modify it manually.

//! This module contains all the known columns in the apassdr9_join table.

use crate::traits::{Column, Table};

/// Convenience table to be used to join the APASS DR9 catalogue with the
/// cross-match results. The table links the external catalogue original
/// sourceId (originalExtSourceId) to the corresponding additional numerical
/// identifier (cleanApassdr9Oid).
///
/// Both originalExtSourceId and cleanApassdr9Oid are present in the
/// cross-match output tables (Apassdr9BestNeighbour and
/// Apassdr9Neighbourhood). However, in case there are suspected duplicates
/// in the external catalogue, different originalExtSourceId will correspond
/// to the same cleanApassdr9Oid.
///
/// In the cross-match output table only the originalExtSourceId of the
/// source with the best astrometry among the suspected duplicates will be
/// listed. In practice, users may use the originalExtSourceId in the
/// original catalogue to find the matching source with the best astrometry.
/// Users interested in all matching suspected duplicates should instead use
/// the cleanApassdr9Oid in the join with the cross-match result tables.
///
/// See ChapterĀ [chap:crossmatch] for more details on the duplicates in the
/// external catalogues and their treatment in the cross-match computations.
#[allow(non_camel_case_types)]
pub struct apassdr9_join;

impl Table for apassdr9_join {
    fn string(&self) -> String {
        "apassdr9_join".to_string()
    }
}

/// The columns in the apassdr9_join table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
    /// Original External Catalogue source identifier
    original_ext_source_id,
    /// External Catalogue source identifier
    clean_apassdr9_oid,
}

impl Column for Col {}

#[cfg(test)]
pub fn collect_known(map: &mut std::collections::HashMap<String, Vec<String>>) {
    let mut col_strings = Vec::new();
    col_strings.push(Col::original_ext_source_id.to_string());
    col_strings.push(Col::clean_apassdr9_oid.to_string());
    map.insert(apassdr9_join.string(), col_strings);
}