gaia_access 0.2.0

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

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

/// Solar System object observations. Each table line contained data
/// obtained during the transit of the source on a single CCD, during a
/// single transit. The corresponding epoch is provided. Data not varying
/// within the transit are repeated identically for all single observations
/// of that transit.
#[allow(non_camel_case_types)]
pub struct sso_observation;

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

/// The columns in the sso_observation 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,
    /// Observation Identifier
    observation_id,
    /// minor planet number attributed by MPC
    number_mp,
    /// Gaia-centric epoch TCB(Gaia)
    epoch,
    /// Error in Gaiacentric epoch
    epoch_err,
    /// Gaiacentric epoch UTC
    epoch_utc,
    /// Right ascension of the source
    ra,
    /// Declination of the source
    dec,
    /// Standard error of right ascension - systematic
    ra_error_systematic,
    /// Standard error of declination - systematic
    dec_error_systematic,
    /// Correlation of ra and dec errors - systematic
    ra_dec_correlation_systematic,
    /// Standard error of right ascension - random
    ra_error_random,
    /// Standard error of declination - random
    dec_error_random,
    /// Correlation of ra and dec errors - random
    ra_dec_correlation_random,
    /// Calibrated G mag
    g_mag,
    /// Average calibrated G flux for the transit
    g_flux,
    /// Error on the G flux
    g_flux_error,
    /// Barycentric x position of Gaia
    x_gaia,
    /// Barycentric y position of Gaia
    y_gaia,
    /// Barycentric z position of Gaia
    z_gaia,
    /// Barycentric x velocity of Gaia
    vx_gaia,
    /// Barycentric y velocity of Gaia
    vy_gaia,
    /// Barycentric z velocity of Gaia
    vz_gaia,
    /// Position angle of the scanning direction
    position_angle_scan,
    /// Level of confidence of the identification
    level_of_confidence,
}

impl Column for Col {}

#[cfg(test)]
/// Collects all the known columns in the sso_observation table.
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::observation_id.to_string());
    col_strings.push(Col::number_mp.to_string());
    col_strings.push(Col::epoch.to_string());
    col_strings.push(Col::epoch_err.to_string());
    col_strings.push(Col::epoch_utc.to_string());
    col_strings.push(Col::ra.to_string());
    col_strings.push(Col::dec.to_string());
    col_strings.push(Col::ra_error_systematic.to_string());
    col_strings.push(Col::dec_error_systematic.to_string());
    col_strings.push(Col::ra_dec_correlation_systematic.to_string());
    col_strings.push(Col::ra_error_random.to_string());
    col_strings.push(Col::dec_error_random.to_string());
    col_strings.push(Col::ra_dec_correlation_random.to_string());
    col_strings.push(Col::g_mag.to_string());
    col_strings.push(Col::g_flux.to_string());
    col_strings.push(Col::g_flux_error.to_string());
    col_strings.push(Col::x_gaia.to_string());
    col_strings.push(Col::y_gaia.to_string());
    col_strings.push(Col::z_gaia.to_string());
    col_strings.push(Col::vx_gaia.to_string());
    col_strings.push(Col::vy_gaia.to_string());
    col_strings.push(Col::vz_gaia.to_string());
    col_strings.push(Col::position_angle_scan.to_string());
    col_strings.push(Col::level_of_confidence.to_string());
    map.insert(sso_observation.string(), col_strings);
}