From 88f631dfce0b9186cce020639fb1fb862fa38d7b Mon Sep 17 00:00:00 2001 From: Dmitry Makarov Date: Sun, 9 Aug 2026 23:35:06 +0300 Subject: [PATCH] Morphology schema --- postgres/drafts/16_morph.sql | 424 +++++++++++++++++++++++++++-------- 1 file changed, 331 insertions(+), 93 deletions(-) diff --git a/postgres/drafts/16_morph.sql b/postgres/drafts/16_morph.sql index ec5f9eb9..ad969e27 100644 --- a/postgres/drafts/16_morph.sql +++ b/postgres/drafts/16_morph.sql @@ -7,24 +7,13 @@ CREATE SCHEMA IF NOT EXISTS morphology ; COMMENT ON SCHEMA morphology IS 'Catalog of the galaxy morphology'; -CREATE TYPE morphology.class AS ENUM ('elliptical','lenticular','spiral','dwarf') ; -COMMENT ON TYPE morphology.class IS '{ -"description": "Class of galaxies", -"values": { - "elliptical": "Elliptical or spherical shape, structureless, smooth intensity distribution with relatively steep gradient." , - "lenticular": "Spheroidal bulge and disk but no visible spiral arms in the disk." , - "spiral": "Central bulge and disk with spiral arms." , - "dwarf": "No arms, no bulge. Low surface brightness. Irregular may host a bar. May contain a tight nucleus." - } -}'; - -CREATE TYPE morphology.MethodType AS ENUM ( 'expert' , 'citizen science', 'machine learning', 'parametric', 'kinematic', 'simplified' ) ; +CREATE TYPE morphology.MethodType AS ENUM ( 'expert' , 'citizen science', 'machine learning', 'parametric', 'nonparametric', 'kinematic', 'simplified' ) ; COMMENT ON TYPE morphology.MethodType IS '{ "description": "Type of the morphological classification", "values": { "expert": "Classical detailed visual classification of galaxy morphology (Hubble, de Vaucouleurs, etc.) made by experts" , - "citizen science": "Detailed visual classification of galaxy morphology (Galaxy Zoo) made by citizen scientists" , - "machine learning": "Image based automatic classification based on machine learning algorithms (CNN, etc)" , + "citizen science": "Visual classification of galaxy morphology performed by citizen scientists (e.g. Galaxy Zoo)" + "machine learning": "Image-based automatic classification based on machine learning algorithms (CNN, etc)" , "parametric": "Parametric classification based on photometry and structural relations (B/T-type relation, etc.)" , "nonparametric": "Nonparametric indices based on image statistics (Gini, M20, CAS, etc.)" , "kinematic": "Classification based on galaxy kinematics (fast/slow rotators, dispersion-dominated systems, etc.)" , @@ -33,113 +22,329 @@ COMMENT ON TYPE morphology.MethodType IS '{ }'; -CREATE TYPE morphology.ExtraType AS ENUM ('UCD','cE','dE','UFD','dSph','dS0','UDG','Tr','Ir','BCD','Im','LSB','XLSB') ; +CREATE TYPE morphology.ClassType AS ENUM ('elliptical', 'lenticular', 'spiral', 'irregular', 'spheroidal') ; +COMMENT ON TYPE morphology.ClassType IS '{ +"description": "Galaxy class", +"values": { + "elliptical": "Elliptical or spherical shape, structureless, smooth intensity distribution with relatively steep gradient." , + "lenticular": "Spheroidal bulge and disk but no visible spiral arms in the disk." , + "spiral": "Central bulge and disk with spiral arms." , + "irregular": "No arms, no bulge. Irregular profile. Low surface brightness. May host a bar.", + "spheroidal": "Regular low surface brightness profile, no arms. May contain a tight nucleus." + } +}'; + + +CREATE TYPE morphology.ExtraType AS ENUM ('UCD', 'cE', 'dE', 'dS0', 'dSph', 'UDG', 'UFD', 'Tr', 'Ir', 'Im', 'BCD','LSB','XLSB') ; COMMENT ON TYPE morphology.ExtraType IS '{ -"description": "Type of dwarf galaxies", -"values": { - "UCD": "Ultra Compact Dwarf galaxy" , - "cE": "Compact Elliptical galaxy" , - "dE": "Dwarf Elliptical galaxy" , - "UFD": "Ultra Faint Dwarf galaxy" , - "dSph": "Dwarf Spheroidal galaxy" , - "dS0": "Dwarf Lenticular galaxy" , - "UDG": "Ultra Diffuse Galaxy" , +"description": "Additional morphological and phenomenological galaxy types", +"values": { + "UCD": "Ultra-compact dwarf galaxy" , + "cE": "Compact elliptical galaxy" , + "dE": "Dwarf elliptical galaxy" , + "dS0": "Dwarf lenticular galaxy" , + "dSph": "Dwarf spheroidal galaxy" , + "UDG": "Ultra-diffuse galaxy" , + "UFD": "Ultra-faint dwarf galaxy" , "Tr": "Transitional type galaxy" , "Ir": "Irregular galaxy" , "Im": "Magellanic type galaxy" , - "BCD": "Blue Compact Dwarf galaxy" , - "LSB": "Low Surface Brightness galaxy" , - "XLSB": "Extra Low Surface Brightness galaxy" + "BCD": "Blue compact dwarf galaxy" , + "LSB": "Low surface brightness galaxy" , + "XLSB": "Extra low surface brightness galaxy" } }'; -------------- Hubble sequence -------------- -CREATE TABLE IF NOT EXISTS morphology.hubble ( +CREATE TABLE IF NOT EXISTS morphology.HubbleSequence ( t SmallInt PRIMARY KEY -, class morphology.class NOT NULL +, class morphology.ClassType NOT NULL , stage Text NOT NULL , design Text NOT NULL , description Text NOT NULL ) ; -COMMENT ON TABLE morphology.hubble IS 'The Hubble sequence' ; -COMMENT ON COLUMN morphology.hubble.t IS 'de Vaucouleurs numeric type' ; -COMMENT ON COLUMN morphology.hubble.class IS 'Galaxy class: elliptical, lenticular, spiral, dwarf' ; -COMMENT ON COLUMN morphology.hubble.stage IS 'Intermediate stage within each class' ; -COMMENT ON COLUMN morphology.hubble.design IS '{"description": "Hubble morphological type", "ucd": "src.morph.type"}' ; -COMMENT ON COLUMN morphology.hubble.description IS 'Description' ; +COMMENT ON TABLE morphology.HubbleSequence IS 'The Hubble sequence' ; +COMMENT ON COLUMN morphology.HubbleSequence.t IS '{"description": "de Vaucouleurs numeric type", "ucd": "src.morph.type"}' ; +COMMENT ON COLUMN morphology.HubbleSequence.class IS '{"description": "Galaxy class: elliptical, lenticular, spiral, irregular, or spheroidal", "ucd": "meta.code.class"}' ; +COMMENT ON COLUMN morphology.HubbleSequence.stage IS '{"description": "Intermediate stage within each class", "ucd": "meta.code.class;obs.sequence"}' ; +COMMENT ON COLUMN morphology.HubbleSequence.design IS '{"description": "Hubble morphological type", "ucd": "src.morph.type"}' ; +COMMENT ON COLUMN morphology.HubbleSequence.description IS '{"description": "Description", "ucd": "meta.note"}' ; -INSERT INTO morphology.hubble (t, class, stage, design, description) VALUES +INSERT INTO morphology.HubbleSequence (t, class, stage, design, description) VALUES (-6, 'elliptical', 'compact', 'cE', 'Compact elliptical') , (-5, 'elliptical', '0-6', 'E', 'Elliptical') , (-4, 'elliptical', 'cD', 'cD', 'Giant elliptical. Sharp central profile and very extended low surface brightness halo') -, (-3, 'lenticular', 'early', 'S0^-', 'Dominant bulge, no sign of structure in disk nor dust') -, (-2, 'lenticular', 'intermediate', 'S0^0', 'Some structure in disk but no arms, low amounts of dust') -, (-1, 'lenticular', 'late', 'S0^+', 'Clear structure in disk but no arms, thin dust lanes') -, ( 0, 'spiral', '0/a', 'S0/a', 'Very tightly wound arms, very prominent bulge, low amounts of dust') -, ( 1, 'spiral', 'a', 'Sa', 'Tightly wound arms, very prominent bulge, low amounts of dust') -, ( 2, 'spiral', 'ab', 'Sab', 'Quite tightly wound arms, prominent bulge, low amounts of dust') -, ( 3, 'spiral', 'b', 'Sb', 'Quite tightly wound arms, prominent bulge, strong dust lanes') -, ( 4, 'spiral', 'bc', 'Sbc', 'Quite loosely wound arms, medium bulge, dust lanes') -, ( 5, 'spiral', 'c', 'Sc', 'Grand design spiral, fairly weak bulge, dust lanes') -, ( 6, 'spiral', 'cd', 'Scd', 'Loosely wound and weak arms, weak bulge, scattered dust') -, ( 7, 'spiral', 'd', 'Sd', 'Loosely wound and very weak arms, weak bulge, scattered dust') -, ( 8, 'spiral', 'dm', 'Sdm', 'Very loosely wound arms, very weak bulge, low amounts of dust') -, ( 9, 'spiral', 'm', 'Sm', 'Some indication of spiral arms, very weak bulge, low amounts of dust') -, (10, 'dwarf', 'Magellanic', 'Im', 'No arms, no bulge. Irregular profile. Low surface brightness. May host a bar') -, (11, 'dwarf', 'Spheroidal', 'dSph', 'Regular low surface brightness profile, no arms. May contain a tight nucleus') +, (-3, 'lenticular', 'early', 'S0^-', 'Lenticular. Dominant bulge, no sign of structure in disk nor dust') +, (-2, 'lenticular', 'intermediate', 'S0^0', 'Lenticular. Some structure in disk but no arms, low amounts of dust') +, (-1, 'lenticular', 'late', 'S0^+', 'Lenticular. Clear structure in disk but no arms, thin dust lanes') +, ( 0, 'spiral', '0/a', 'S0/a', 'Spiral. Very tightly wound arms, very prominent bulge, low amounts of dust') +, ( 1, 'spiral', 'a', 'Sa', 'Spiral. Tightly wound arms, very prominent bulge, low amounts of dust') +, ( 2, 'spiral', 'ab', 'Sab', 'Spiral. Quite tightly wound arms, prominent bulge, low amounts of dust') +, ( 3, 'spiral', 'b', 'Sb', 'Spiral. Quite tightly wound arms, prominent bulge, strong dust lanes') +, ( 4, 'spiral', 'bc', 'Sbc', 'Spiral. Quite loosely wound arms, medium bulge, dust lanes') +, ( 5, 'spiral', 'c', 'Sc', 'Spiral. Grand design spiral, fairly weak bulge, dust lanes') +, ( 6, 'spiral', 'cd', 'Scd', 'Spiral. Loosely wound and weak arms, weak bulge, scattered dust') +, ( 7, 'spiral', 'd', 'Sd', 'Spiral. Loosely wound and very weak arms, weak bulge, scattered dust') +, ( 8, 'spiral', 'dm', 'Sdm', 'Spiral. Very loosely wound arms, very weak bulge, low amounts of dust') +, ( 9, 'spiral', 'm', 'Sm', 'Spiral. Some indication of spiral arms, very weak bulge, low amounts of dust') +, (10, 'irregular', 'irregular', 'Ir', 'Irregular including Magellanic and non-Magellanic types. No arms, no bulge. Irregular profile. Low surface brightness. May host a bar') +, (11, 'spheroidal', 'spheroidal', 'dSph', 'Dwarf spheroidal/elliptical. Regular low-surface-brightness profile with no spiral arms. May contain a compact nucleus. LEDA extension of the standard Hubble sequence') +; + + +-------------- Morphology attributes -------------- +CREATE TYPE morphology.AttributeGroupType AS ENUM ( 'appearance' , 'environment' , 'bulge' , 'spiral pattern' , 'texture' , 'dynamics', 'interaction', 'peculiar') ; +COMMENT ON TYPE morphology.AttributeGroupType IS '{ +"description": "Groups of galaxy morphological attributes", +"values": { + "appearance": "Global appearance, including inclination and elongation", + "environment": "Local environment, including neighbouring galaxies and image contamination", + "bulge": "Properties and morphology of the central bulge", + "spiral pattern": "Properties of spiral arms, including their prominence and curvature", + "texture": "Textural properties, including visible dust, dust patchiness, flocculence and high-surface-brightness regions", + "dynamics": "Internal structural features associated with galaxy dynamics, including bars and rings", + "interaction": "Morphological distortions and structures associated with galaxy interactions, including perturbations and tidal features", + "peculiar": "Unusual geometric or structural configurations not adequately described by the standard Hubble classification" + } +}'; + + +CREATE TABLE IF NOT EXISTS morphology.attributes ( + id Text PRIMARY KEY +, attribute_group morphology.AttributeGroupType NOT NULL +, description JSON +) ; + +COMMENT ON TABLE morphology.attributes IS 'Dictionary of attributes' ; +COMMENT ON COLUMN morphology.attributes.id IS '{"description": "Attribute ID", "ucd": "meta.id"}' ; +COMMENT ON COLUMN morphology.attributes.attribute_group IS 'Attribute group' ; +COMMENT ON COLUMN morphology.attributes.description IS '{"description": "Attribute description", "ucd": "meta.note"}' ; + +INSERT INTO morphology.attributes VALUES + ( 'inclination/elongation' , 'appearance', +'{ +"description": "Dimensionless inclination parameter f=1−cosθ for disk galaxies and apparent elongation f=1−b/a for galaxies with no evident disk (elliptical, irregular and spheroidal galaxies)", +"values": { + "0": "0°–35° disk inclination angle (face-on) or very low elongation 0 ≤ f < 0.2", + "0.25": "35°–50° disk inclination angle or low elongation 0.2 ≤ f < 0.4", + "0.5": "50°–70° disk inclination angle or moderate elongation 0.4 ≤ f < 0.7", + "0.75": "70°–80° disk inclination angle or strong elongation 0.7 ≤ f < 0.8", + "1": "80°–90° disk inclination angle (edge-on) or very strong elongation 0.8 ≤ f ≤ 1" + } +}'::JSON ) + +, ( 'contamination' , 'environment', +'{ +"description": "Severity of the contamination by bright stars, overlapping galaxies or image artifacts", +"values": { + "0": "no overlapping source on the galaxy", + "0.25": "only faint sources overlapping the galaxy (negligible effect on photometry or morphology)", + "0.5": "overlapping sources on the galaxy or faint light pollution (some impact on photometry and morphology)", + "0.75": "bright sources overlapping the galaxy or strong light pollution (large impact on photometry and morphology)", + "1": "most of the galaxy dominated by light from a very bright contaminant (unreliable photometry or morphology)" + } +}'::JSON ) + +, ( 'b/t' , 'bulge', +'{ +"description": "Bulge/Total ratio: relative contribution of the bulge to the total flux of the galaxy", +"values": { + "0": "no bulge", + "0.25": "very weak bulge ~25% of the total flux", + "0.5": "medium bulge ~50% of the total flux", + "0.75": "strong bulge ~75% of the total flux", + "1": "all flux within bulge, no disk nor spiral arms" + } +}'::JSON ) + +, ( 'spiral' , 'spiral pattern', +'{ +"description": "Relative prominence of the spiral pattern", +"values": { + "0": "no visible spiral pattern", + "0.25": "weak or barely visible spiral pattern", + "0.5": "moderately prominent spiral pattern", + "0.75": "strong and clearly defined spiral pattern", + "1": "very prominent spiral pattern with dominant, well-defined arms" + } +}'::JSON ) +, ( 'spiral curvature' , 'spiral pattern', +'{ +"description": "Intrinsic curvature of the spiral arms as if seen face-on", +"values": { + "0": "wide open spiral arms, with pitch angles of 40° or more", + "0.25": "open spiral arms, with pitch angles of 30° to 40°", + "0.5": "moderately open spiral arms, with pitch angles of 20° to 30°", + "0.75": "closed-in spiral arms, with pitch angles of 10° to 20°", + "1": "tightly wound spiral arms, with pitch angles of 10° or less" + } +}'::JSON ) + +, ( 'dust' , 'texture', +'{ +"description": "Dust content", +"values": { + "0": "no dust", + "0.25": "indications of dust, but dust cannot be located", + "0.5": "low to moderate amounts of dust, can be located", + "0.75": "significant amounts of dust covering <50% of the surface of the galaxy", + "1": "high amounts of dust covering >50% of the surface of the galaxy" +} +}'::JSON ) +, ( 'dust patchiness' , 'texture', +'{ +"description": "Patchiness of the dust distribution", +"values": { + "0": "thin lane(s) of dust with smooth outline", + "0.25": "thin lane(s) of dust with patchy outline", + "0.5": "patchy lane(s) of dust and some other small patches", + "0.75": "very patchy lane(s) of dust and many other patches", + "1": "extremely patchy distribution of the dust" + } +}'::JSON ) +, ( 'flocculence' , 'texture', +'{ +"description": "Flocculent features of scattered HII regions relative to the spiral arms and the underlying smooth profile components", +"values": { + "0": "no visible flocculence", + "0.25": "weak/barely visible flocculence/patchiness limited to small parts of the galaxy disk", + "0.5": "some flocculence visible in parts of the galaxy disk", + "0.75": "significant flocculence over most of the galaxy disk", + "1": "strong flocculence over most of the galaxy disk" + } +}'::JSON ) +, ( 'hotspot' , 'texture', +'{"description": "Regions of very high surface brightness (giant regions of star formation, active nuclei, or stellar nuclei of dwarf galaxies)", +"values": { + "0": "no hot spot", + "0.25": "small part of the galaxy flux included in one or several hot spots", + "0.5": "moderate part of the galaxy flux included in one or several hot spots", + "0.75": "significant part of the galaxy flux included in one or several hot spots", + "1": "one or several hot spots dominate the galaxy flux" + } +}'::JSON ) + +, ( 'bar' , 'dynamics', +'{ +"description": "Relative prominence and extent of the bar", +"values": { + "0": "no visible bar", + "0.25": "short, barely visible bar feature", + "0.5": "short bar, with a length about one third of D25", + "0.75": "long bar, that extends over about half of D25", + "1": "very long, prominent bar that extends over more than half of D25" + } +}'::JSON ) +, ( 'inner ring' , 'dynamics', +'{ +"description": "Presence and relative prominence of an inner ring-like overdensity located within the disk and/or spiral pattern at the end of the bar (distinct from nuclear rings located well inside the bar)", +"values": { + "0": "no inner ring", + "0.25": "low ring contribution to the galaxy flux", + "0.5": "intermediate ring contribution to the galaxy flux", + "0.75": "significant ring contribution to the galaxy flux", + "1": "highest ring contribution to the galaxy flux" + } +}'::JSON ) +, ( 'outer ring' , 'dynamics', +'{ +"description": "Presence and relative prominence of a ring-like overdensity located mostly outside the main disk and spiral-arm pattern", +"values": { + "0": "no outer ring", + "0.25": "low ring contribution to the galaxy flux", + "0.5": "intermediate ring contribution to the galaxy flux", + "0.75": "significant ring contribution to the galaxy flux", + "1": "highest ring contribution to the galaxy flux" + } +}'::JSON ) +, ( 'pseudo-ring' , 'dynamics', +'{ +"description": "Presence and relative prominence of an outer pseudo-ring (Buta & Combes, 1996): R1 pseudo-ring having a dimpled eight shape due to a 180◦ winding of the spiral arms relative to the bar; R2 pseudo-ring with a higher winding of 270◦; and an intermediate R1-R2 pattern", +"values": { + "0": "no visible pseudo-ring feature", + "0.25": "R2 and R1-R2 pseudo-rings containing a low fraction of the galaxy flux", + "0.5": "R2 and R1-R2 pseudo-rings containing a higher fraction of the galaxy flux", + "0.75": "R1 pseudo-ring feature containing a low fraction of the galaxy flux", + "1": "R1 pseudo-ring feature containing a higher fraction of the galaxy flux" + } +}'::JSON ) + +, ( 'perturbation' , 'interaction', +'{ +"description": "Amplitude of distortions of the galaxy profile", +"values": { + "0": "no distortion", + "0.25": "slight distortion", + "0.5": "moderate distortion", + "0.75": "strong distortion; profile components (bulge, disk, spiral arms) still visible", + "1": "completely distorted profile, components can be barely distinguished" + } +}'::JSON ) + +-- , ( 'x-shape' , 'bulge', '{"description": "An X-shaped or peanut-shaped morphology of the central bulge, usually associated with a vertically thickened bar"}'::JSON ) + +-- , ( 'tidal tail' , 'interaction', '{"description": "A long, narrow, low-surface-brightness stellar structure extending from a galaxy, produced by tidal interaction or merger and generally connected to the parent galaxy"}'::JSON ) +-- , ( 'tidal stream' , 'interaction', '{"description": "An elongated, diffuse, low-surface-brightness stellar structure produced by tidal stripping and tracing the orbit or disrupted material of a galaxy or satellite"}'::JSON ) +-- , ( 'tidal bridge' , 'interaction', '{"description": "An elongated stellar or gaseous structure connecting two interacting galaxies or their tidal debris, produced by their mutual gravitational interaction"}'::JSON ) +-- , ( 'tidal debris' , 'interaction', '{"description": "Diffuse stellar material distributed outside the main body of a galaxy as a result of tidal interaction, stripping or merger"}'::JSON ) +-- , ( 'shell' , 'interaction', '{"description": "Diffuse, arc-like or shell-like stellar structures surrounding a galaxy, typically interpreted as phase-wrapped tidal debris from a past merger or accretion event"}'::JSON ) +-- , ( 'fan' , 'interaction', '{"description": "A broad, diffuse, fan-shaped stellar structure extending from a galaxy, generally interpreted as tidal debris associated with an interaction, merger or accretion event"}'::JSON ) +-- , ( 'plume' , 'interaction', '{"description": "A diffuse, elongated or plume-shaped low-surface-brightness structure extending from a galaxy, generally associated with tidal interaction, stripping or merger activity"}'::JSON ) + +-- , ( 'polar ring' , 'peculiar', '{"description": "A ring-like structure of gas, stars, or both orbiting a galaxy in a plane approximately perpendicular to the main stellar disk"}'::JSON ) +-- , ( 'polar disk' , 'peculiar', '{"description": "An extended disk of gas, stars, or both whose rotation plane is strongly inclined, typically close to perpendicular, to the main stellar disk"}'::JSON ) +-- , ( 'off-center' , 'peculiar', '{"description": "A nucleus whose photometric center is significantly displaced from the center of the outer galaxy body or disk"}'::JSON ) +-- , ( 'lopsided' , 'peculiar', '{"description": "Asymmetric distribution of the galaxy light or structural components about its center, such that one side of the galaxy is significantly more extended or prominent than the other"}'::JSON ) + +-- , ( 'multiplicity' , ARRAY[0,4], 'environment', +-- '{ +-- "description": "Abundance of galaxies brighter than main+5mag within R<=0.75*D25", +-- "values": { +-- "0": "no other galaxy", +-- "1": "one neighbour", +-- "2": "two neighbours", +-- "3": "three neighbours", +-- "4": "four or more neighbours" +-- } +-- }'::JSON ) + +-- , ( 'arm rotation' , 'spiral pattern', +-- '{ +-- "description": "Direction of spiral pattern rotation: clockwise (East of North negative) or counterclockwise (East of North positive)", +-- "values": { +-- "0": "definitely clockwise", +-- "0.25": "probably clockwise", +-- "0.5": "no preferred direction", +-- "0.75": "probably counterclockwise", +-- "1": "definitely counterclockwise" +-- } +-- }'::JSON ) + ; -------------- de Vaucouleurs numeric types -------------- CREATE TABLE IF NOT EXISTS morphology.t ( record_id Text PRIMARY KEY REFERENCES layer0.records(id) ON UPDATE cascade ON DELETE restrict -, value SmallInt NOT NULL REFERENCES morphology.hubble (t) ON UPDATE cascade ON DELETE restrict +, value SmallInt NOT NULL REFERENCES morphology.HubbleSequence (t) ON UPDATE cascade ON DELETE restrict , em_value Real , ep_value Real , method morphology.MethodType NOT NULL , CHECK ( (em_value IS NULL and ep_value IS NULL) or (em_value IS NOT NULL and ep_value IS NOT NULL) ) ) ; -COMMENT ON TABLE morphology.t IS 'Catalog of de Vaucouleurs numeric types' ; -COMMENT ON COLUMN morphology.t.record_id IS 'Record ID'; +COMMENT ON TABLE morphology.t IS 'Catalog of de Vaucouleurs numeric types' ; +COMMENT ON COLUMN morphology.t.record_id IS '{"description": "Record ID", "ucd": "meta.id"}'; COMMENT ON COLUMN morphology.t.value IS '{"description": "de Vaucouleurs numeric type", "ucd": "src.morph.type"}' ; -COMMENT ON COLUMN morphology.t.em_value IS 'Lower error' ; -COMMENT ON COLUMN morphology.t.ep_value IS 'Upper error' ; -COMMENT ON COLUMN morphology.t.method IS 'Morphology method ID'; - - --------------- Morphology attributes -------------- -CREATE TABLE IF NOT EXISTS morphology.attributes ( - id Text PRIMARY KEY -, range Real[2] -, description JSON -) ; +COMMENT ON COLUMN morphology.t.em_value IS '{"description": "Lower error", "ucd": "stat.error"}' ; +COMMENT ON COLUMN morphology.t.ep_value IS '{"description": "Upper error", "ucd": "stat.error"}' ; +COMMENT ON COLUMN morphology.t.method IS '{"description": "Morphology measurement method ID", "ucd": "meta.id"}'; -COMMENT ON TABLE morphology.attributes IS 'List of attributes' ; -COMMENT ON COLUMN morphology.attributes.id IS 'Attribute ID' ; -COMMENT ON COLUMN morphology.attributes.range IS 'Attribute value range' ; -COMMENT ON COLUMN morphology.attributes.description IS 'Attribute description' ; - -INSERT INTO morphology.attributes VALUES - ( 'multiplicity' , ARRAY[0,4], '{"description": "Abundance of galaxies brighter than main+5mag within R<=0.75*D25", "values": {"0": "no other galaxy", "1": "one neighbour", "2": "two neighbours", "3": "three neighbours", "4": " four or more neighbours"}}'::JSON ) -, ( 'contamination' , ARRAY[0,1], '{"description": "severity of the contamination by bright stars, overlapping galaxies or image artifacts", "values": {"0": "no overlapping source on the galaxy", "0.25": "only faint sources overlapping the galaxy (negligible effect on photometry or morphology)", "0.5": "overlapping sources on the galaxy or faint light pollution (some impact on photometry and morphology)", "0.75": "bright sources overlapping the galaxy or strong light pollution (large impact on photometry and morphology)", "1": "most of the galaxy dominated by light from a very bright contaminant (unreliable photometry or morphology)"}}'::JSON ) -, ( 'perturbation' , ARRAY[0,1], '{"description": "amplitude of distortions in the galaxy profile", "values": {"0": "no distortion", "0.25": "slight distortion", "0.5": "moderate distortion", "0.75": "Strong distortion. Profile components (bulge, disk, spiral arms) still visible", "1": "Completely distorted profile, components can be barely distinguished"}}'::JSON ) -, ( 'b/t' , ARRAY[0,1], '{"description": "Bulge/Total ratio: relative contribution of the bulge to the total flux of the galaxy", "values": {"0": "no bulge", "0.25": "very weak bulge ~25% of the total flux", "0.5": "medium bulge ~50% of the total flux", "0.75": "strong bulge ~75% of the total flux", "1": "all flux within bulge, no disk nor spiral arms"}}'::JSON ) -, ( 'arm' , ARRAY[0,1], '{"description": "relative strength of spiral arms", "values": {"0": "very weak or no spiral arms", "0.25": "weak contribution to the galaxy flux", "0.5": "moderate contribution to the galaxy flux", "0.75": "significant contribution to the galaxy flux", "1": "highest contribution to the galaxy flux"}}'::JSON ) -, ( 'arm curvature' , ARRAY[0,90], '{"description": "intrinsic curvature of the spiral arms as if seen face-on", "values": {"45": "wide open spiral arms, with pitch angles of 40 degrees or more", "35": "open spiral arms, with pitch angles of 30 to 40 degrees", "25": "moderately open spiral arms, with pitch angles of 20 to 30 degrees", "15": "closed-in spiral arms, with pitch angles of 10 to 20 degrees", "5": "tightly wound spiral arms, with pitch angles of 10 degrees or less"}}'::JSON ) -, ( 'dust' , ARRAY[0,1], '{"description": "presence of dust", "values": {"0": "no dust", "0.25": "indications of dust, but dust cannot be located", "0.5": "low to moderate amounts of dust, can be located", "0.75": "significant amounts of dust covering <50% of the surface of the galaxy", "1": "high amounts of dust covering >50% of the surface of the galaxy"}}'::JSON ) -, ( 'dust patchness' , ARRAY[0,1], '{"description": "patchiness of the dust distribution", "values": {"0": "thin lane(s) of dust with smooth outline", "0.25": "thin lane(s) of dust with patchy outline", "0.5": "patchy lane(s) of dust and some other small patches", "0.75": "very patchy lane(s) of dust and many other patches", "1": "extremely patchy distribution of the dust"}}'::JSON ) -, ( 'flocculence' , ARRAY[0,1], '{"description": "flocculent features of scattered HII regions relative to the spiral arms and the underlying smooth profile components", "values": {"0": "no visible flocculence", "0.25": "weak/barely visible flocculence/patchiness limited to small parts of the galaxy disk", "0.5": "some flocculence visible in parts of the galaxy disk", "0.75": "significant flocculence over most of the galaxy disk", "1": "strong flocculence over most of the galaxy disk"}}'::JSON ) -, ( 'hot spot' , ARRAY[0,1], '{"description": "regions of very high surface brightness (giant regions of star formation, active nuclei, or stellar nuclei of dwarf galaxies)", "values": {"0": "no hot spot", "0.25": "small part of the galaxy flux included in one or several hot spots", "0.5": "moderate part of the galaxy flux included in one or several hot spots", "0.75": "significant part of the galaxy flux included in one or several hot spots", "1": "one or several hot spots dominate the galaxy flux"}}'::JSON ) -, ( 'bar' , ARRAY[0,1], '{"description": "presence of a central bar component", "values": {"0": "no visible bar", "0.25": "short, barely visible bar feature", "0.5": "short bar, with a length about one third of D25", "0.75": "long bar, that extends over about half of D25", "1": "very long, prominent bar that extends over more than half of D25"}}'::JSON ) -, ( 'inner ring' , ARRAY[0,1], '{"description": "presence of a ring-like overdensity that is within the disk and/or spiral arm pattern, and at the end of the bar when present (contrary to nuclear rings that occur well within the bar)", "values": {"0": "no inner ring", "0.25": "low ring contribution to the galaxy flux", "0.5": "intermediate ring contribution to the galaxy flux", "0.75": "significant ring contribution to the galaxy flux", "1": "highest ring contribution to the galaxy flux"}}'::JSON ) -, ( 'outer ring' , ARRAY[0,1], '{"description": "presence of a ring-like over-density that lies mostly outside the disk and/or spiral arm pattern", "values": {"0": "no outer ring", "0.25": "low ring contribution to the galaxy flux", "0.5": "intermediate ring contribution to the galaxy flux", "0.75": "significant ring contribution to the galaxy flux", "1": "highest ring contribution to the galaxy flux"}}'::JSON ) -, ( 'pseudo-ring' , ARRAY[0,1], '{"description": "presence of a outer pseudo-rings (Buta & Combes, 1996): R1-ring having a dimpled eight shape due to a 180◦ winding of the spiral arms with respect to the end of a bar; R2-feature with a higher winding of 270◦ of the spiral arms with respect to the bar; and the intermediate R1-R2 pattern", "values": {"0": "no visible pseudo-ring feature", "0.25": "R2 and R1-R2 pseudo-rings containing a low fraction of the galaxy flux", "0.5": "R2 and R1-R2 pseudo-rings containing a higher fraction of the galaxy flux", "0.75": "R1 pseudo-ring feature containing a low fraction of the galaxy flux", "1": "R1 pseudo-ring feature containing a higher fraction of the galaxy flux"}}'::JSON ) -; +-------------- Catalog of galaxy features -------------- CREATE TABLE IF NOT EXISTS morphology.features ( record_id Text NOT NULL REFERENCES layer0.records(id) ON UPDATE cascade ON DELETE restrict , attribute Text NOT NULL REFERENCES morphology.attributes (id) ON UPDATE cascade ON DELETE restrict @@ -147,25 +352,58 @@ CREATE TABLE IF NOT EXISTS morphology.features ( , em_value Real , ep_value Real , method morphology.MethodType NOT NULL +, CHECK (value >= 0 AND value <= 1) , CHECK ( (em_value IS NULL and ep_value IS NULL) or (em_value IS NOT NULL and ep_value IS NOT NULL) ) -, PRIMARY KEY (record_id, method) +, PRIMARY KEY (record_id, attribute, method) ) ; -COMMENT ON TABLE morphology.features IS 'Catalog of morphology features' ; -COMMENT ON COLUMN morphology.features.record_id IS 'Record ID'; +COMMENT ON TABLE morphology.features IS 'Catalog of morphological features' ; +COMMENT ON COLUMN morphology.features.record_id IS '{"description": "Record ID", "ucd": "meta.id"}'; COMMENT ON COLUMN morphology.features.attribute IS 'Attribute ID' ; -COMMENT ON COLUMN morphology.features.value IS 'Attribute strength' ; +COMMENT ON COLUMN morphology.features.value IS 'Attribute value' ; COMMENT ON COLUMN morphology.features.em_value IS 'Lower error of the attribute' ; COMMENT ON COLUMN morphology.features.ep_value IS 'Upper error of the attribute' ; -COMMENT ON COLUMN morphology.features.method IS 'Morphology method ID'; +COMMENT ON COLUMN morphology.features.method IS '{"description": "Morphology measurement method ID", "ucd": "meta.id"}'; -------------- Morphology of Dwarfs -------------- CREATE TABLE IF NOT EXISTS morphology.extra ( - record_id Text PRIMARY KEY REFERENCES layer0.records(id) ON UPDATE cascade ON DELETE restrict + record_id Text NOT NULL REFERENCES layer0.records(id) ON UPDATE cascade ON DELETE restrict , type morphology.ExtraType NOT NULL +, PRIMARY KEY (record_id, type) ) ; +COMMENT ON TABLE morphology.extra IS 'Catalog of extra types' ; +COMMENT ON COLUMN morphology.extra.record_id IS '{"description": "Record ID", "ucd": "meta.id"}'; +COMMENT ON COLUMN morphology.extra.type IS '{"description": "Extra morphology type", "ucd": "src.morph.type"}' ; + + +-------------- Spiral pattern rotation -------------- +CREATE TABLE IF NOT EXISTS morphology.spiral_winding ( + record_id Text PRIMARY KEY REFERENCES layer0.records(id) ON UPDATE cascade ON DELETE restrict +, winding Real NOT NULL +, em_winding Real +, ep_winding Real +, method morphology.MethodType NOT NULL +, CHECK (winding >= -1 AND winding <= 1) +, CHECK ( (em_winding IS NULL and ep_winding IS NULL) or (em_winding IS NOT NULL and ep_winding IS NOT NULL) ) +); + +COMMENT ON TABLE morphology.spiral_winding IS 'Catalog of spiral pattern winding' ; +COMMENT ON COLUMN morphology.spiral_winding.record_id IS '{"description": "Record ID", "ucd": "meta.id"}'; +COMMENT ON COLUMN morphology.spiral_winding.winding IS '{ +"description": "Apparent winding direction of the spiral pattern on the sky", +"values": { + "+1": "definitely clockwise", + "+0.5": "probably clockwise", + "0": "no preferred direction", + "-0.5": "probably counter-clockwise", + "-1": "definitely counter-clockwise" + } +}' ; +COMMENT ON COLUMN morphology.spiral_winding.em_winding IS 'Lower error of the winding direction' ; +COMMENT ON COLUMN morphology.spiral_winding.ep_winding IS 'Upper error of the winding direction' ; +COMMENT ON COLUMN morphology.spiral_winding.method IS '{"description": "Morphology measurement method ID", "ucd": "meta.id"}'; + --- ROLLBACK ; COMMIT ;