1- BEGIN ;
2-
3- -- ----------------------------------------------------------------
4- -- ------ Photometry catalog (level 1) ---------
5- -- ----------------------------------------------------------------
6- -- ---------------- Methods -------------------------------------
7- -- Visual:
8- -- -> magVisual
9- -- -> sizeVisual
10- -- (in fact, it corresponds to the limiting isophote)
11- -- Total
12- -- (Asymptotic extrapolation when aperture size -> Inf) :
13- -- -> magTotal -> size%total
14- -- Model:
15- -- model -> magModel
16- -- -> size%model
17- -- Petrosian:
18- -- -> Rpetro -> aperture -> magPetro -> size%petro
19- -- Kron:
20- -- -> Rkron -> aperture -> magKron
21- -- ----------------------------------------------------------------
22-
23- CREATE TYPE photometry .MagMethodType AS ENUM ( ' psf' , ' visual' , ' aperture' , ' isophotal' , ' asymptotic' , ' model' , ' petrosian' , ' kron' ) ;
24- COMMENT ON TYPE photometry.MagMethodType IS ' { "psf":"Point Spread Function photometry for the point source", "visual":"Visual estimate", "aperture":"Aperture photometry", "isophotal":"Magnitude measurement inside a specified isophote", "asymptotic":"Asymptotic (extrapolated) magnitude when the aperture size -> Inf", "model":"Best fit model of the light distribution", "petrosian":"Petrosian adaptively scaled aperture", "kron":"Kron adaptively scaled aperture" }' ;
25-
26-
27- CREATE TABLE photometry .total (
28- record_id Text NOT NULL REFERENCES layer0 .records (id) ON UPDATE cascade ON DELETE restrict
29- , band text NOT NULL REFERENCES photometry .calib_bands (id) ON DELETE restrict ON UPDATE cascade
30- , mag real NOT NULL CHECK ( mag > - 1 and mag < 30 )
31- , e_mag real CHECK ( e_mag > 0 and e_mag < 0 .5 )
32- , method photometry .MagMethodType NOT NULL CHECK ( method IN (' psf' , ' visual' , ' asymptotic' , ' model' , ' petrosian' , ' kron' ) )
33- , PRIMARY KEY (record_id, method, band)
34- );
35- CREATE INDEX IF NOT EXISTS ON photometry .total (band) ;
36- CREATE INDEX IF NOT EXISTS ON photometry .total (method) ;
37-
38- COMMENT ON TABLE photometry.total IS ' Catalog of the total magnitudes' ;
39- COMMENT ON COLUMN photometry.total.record_id IS ' Record ID' ;
40- COMMENT ON COLUMN photometry.total.band IS ' Calibrated passband ID' ;
41- COMMENT ON COLUMN photometry.total.mag IS ' {"description":"Total (PSF|model|asymptotic|etc.) magnitude", "unit":"mag", "ucd":"phot.mag"}' ;
42- COMMENT ON COLUMN photometry.total.e_mag IS ' {"description":"Error of the total magnitude", "unit":"mag", "ucd":"stat.error;phot.mag"}' ;
43- COMMENT ON COLUMN photometry.total.method IS ' Photometry method type (PSF, Kron, etc.)' ;
44-
45-
46- CREATE TABLE photometry .isophotal (
47- record_id Text NOT NULL REFERENCES layer0 .records (id) ON UPDATE cascade ON DELETE restrict
48- , band text NOT NULL REFERENCES photometry .calib_bands (id) ON DELETE restrict ON UPDATE cascade
49- , mag real NOT NULL CHECK ( mag > - 1 and mag < 30 )
50- , e_mag real CHECK ( e_mag > 0 and e_mag < 0 .5 )
51- , isophote real NOT NULL CHECK ( mag > - 1 and mag < 30 )
52- , PRIMARY KEY (record_id, method, band, isophote)
53- );
54- CREATE INDEX IF NOT EXISTS ON photometry .total (band) ;
55- CREATE INDEX IF NOT EXISTS ON photometry .total (method) ;
56- CREATE INDEX IF NOT EXISTS ON photometry .total (isophote) ;
57-
58- COMMENT ON TABLE photometry.isophotal IS ' Catalog of the isophotal magnitudes' ;
59- COMMENT ON COLUMN photometry.isophotal.record_id IS ' Record ID' ;
60- COMMENT ON COLUMN photometry.isophotal.band IS ' Calibrated passband ID' ;
61- COMMENT ON COLUMN photometry.isophotal.mag IS ' {"description":"Isophotal magnitude", "unit":"mag", "ucd":"phot.mag"}' ;
62- COMMENT ON COLUMN photometry.isophotal.e_mag IS ' {"description":"Error of the isophotal magnitude", "unit":"mag", "ucd":"stat.error;phot.mag"}' ;
63- COMMENT ON COLUMN photometry.isophotal.isophote IS ' Isophote level' ;
64-
1+ BEGIN ;
2+
3+ -- ----------------------------------------------------------------
4+ -- ------ Photometry catalog (level 1) ---------
5+ -- ----------------------------------------------------------------
6+ -- ---------------- Methods -------------------------------------
7+ -- Visual:
8+ -- -> magVisual
9+ -- -> sizeVisual
10+ -- (in fact, it corresponds to the limiting isophote)
11+ -- Total
12+ -- (Asymptotic extrapolation when aperture size -> Inf) :
13+ -- -> magTotal -> size%total
14+ -- Model:
15+ -- model -> magModel
16+ -- -> size%model
17+ -- Petrosian:
18+ -- -> Rpetro -> aperture -> magPetro -> size%petro
19+ -- Kron:
20+ -- -> Rkron -> aperture -> magKron
21+ -- ----------------------------------------------------------------
22+
23+ CREATE TYPE photometry .MagMethodType AS ENUM ( ' psf' , ' visual' , ' aperture' , ' isophotal' , ' asymptotic' , ' model' , ' petrosian' , ' kron' ) ;
24+ COMMENT ON TYPE photometry.MagMethodType IS ' { "psf":"Point Spread Function photometry for the point source", "visual":"Visual estimate", "aperture":"Aperture photometry", "isophotal":"Magnitude measurement inside a specified isophote", "asymptotic":"Asymptotic (extrapolated) magnitude when the aperture size -> Inf", "model":"Best fit model of the light distribution", "petrosian":"Petrosian adaptively scaled aperture", "kron":"Kron adaptively scaled aperture" }' ;
25+
26+
27+ CREATE TABLE photometry .total (
28+ record_id Text NOT NULL REFERENCES layer0 .records (id) ON UPDATE cascade ON DELETE restrict
29+ , band text NOT NULL REFERENCES photometry .calib_bands (id) ON DELETE restrict ON UPDATE cascade
30+ , mag real NOT NULL CHECK ( mag > - 1 and mag < 30 )
31+ , e_mag real CHECK ( e_mag > 0 and e_mag < 0 .5 )
32+ , method photometry .MagMethodType NOT NULL CHECK ( method IN (' psf' , ' visual' , ' asymptotic' , ' model' , ' petrosian' , ' kron' ) )
33+ , PRIMARY KEY (record_id, method, band)
34+ );
35+ CREATE INDEX IF NOT EXISTS ON photometry .total (band) ;
36+ CREATE INDEX IF NOT EXISTS ON photometry .total (method) ;
37+
38+ COMMENT ON TABLE photometry.total IS ' Catalog of the total magnitudes' ;
39+ COMMENT ON COLUMN photometry.total.record_id IS ' Record ID' ;
40+ COMMENT ON COLUMN photometry.total.band IS ' Calibrated passband ID' ;
41+ COMMENT ON COLUMN photometry.total.mag IS ' {"description":"Total (PSF|model|asymptotic|etc.) magnitude", "unit":"mag", "ucd":"phot.mag"}' ;
42+ COMMENT ON COLUMN photometry.total.e_mag IS ' {"description":"Error of the total magnitude", "unit":"mag", "ucd":"stat.error;phot.mag"}' ;
43+ COMMENT ON COLUMN photometry.total.method IS ' Photometry method type (PSF, Kron, etc.)' ;
44+
45+
46+ CREATE TABLE photometry .isophotal (
47+ record_id Text NOT NULL REFERENCES layer0 .records (id) ON UPDATE cascade ON DELETE restrict
48+ , band text NOT NULL REFERENCES photometry .calib_bands (id) ON DELETE restrict ON UPDATE cascade
49+ , mag real NOT NULL CHECK ( mag > - 1 and mag < 30 )
50+ , e_mag real CHECK ( e_mag > 0 and e_mag < 0 .5 )
51+ , isophote real NOT NULL CHECK ( mag > - 1 and mag < 30 )
52+ , PRIMARY KEY (record_id, method, band, isophote)
53+ );
54+ CREATE INDEX IF NOT EXISTS ON photometry .total (band) ;
55+ CREATE INDEX IF NOT EXISTS ON photometry .total (method) ;
56+ CREATE INDEX IF NOT EXISTS ON photometry .total (isophote) ;
57+
58+ COMMENT ON TABLE photometry.isophotal IS ' Catalog of the isophotal magnitudes' ;
59+ COMMENT ON COLUMN photometry.isophotal.record_id IS ' Record ID' ;
60+ COMMENT ON COLUMN photometry.isophotal.band IS ' Calibrated passband ID' ;
61+ COMMENT ON COLUMN photometry.isophotal.mag IS ' {"description":"Isophotal magnitude", "unit":"mag", "ucd":"phot.mag"}' ;
62+ COMMENT ON COLUMN photometry.isophotal.e_mag IS ' {"description":"Error of the isophotal magnitude", "unit":"mag", "ucd":"stat.error;phot.mag"}' ;
63+ COMMENT ON COLUMN photometry.isophotal.isophote IS ' Isophote level' ;
64+
6565COMMIT ;
0 commit comments