// This code is generated by generate_code.py, do not modify it manually.
//! This module contains all the known columns in the xgboost_table1 table.
use crate::traits::{Column, Table};
/// This is table 1 of Andrae et al. (2023), "Robust Data-driven Metallicities for 175 Million Stars from Gaia XP Spectra" (https://ui.adsabs.harvard.edu/abs/2023ApJS..267....8A/abstract). This table contains 174,922,161 XGBoost parameters (temperature, surface gravity, and metallicity). XGBoost draws on a number of data features: the full set of Gaia DR3 XP spectral coefficients, narrowband fluxes derived from XP spectra, broadband Gaia DR3 magnitudes, Gaia DR3 parallaxes, and CatWISE 2020 W1 and W2 magnitudes. The mean stellar parameter precision is 0.1 dex in [M/H], 50 K in Teff, and 0.08 dex in log(g). This table has been created in November 2023 based on version 2.1 of the dataset on Zenodo (https://doi.org/10.5281/zenodo.7945154).
#[allow(non_camel_case_types)]
pub struct xgboost_table1;
impl Table for xgboost_table1 {
fn string(&self) -> String {
"xgboost_table1".to_string()
}
}
/// The columns in the xgboost_table1 table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
/// Gaia DR3 source identifier
source_id,
/// Apparent CatWISE 2020 W1 magnitude
catwise_w1,
/// Apparent CatWISE 2020 W2 magnitude
catwise_w2,
/// Flag for membership in training sample
in_training_sample,
/// XGBoost estimate of [M/H]
mh_xgboost,
/// XGBoost estimate of Teff
teff_xgboost,
/// XGBoost estimate of log(g)
logg_xgboost,
}
impl Column for Col {}
#[cfg(test)]
/// Collects all the known columns in the xgboost_table1 table.
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::catwise_w1.to_string());
col_strings.push(Col::catwise_w2.to_string());
col_strings.push(Col::in_training_sample.to_string());
col_strings.push(Col::mh_xgboost.to_string());
col_strings.push(Col::teff_xgboost.to_string());
col_strings.push(Col::logg_xgboost.to_string());
map.insert(xgboost_table1.string(), col_strings);
}