Source code for euclid_dsps.columns

"""Column metadata for the CosmoHub catalog used by this project."""

from __future__ import annotations

from dataclasses import dataclass


[docs] @dataclass(frozen=True) class CatalogColumn: """Human-readable metadata for one catalog column.""" name: str source_name: str group: str dtype: str unit: str description: str notes: str = ""
CATALOG_353_URL = "https://cosmohub.pic.es/catalogs/353" CATALOG_353_TABLE = "euclid_fs2_mock_dr_v1_1_phz" def _lsst_band_columns(band: str) -> tuple[CatalogColumn, ...]: name = f"lsst_{band}" label = f"LSST {band}" return ( CatalogColumn( name, name, "photometry", "float", "erg s^-1 cm^-2 Hz^-1", f"Observed continuum flux including internal attenuation in {label}-band.", "Active science fit target.", ), CatalogColumn( f"{name}_abs", f"{name}_abs", "rest-frame photometry", "float", "erg s^-1 cm^-2 Hz^-1 at 10 pc", f"Rest-frame flux density at 10 parsec in {label}-band.", "Used for COSMOS proxy SED diagnostics when present.", ), CatalogColumn( f"{name}_el_model3_ext", f"{name}_el_model3_ext", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", f"{label} flux including continuum, emission lines, and internal attenuation.", "Diagnostic only until DSPS emission-line likelihood is implemented.", ), CatalogColumn( f"{name}_el_model3_ext_odonnell_ext", f"{name}_el_model3_ext_odonnell_ext", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", f"{label} flux including emission lines, internal attenuation, and Milky Way extinction.", "Survey-like forward-modeled flux; diagnostic only in the active fit.", ), CatalogColumn( f"{name}_el_model3_ext_odonnell_ext_error", f"{name}_el_model3_ext_odonnell_ext_error", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", f"Flux uncertainty for the {label} Milky-Way-extincted flux.", "Used as per-band likelihood uncertainty in the active 10-band config.", ), CatalogColumn( f"{name}_el_model3_ext_odonnell_ext_error_realization", f"{name}_el_model3_ext_odonnell_ext_error_realization", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", f"Noisy realization of the {label} Milky-Way-extincted flux.", "Use for noisy-observation diagnostics, not as the uncertainty.", ), ) CATALOG_COLUMNS: tuple[CatalogColumn, ...] = ( CatalogColumn( "ra_gal", "ra_gal", "coordinates", "float", "deg", "Galaxy right ascension.", "ICRS-like sky coordinate used for spatial selection.", ), CatalogColumn( "dec_gal", "dec_gal", "coordinates", "float", "deg", "Galaxy declination.", "ICRS-like sky coordinate used for spatial selection.", ), CatalogColumn( "ra_mag_gal", "ra_mag_gal", "coordinates", "float", "deg", "Right ascension associated with the photometry/magnitude position.", ), CatalogColumn( "dec_mag_gal", "dec_mag_gal", "coordinates", "float", "deg", "Declination associated with the photometry/magnitude position.", ), CatalogColumn( "z_true", "true_redshift_halo", "redshift", "float", "dimensionless", "True halo redshift, aliased by the download query.", "Used only for diagnostics in the default workflow.", ), CatalogColumn( "z_phz", "phz_mode_1", "redshift", "float", "dimensionless", "First mode of the photometric-redshift probability distribution.", "Diagnostic/legacy photo-z column; active science fits DSPS z_obs from photometry.", ), CatalogColumn( "z_true_gal", "true_redshift_gal", "redshift", "float", "dimensionless", "True galaxy redshift.", "Preferred truth redshift for galaxy-level DSPS validation.", ), CatalogColumn( "z_obs_gal", "observed_redshift_gal", "redshift", "float", "dimensionless", "Observed galaxy redshift including peculiar velocity.", ), CatalogColumn( "z_deepz", "zp", "redshift", "double", "dimensionless", "DeepZ mode of the p(z) distribution.", ), CatalogColumn( "redshift_step", "redshift_step", "redshift", "smallint", "index", "Redshift step from the Flagship DM lensing healpix maps.", ), CatalogColumn( "phz_flags", "phz_flags", "redshift", "tinyint", "flag", "NNPZ photometric-redshift quality flag.", "0 means no known issue; 1 means insufficient neighbours for robust photo-z.", ), CatalogColumn( "phz_median", "phz_median", "redshift", "float", "dimensionless", "NNPZ median of the photometric-redshift PDF.", "Diagnostic only in the active science config; DSPS fits z_obs from photometry.", ), CatalogColumn( "phz_min_70", "phz_min_70", "redshift", "float", "dimensionless", "Lower edge of the NNPZ 70 percent PDF interval.", ), CatalogColumn( "phz_max_70", "phz_max_70", "redshift", "float", "dimensionless", "Upper edge of the NNPZ 70 percent PDF interval.", ), CatalogColumn( "phz_min_90", "phz_min_90", "redshift", "float", "dimensionless", "Lower edge of the NNPZ 90 percent PDF interval.", ), CatalogColumn( "phz_max_90", "phz_max_90", "redshift", "float", "dimensionless", "Upper edge of the NNPZ 90 percent PDF interval.", ), CatalogColumn( "phz_min_95", "phz_min_95", "redshift", "float", "dimensionless", "Lower edge of the NNPZ 95 percent PDF interval.", ), CatalogColumn( "phz_max_95", "phz_max_95", "redshift", "float", "dimensionless", "Upper edge of the NNPZ 95 percent PDF interval.", ), CatalogColumn( "phz_mode_1_area", "phz_mode_1_area", "redshift", "float", "probability", "Total PDF area of the first NNPZ photo-z mode.", ), CatalogColumn( "phz_mode_2", "phz_mode_2", "redshift", "float", "dimensionless", "Second mode of the NNPZ photo-z PDF when present.", ), CatalogColumn( "phz_mode_2_area", "phz_mode_2_area", "redshift", "float", "probability", "Total PDF area of the second NNPZ photo-z mode.", ), CatalogColumn( "sed_cosmos_1", "sed_cosmos_1", "SED latent", "int8", "index", "Primary COSMOS SED template identifier in the COSMOS_MOD.list order.", "ID range is 0--30 for the 31 local LePhare COSMOS templates.", ), CatalogColumn( "sed_cosmos_2", "sed_cosmos_2", "SED latent", "int8", "index", "Secondary COSMOS SED template identifier in the COSMOS_MOD.list order.", "Used for two-component COSMOS proxy SED reconstruction.", ), CatalogColumn( "frac_cosmos_1", "frac_cosmos_1", "SED latent", "float", "fraction", "Fractional contribution of COSMOS SED component 1.", "Optional in current local parquet. If absent, the configured reconstruction policy is explicit.", ), CatalogColumn( "frac_cosmos_2", "frac_cosmos_2", "SED latent", "float", "fraction", "Fractional contribution of COSMOS SED component 2.", "Optional in current local parquet. Fractions are normalized internally when their finite sum is positive.", ), CatalogColumn( "color_kind", "color_kind", "SED latent", "int8", "category", "HOD-based color class: 0 red sequence, 1 green valley, 2 blue cloud.", "Used for grouped COSMOS-vs-DSPS diagnostics.", ), CatalogColumn( "euclid_vis", "euclid_vis", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Simulated Euclid VIS flux density.", "Project config interprets this as Fnu in cgs units.", ), CatalogColumn( "euclid_nisp_y", "euclid_nisp_y", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Simulated Euclid NISP Y-band flux density.", ), CatalogColumn( "euclid_nisp_j", "euclid_nisp_j", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Simulated Euclid NISP J-band flux density.", ), CatalogColumn( "euclid_nisp_h", "euclid_nisp_h", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Simulated Euclid NISP H-band flux density.", ), CatalogColumn( "euclid_vis_abs", "euclid_vis_abs", "rest-frame photometry", "float", "erg s^-1 cm^-2 Hz^-1 at 10 pc", "Rest-frame Euclid VIS flux density at 10 parsec.", "Optional CosmoHub tooltip column used for pseudo-SED anchoring.", ), CatalogColumn( "euclid_nisp_y_abs", "euclid_nisp_y_abs", "rest-frame photometry", "float", "erg s^-1 cm^-2 Hz^-1 at 10 pc", "Rest-frame Euclid NISP Y-band flux density at 10 parsec.", "Optional CosmoHub tooltip column used for pseudo-SED anchoring.", ), CatalogColumn( "euclid_nisp_j_abs", "euclid_nisp_j_abs", "rest-frame photometry", "float", "erg s^-1 cm^-2 Hz^-1 at 10 pc", "Rest-frame Euclid NISP J-band flux density at 10 parsec.", "Optional CosmoHub tooltip column used for pseudo-SED anchoring.", ), CatalogColumn( "euclid_nisp_h_abs", "euclid_nisp_h_abs", "rest-frame photometry", "float", "erg s^-1 cm^-2 Hz^-1 at 10 pc", "Rest-frame Euclid NISP H-band flux density at 10 parsec.", "Optional CosmoHub tooltip column used for pseudo-SED anchoring.", ), CatalogColumn( "euclid_vis_el_model3_ext", "euclid_vis_el_model3_ext", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Euclid VIS flux including emission lines and internal attenuation.", "Branch-2 target set B.", ), CatalogColumn( "euclid_vis_el_model3_ext_odonnell_ext", "euclid_vis_el_model3_ext_odonnell_ext", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Euclid VIS flux including emission lines, internal attenuation, and Milky Way extinction.", "Branch-2 target set C.", ), CatalogColumn( "euclid_vis_el_model3_ext_odonnell_ext_error", "euclid_vis_el_model3_ext_odonnell_ext_error", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Flux uncertainty for the Euclid VIS Milky-Way-extincted flux.", "Used for chi-square in branch-2 target set D.", ), CatalogColumn( "euclid_vis_el_model3_ext_odonnell_ext_error_realization", "euclid_vis_el_model3_ext_odonnell_ext_error_realization", "photometry", "float", "erg s^-1 cm^-2 Hz^-1", "Noisy realization of the Euclid VIS Milky-Way-extincted flux.", "Branch-2 target set D.", ), *_lsst_band_columns("u"), *_lsst_band_columns("g"), *_lsst_band_columns("r"), *_lsst_band_columns("i"), *_lsst_band_columns("z"), *_lsst_band_columns("y"), CatalogColumn( "log_stellar_mass", "log_stellar_mass", "physical truth", "float", "log10(Msun h^-2)", "Base-10 logarithm of catalog stellar mass.", "Convert to log10(Msun) as log_stellar_mass + 2 log10(h).", ), CatalogColumn( "log_ml_r01", "log_ml_r01", "physical truth", "float", "log10(Msun/Lsun)", "Logarithm of stellar-mass-to-luminosity ratio in SDSS 0.1-r band.", ), CatalogColumn( "abs_mag_r01", "abs_mag_r01", "rest-frame photometry", "float", "mag + 5 log10(h)", "Absolute magnitude in the SDSS 0.1-r band in h=1 units.", ), CatalogColumn( "log_luminosity_r01", "log_luminosity_r01", "rest-frame photometry", "float", "log10(Lsun h^-2)", "Base-10 luminosity in the SDSS 0.1-r band.", ), CatalogColumn( "abs_mag_uv_unextincted", "abs_mag_uv_unextincted", "rest-frame photometry", "float", "mag + 5 log10(h)", "Unextincted absolute magnitude in a broad ultraviolet filter near 1800 A.", "Useful diagnostic for dust/SFR failures, not a direct DSPS fit target.", ), CatalogColumn( "metallicity_true", "metallicity", "physical truth", "float", "12 + log10(O/H)", "Gas-phase oxygen abundance, aliased by the download query.", "Reports convert to log10 metallicity proxy with offset -10.61.", ), CatalogColumn( "log_sfr_true", "log_sfr", "physical truth", "float", "log10(Msun yr^-1)", "Base-10 logarithm of catalog star-formation rate.", ), CatalogColumn( "sfr_true", "POW(10, log_sfr)", "physical truth", "double", "Msun yr^-1", "Linear star-formation rate computed by the download query.", ), CatalogColumn( "ebv_cosmos_1", "ebv_cosmos_1", "dust", "float", "mag", "COSMOS E(B-V) component 1.", ), CatalogColumn( "ebv_cosmos_2", "ebv_cosmos_2", "dust", "float", "mag", "COSMOS E(B-V) component 2.", ), CatalogColumn( "ext_curve_cosmos_1", "ext_curve_cosmos_1", "dust", "int8", "code", "Extinction-curve identifier for dust component 1.", ), CatalogColumn( "ext_curve_cosmos_2", "ext_curve_cosmos_2", "dust", "int8", "code", "Extinction-curve identifier for dust component 2.", ), CatalogColumn( "mw_extinction", "mw_extinction", "dust", "float", "mag", "Milky Way foreground extinction scalar.", ), CatalogColumn( "dust_ebv_true", "SQL CASE expression", "dust", "float", "mag", "Single intrinsic E(B-V) target computed by the download query.", "Bulge-fraction weighted when both COSMOS dust components are present.", ), CatalogColumn( "bulge_fraction", "bulge_fraction", "morphology", "float", "fraction", "Fraction of galaxy light assigned to the bulge component.", ), CatalogColumn( "disk_r50", "disk_r50", "morphology", "float", "arcsec", "Disk half-light radius.", ), CatalogColumn( "bulge_r50", "bulge_r50", "morphology", "float", "arcsec", "Bulge half-light radius.", ), CatalogColumn( "eps1_gal", "eps1_gal", "morphology", "float", "dimensionless", "Galaxy ellipticity component e1.", ), CatalogColumn( "eps2_gal", "eps2_gal", "morphology", "float", "dimensionless", "Galaxy ellipticity component e2.", ), CatalogColumn( "disk_ellipticity", "disk_ellipticity", "morphology", "float", "dimensionless", "Disk ellipticity.", ), CatalogColumn( "bulge_ellipticity", "bulge_ellipticity", "morphology", "float", "dimensionless", "Bulge ellipticity.", ), CatalogColumn( "bulge_nsersic", "bulge_nsersic", "morphology", "float", "dimensionless", "Bulge Sersic index.", ), CatalogColumn( "disk_nsersic", "disk_nsersic", "morphology", "float", "dimensionless", "Disk Sersic index.", ), CatalogColumn( "lm_halo", "lm_halo", "halo", "float", "log10(Msun h^-1)", "Base-10 logarithm of halo mass.", ), CatalogColumn( "lmbound_halo", "lmbound_halo", "halo", "float", "log10(Msun h^-1)", "Base-10 logarithm of bound halo mass.", ), CatalogColumn( "r_halo", "r_halo", "halo", "float", "kpc h^-1", "Halo radial distance in the lightcone.", ), CatalogColumn( "x_halo", "x_halo", "halo", "float", "Mpc h^-1", "Halo Cartesian x coordinate." ), CatalogColumn( "y_halo", "y_halo", "halo", "float", "Mpc h^-1", "Halo Cartesian y coordinate." ), CatalogColumn( "z_halo", "z_halo", "halo", "float", "Mpc h^-1", "Halo Cartesian z coordinate." ), CatalogColumn( "vx_halo", "vx_halo", "halo", "float", "km s^-1", "Halo peculiar velocity x component.", ), CatalogColumn( "vy_halo", "vy_halo", "halo", "float", "km s^-1", "Halo peculiar velocity y component.", ), CatalogColumn( "vz_halo", "vz_halo", "halo", "float", "km s^-1", "Halo peculiar velocity z component.", ), CatalogColumn( "n_sats_halo", "n_sats_halo", "halo", "int32", "count", "Number of satellite galaxies assigned to the halo.", ), CatalogColumn( "num_p_halo", "num_p_halo", "halo", "int32", "count", "Number of simulation particles associated with the halo.", ), CatalogColumn( "conc_vir_halo", "conc_vir_halo", "halo", "float", "dimensionless", "Virial concentration of the halo.", ), CatalogColumn( "rs_halo", "rs_halo", "halo", "float", "kpc h^-1", "Halo NFW scale radius." ), CatalogColumn( "rvir_halo", "rvir_halo", "halo", "float", "kpc h^-1", "Halo virial radius." ), ) CATALOG_COLUMN_BY_NAME = {column.name: column for column in CATALOG_COLUMNS}
[docs] def known_catalog_columns() -> set[str]: """Return the canonical local column names documented for catalog 353.""" return set(CATALOG_COLUMN_BY_NAME)