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 binary_masses table.

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

/// Masses derived from the non-single stars (NSS) solutions with orbital parameters in table {\tt gaiadr3.nss\_two\_body\_orbit}. The table below is described in detail in \cite{DR3-DPACP-100}. The table presents the different types of NSS orbital solutions combined and which parameters each combination allows to constrain:
///
/// \begin{tabular}{llccc}
/// \hline\hline
/// {\tt combinationMethod} & {\tt m1} & {\tt m2} & {\tt fluxratio} \\
/// \hline
/// Orbital+SB2               & \checkmark & \checkmark & \checkmark \\
/// EclipsingSpectro(SB2)  & \checkmark & \checkmark & \\
/// Eclipsing+SB2           & \checkmark & \checkmark & \\
/// AstroSpectroSB1+M1   & & \checkmark & \checkmark \\
/// Orbital+SB1+M1         & & \checkmark & \checkmark \\
/// EclipsingSpectro+M1  & & \checkmark & \\
/// Eclipsing+SB1+M1     & & \checkmark & \\
/// SB2+M1                  & & \checkmark & \\
/// Orbital+M1                & & lower/upper & \\
/// SB1+M1               & & lower & \\
/// \hline
/// \end{tabular}
///
#[allow(non_camel_case_types)]
pub struct binary_masses;

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

/// The columns in the binary_masses table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
    /// Source Identifier
    source_id,
    /// Primary mass
    m1,
    /// Lower confidence level (16%) of the primary mass
    m1_lower,
    /// Upper confidence level (84%) of the primary mass
    m1_upper,
    /// Secondary mass
    m2,
    /// Lower confidence level (16%) of the secondary mass
    m2_lower,
    /// Upper confidence level (84%) of the secondary mass
    m2_upper,
    /// Flux ratio of the secondary to the primary in the G-band
    fluxratio,
    /// Lower value of the flux ratio
    fluxratio_lower,
    /// Upper value of the flux ratio
    fluxratio_upper,
    /// Combination of NSS solutions used
    combination_method,
    /// Reference for the primary mass
    m1_ref,
    /// Flag
    flag,
}

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::source_id.to_string());
    col_strings.push(Col::m1.to_string());
    col_strings.push(Col::m1_lower.to_string());
    col_strings.push(Col::m1_upper.to_string());
    col_strings.push(Col::m2.to_string());
    col_strings.push(Col::m2_lower.to_string());
    col_strings.push(Col::m2_upper.to_string());
    col_strings.push(Col::fluxratio.to_string());
    col_strings.push(Col::fluxratio_lower.to_string());
    col_strings.push(Col::fluxratio_upper.to_string());
    col_strings.push(Col::combination_method.to_string());
    col_strings.push(Col::m1_ref.to_string());
    col_strings.push(Col::flag.to_string());
    map.insert(binary_masses.string(), col_strings);
}