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

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

/// This table contains non-single-star orbital models for spectroscopic binaries compatible with a trend. Several possible models are hosted within the same table and they are indicated by the field \texttt{nssSolutionType}. The description of this latter lists all possible solution types considered for this release. Only a selection of parameters hosted in this table are provided here, depending on the solution. The details of those is given in the description of field \texttt{bitIndex}, which can also be used to extract the relevant elements of the correlation vector \texttt{corrVec}. Details about the formalism used to derive the parameters in this table are given in the on-line documentation, see Chapter~\ref{chap:cu4nss}.
#[allow(non_camel_case_types)]
pub struct nss_non_linear_spectro;

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

/// The columns in the nss_non_linear_spectro table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
    /// Solution Identifier
    solution_id,
    /// Source Identifier
    source_id,
    /// NSS model adopted
    nss_solution_type,
    /// Mean velocity
    mean_velocity,
    /// Standard error of Mean velocity
    mean_velocity_error,
    /// First order derivative of the velocity
    first_deriv_velocity,
    /// Standard error of First order derivative of the velocity
    first_deriv_velocity_error,
    /// Second order derivative of the velocity
    second_deriv_velocity,
    /// Standard error of Second order derivative of the velocity
    second_deriv_velocity_error,
    /// Total number of radial velocities considered for the primary
    rv_n_obs_primary,
    /// Total number of radial velocities actually used for the primary
    rv_n_good_obs_primary,
    /// Boolean mask for the fields above in the corrVec matrix
    bit_index,
    /// Vector form of the upper triangle of the correlation matrix
    corr_vec,
    /// Value of the objective function at the solution
    obj_func,
    /// Goodness of fit in the Hipparcos sense
    goodness_of_fit,
    /// Quality flag for the achieved NSS solution
    flags,
}

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::solution_id.to_string());
    col_strings.push(Col::source_id.to_string());
    col_strings.push(Col::nss_solution_type.to_string());
    col_strings.push(Col::mean_velocity.to_string());
    col_strings.push(Col::mean_velocity_error.to_string());
    col_strings.push(Col::first_deriv_velocity.to_string());
    col_strings.push(Col::first_deriv_velocity_error.to_string());
    col_strings.push(Col::second_deriv_velocity.to_string());
    col_strings.push(Col::second_deriv_velocity_error.to_string());
    col_strings.push(Col::rv_n_obs_primary.to_string());
    col_strings.push(Col::rv_n_good_obs_primary.to_string());
    col_strings.push(Col::bit_index.to_string());
    col_strings.push(Col::corr_vec.to_string());
    col_strings.push(Col::obj_func.to_string());
    col_strings.push(Col::goodness_of_fit.to_string());
    col_strings.push(Col::flags.to_string());
    map.insert(nss_non_linear_spectro.string(), col_strings);
}