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

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

/// 2MASS PSC Catalogue
///
/// Reference paper: Skrutskie et al. 2006, AJ 131, 1163
///
/// Documentation:
/// http://www.ipac.caltech.edu/2mass/releases/allsky/doc/explsup.html
///
/// Original catalogue: ftp://ftp.ipac.caltech.edu/pub/2mass/allsky
///
/// Catalogue curator:
/// SSDC - ASI Space Science Data Center
/// https://www.ssdc.asi.it/
#[allow(non_camel_case_types)]
pub struct tmass_original_valid;

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

/// The columns in the tmass_original_valid table.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, strum::Display)]
pub enum Col {
    /// Photometric quality flag. Three character flag, one character per band
    /// [JHKs], that provides a summary of the net quality of the default
    /// photometry in each band.  
    /// The value for ph_qual is set for a band according to the precedence of
    /// the table below. For example, a source that is tested and meets the
    /// conditions for category “X” is not tested for subsequent qualities.
    ///
    /// -   “X” - There is a detection at this location, but no valid brightness
    ///     estimate can be extracted using any algorithm. Default magnitude is
    ///     null.
    ///
    /// -   “U” - Upper limit on magnitude. Source is not detected in this band,
    ///     or it is detected, but not resolved in a consistent fashion with
    ///     other bands. A value of ph_qual=“U” does not necessarily mean that
    ///     there is no flux detected in this band at the location.
    ///
    /// -   “F” - This category includes sources where a reliable estimate of
    ///     the photometric error could not be determined. The uncertainties
    ///     reported for these sources in [jhk]_msigcom are flags and have
    ///     numeric values >8.0.
    ///
    /// -   “E” - This category includes detections where the goodness-of-fit
    ///     quality of the profile-fit photometry was very poor, or detections
    ///     where psf fit photometry did not converge and an aperture magnitude
    ///     is reported, or detections where the number of frames was too small
    ///     in relation to the number of frames in which a detection was
    ///     geometrically possible.
    ///
    /// -   “A” - Detections in any brightness regime where valid measurements
    ///     were made with [jhk]_snr>10 AND [jhk]_cmsig<0.10857.
    ///
    /// -   “B” - Detections in any brightness regime where valid measurements
    ///     were made with [jhk]_snr>7 AND [jhk]_cmsig<0.15510.
    ///
    /// -   “C” - Detections in any brightness regime where valid measurements
    ///     were made with [jhk]_snr>5 AND [jhk]_cmsig<0.21714.
    ///
    /// -   “D” - Detections in any brightness regime where valid measurements
    ///     were made with no [jhk]_snr or [jhk]_cmsig requirement.
    ph_qual,
    /// Incremental unique numeric identifier (increasing with declination).
    /// This is the only field which was not in the original 2MASS catalogue,
    /// but was added for cross-match purposes.
    tmass_oid,
    /// Sexagesimal, equatorial position-based source name in the form:
    /// hmmssss+ddmmsss[ABC...] The prefix “2MASS J” in not explicitely listed
    /// in the designation.
    designation,
    /// J2000 right ascension with respect to the ICRS
    ra,
    /// J2000 declination with respect to the ICRS
    dec,
    /// Semi-major axis length of the one sigma position uncertainty ellipse
    err_maj,
    /// Semi-minor axis length of the one sigma position uncertainty ellipse
    err_min,
    /// Position angle on the sky of the semi-major axis of the position
    /// uncertainty ellipse (East of North)
    err_ang,
    /// Default J-band magnitude.  
    /// In case of a source not detected in the J-band, it is an upper limit and
    /// the corresponding total photometric uncertainty is NULL.  
    /// In case of a source detected in the J-band and with no useful brightness
    /// estimate, it is set to NULL.
    j_m,
    /// Total photometric uncertainty for the default J-band magnitude. This
    /// column is NULL if the default magnitude is a 95% confidence upper limit
    /// (i.e. the source is not detected, or inconsistently deblended in the
    /// J-band).
    j_msigcom,
    /// Default H-band magnitude.  
    /// In case of a source not detected in the H-band, it is an upper limit and
    /// the corresponding total photometric uncertainty is NULL.  
    /// In case of a source detected in the H-band and with no useful brightness
    /// estimate, it is set to NULL.
    h_m,
    /// Total photometric uncertainty for the default H-band magnitude. This
    /// column is NULL if the default magnitude is a 95% confidence upper limit
    /// (i.e. the source is not detected, or inconsistently deblended in the
    /// H-band).
    h_msigcom,
    /// Default Ks-band magnitude.  
    /// In case of a source not detected in the Ks-band, it is an upper limit
    /// and the corresponding total photometric uncertainty is NULL.  
    /// In case of a source detected in the Ks-band and with no useful
    /// brightness estimate, it is set to NULL.
    ks_m,
    /// Total photometric uncertainty for the default Ks-band magnitude. This
    /// column is NULL if the default magnitude is a 95% confidence upper limit
    /// (i.e. the source is not detected, or inconsistently deblended in the
    /// Ks-band.
    ks_msigcom,
    /// Unique identification number of the record in the XSC (2MASS Extended
    /// Source Catalogue) that corresponds to this point source. Can be NULL if
    /// no corresponding extended source is present in the XSC.
    ext_key,
    /// The Julian Date of the source measurement accurate to +30 seconds. This
    /// value is extrapolated from the start time of the Survey scan using the
    /// difference between the declinations of the source and the first row in
    /// the Tile divided by the scanning rate of the telescope (approximately
    /// 5sec). The scanning rate of the two 2MASS telescopes was slightly
    /// different because of the need to optimize the dithering of images on the
    /// arrays.
    j_date,
}

impl Column for Col {}

#[cfg(test)]
/// Collects all the known columns in the tmass_original_valid table.
pub fn collect_known(map: &mut std::collections::HashMap<String, Vec<String>>) {
    let mut col_strings = Vec::new();
    col_strings.push(Col::ph_qual.to_string());
    col_strings.push(Col::tmass_oid.to_string());
    col_strings.push(Col::designation.to_string());
    col_strings.push(Col::ra.to_string());
    col_strings.push(Col::dec.to_string());
    col_strings.push(Col::err_maj.to_string());
    col_strings.push(Col::err_min.to_string());
    col_strings.push(Col::err_ang.to_string());
    col_strings.push(Col::j_m.to_string());
    col_strings.push(Col::j_msigcom.to_string());
    col_strings.push(Col::h_m.to_string());
    col_strings.push(Col::h_msigcom.to_string());
    col_strings.push(Col::ks_m.to_string());
    col_strings.push(Col::ks_msigcom.to_string());
    col_strings.push(Col::ext_key.to_string());
    col_strings.push(Col::j_date.to_string());
    map.insert(tmass_original_valid.string(), col_strings);
}