CREATE TABLE xmm4dr11slim (
SRCID            BIGINT          ,
IAUNAME          VARCHAR         ,
SC_RA            DOUBLE PRECISION,
SC_DEC           DOUBLE PRECISION,
SC_POSERR        REAL            ,
SC_DET_ML        REAL            ,
SC_EP_1_FLUX     REAL            ,
SC_EP_1_FLUX_ERR REAL            ,
SC_EP_2_FLUX     REAL            ,
SC_EP_2_FLUX_ERR REAL            ,
SC_EP_3_FLUX     REAL            ,
SC_EP_3_FLUX_ERR REAL            ,
SC_EP_4_FLUX     REAL            ,
SC_EP_4_FLUX_ERR REAL            ,
SC_EP_5_FLUX     REAL            ,
SC_EP_5_FLUX_ERR REAL            ,
SC_EP_8_FLUX     REAL            ,
SC_EP_8_FLUX_ERR REAL            ,
SC_EP_9_FLUX     REAL            ,
SC_EP_9_FLUX_ERR REAL            ,
SC_HR1           REAL            ,
SC_HR1_ERR       REAL            ,
SC_HR2           REAL            ,
SC_HR2_ERR       REAL            ,
SC_HR3           REAL            ,
SC_HR3_ERR       REAL            ,
SC_HR4           REAL            ,
SC_HR4_ERR       REAL            ,
SC_EXTENT        REAL            ,
SC_EXT_ERR       REAL            ,
SC_EXT_ML        REAL            ,
SC_CHI2PROB      REAL            ,
SC_FVAR          REAL            ,
SC_FVARERR       REAL            ,
SC_VAR_FLAG      BOOLEAN         ,
SC_SUM_FLAG      SMALLINT        ,
SC_EP_8_FMIN     REAL            ,
SC_EP_8_FMIN_ERR REAL            ,
SC_EP_8_FMAX     REAL            ,
SC_EP_8_FMAX_ERR REAL            ,
MJD_FIRST        DOUBLE PRECISION,
MJD_LAST         DOUBLE PRECISION,
N_DETECTIONS     SMALLINT        ,
CONFUSED         BOOLEAN         ,
WEBPAGE_URL      VARCHAR         
);

COMMENT ON COLUMN xmm4dr11slim.SRCID IS 'A unique number assigned to a group of catalogue entries which are assumed to be the same source. The process of grouping detections in to unique sources has changed since the 2XMM catalogue series and is described in Section 3.8 (https://xmmssc-www.star.le.ac.uk/Catalogue/3XMM-DR4/UserGuide_xmmcat.html#DiffUniqueId). The SRCID assignments in 4XMM-DR11 bear no relation to those in 3XMM-DR4 and earlier but the nearest unique sources from the 3XMM-DR4 catalogue to the 4XMM-DR11 unique source is provided via the DR4SRCID column.';
COMMENT ON COLUMN xmm4dr11slim.IAUNAME IS 'The IAU name assigned to the unique SRCID (see https://xmmssc-www.star.le.ac.uk/Catalogue/3XMM-DR4/UserGuide_xmmcat.html#DiffIauId).';
COMMENT ON COLUMN xmm4dr11slim.SC_RA IS 'The mean Right Ascension in degrees (J2000) of all the detections of the source SRCID weighted by the positional errors POSERR.';
COMMENT ON COLUMN xmm4dr11slim.SC_DEC IS 'The mean Declination in degrees (J2000) of all the detections of the source SRCID (see DEC) weighted by the positional errors POSERR.';
COMMENT ON COLUMN xmm4dr11slim.SC_POSERR IS 'The error of the weighted mean position given in SC_RA and SC_DEC in arseconds (see Sec. 3.2.4 at http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb).';
COMMENT ON COLUMN xmm4dr11slim.SC_DET_ML IS 'The total band detection likelihood of the source SRCID is the maximum of the likelihoods of all detections of this source (EP_8_DET_ML).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_1_FLUX IS 'The mean band 1 flux (0.2 - 0.5 keV) of all the detections of the source SRCID (EP_1_FLUX) weighted by the errors (EP_1_FLUX_ERR), in erg/cm2/s.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_1_FLUX_ERR IS 'Error on the weighted mean band 1 flux in SC_EP_1_FLUX (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_2_FLUX IS 'The mean band 2 flux (0.5 - 1.0 keV) of all the detections of the source SRCID (see EP_2_FLUX) weighted by the errors (EP_2_FLUX_ERR), in erg/cm2/s.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_2_FLUX_ERR IS 'Error on the weighted mean band 2 flux in SC_EP_2_FLUX (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_3_FLUX IS 'The mean band 3 flux (1.0 - 2.0 keV) of all the detections of the source SRCID (see EP_3_FLUX) weighted by the errors (EP_3_FLUX_ERR), in erg/cm2/s.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_3_FLUX_ERR IS 'Error on the weighted mean band 3 flux in SC_EP_3_FLUX (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_4_FLUX IS 'The mean band 4 flux (2.0 - 4.5 keV) of all the detections of the source SRCID (see EP_4_FLUX) weighted by the errors (EP_4_FLUX_ERR), in erg/cm2/s.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_4_FLUX_ERR IS 'Error on the weighted mean band 4 flux in SC_EP_4_FLUX (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_5_FLUX IS 'The mean band 5 flux (4.5 - 12 keV) of all the detections of the source SRCID (see EP_5_FLUX) weighted by the errors (EP_5_FLUX_ERR), in erg/cm2/s.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_5_FLUX_ERR IS 'Error on the weighted mean band 5 flux in SC_EP_5_FLUX (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_8_FLUX IS 'The mean total band flux (0.2 - 12 keV) of all the detections of the source SRCID (see EP_8_FLUX) weighted by the errors (EP_8_FLUX_ERR), in erg/cm2/s.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_8_FLUX_ERR IS 'Error on the weighted mean total band flux in SC_EP_8_FLUX (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_9_FLUX IS 'The mean band 9 flux (0.5 - 4.5 keV) of all the detections of the source SRCID (see EP_9_FLUX) weighted by the errors (EP_9_FLUX_ERR), in erg/cm2/s.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_9_FLUX_ERR IS 'Error on the weighted mean band 9 flux in SC_EP_9_FLUX (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR1 IS 'The mean hardness ratio of the bands 1 and 2 of all the detections of the source SRCID (EP_HR1) weighted by the errors (EP_HR1_ERR).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR1_ERR IS 'Error on the weighted mean hardness ratio in SC_HR1  (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR2 IS 'The mean hardness ratio of the bands 2 and 3 of all the detections of the source SRCID (EP_HR2) weighted by the errors (EP_HR2_ERR).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR2_ERR IS 'Error on the weighted mean hardness ratio in SC_HR2  (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR3 IS 'The mean hardness ratio of the bands 3 and 4 of all the detections of the source SRCID (EP_HR3) weighted by the errors (EP_HR3_ERR).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR3_ERR IS 'Error on the weighted mean hardness ratio in SC_HR3  (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR4 IS 'The mean hardness ratio of the bands 4 and 5 of all the detections of the source SRCID (EP_HR4) weighted by the errors (EP_HR4_ERR).';
COMMENT ON COLUMN xmm4dr11slim.SC_HR4_ERR IS 'Error on the weighted mean hardness ratio in SC_HR4  (see http://xmmssc-www.star.le.ac.uk/Catalogue/2XMM/UserGuide_xmmcat.html#CatComb for details).';
COMMENT ON COLUMN xmm4dr11slim.SC_EXTENT IS 'Extent radius of a source detected as extended by the SAS task emldetect (for more details see http://xmmssc.irap.omp.eu/Catalogue/4XMM-DR11/col_srcpar.html)';
COMMENT ON COLUMN xmm4dr11slim.SC_EXT_ERR IS 'Error on the extent radius SC_EXTENT (see http://xmmssc.irap.omp.eu/Catalogue/4XMM-DR11/col_srcpar.html)';
COMMENT ON COLUMN xmm4dr11slim.SC_EXT_ML IS 'The total band detection likelihood of the extended source SRCID is the largest of the extent likelihoods of all detections of this source (EP_EXTENT_ML).';
COMMENT ON COLUMN xmm4dr11slim.SC_CHI2PROB IS 'The chi square probability (based on the null hypothesis) that the time series of the unique source SRCID as detected by any of the observations can be explained by a constant flux. It corresponds to the minimum value of the EPIC probabilities in each detection, EP_CHI2PROB.';
COMMENT ON COLUMN xmm4dr11slim.SC_FVAR IS 'The fractional excess variance of the unique source. It is the value corresponding to the exposure and instrument that shows the lowest probability of being constant (i.e. it is the PN_FVAR, M1_FVAR or M2_FVAR value corresponding to EP_CHI2PROB, SC_CHI2PROB.';
COMMENT ON COLUMN xmm4dr11slim.SC_FVARERR IS 'The error on the fractional excess variance of the unique source. It is the value corresponds to the exposure and instrument that shows the lowest probability of being constant (i.e. it is the PN_FVARERR, M1_FVARERR or M2_FVARERR value corresponding to EP_CHI2PROB, SC_CHI2PROB.';
COMMENT ON COLUMN xmm4dr11slim.SC_VAR_FLAG IS 'The variability flag for the unique source SRCID is set to VAR_FLAG of the most variable detection of this source.';
COMMENT ON COLUMN xmm4dr11slim.SC_SUM_FLAG IS 'The summary flag for the unique source SRCID is taken to be the worst flag of all detections of this source (SUM_FLAG).';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_8_FMIN IS 'The minimum EPIC band 8 flux (EP_8_FLUX) amongst any of the constituent detections of the unique source.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_8_FMIN_ERR IS 'The error on the minimum EPIC band 8 flux (EP_8_FLUX_ERR) amongst any of the constituent detections of the unique source.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_8_FMAX IS 'The maximum EPIC band 8 flux (EP_8_FLUX) amongst any of the constituent detections of the unique source.';
COMMENT ON COLUMN xmm4dr11slim.SC_EP_8_FMAX_ERR IS 'The error on the maximum EPIC band 8 flux (EP_8_FLUX_ERR) amongst any of the constituent detections of the unique source.';
COMMENT ON COLUMN xmm4dr11slim.MJD_FIRST IS 'The MJD start date (MJD_START) of the earliest observation of any constituent detection of the unique source.';
COMMENT ON COLUMN xmm4dr11slim.MJD_LAST IS 'The MJD end date (MJD_STOP) of the last observation of any constituent detection of the unique source.';
COMMENT ON COLUMN xmm4dr11slim.N_DETECTIONS IS 'The number of detections of the unique source SRCID used to derive the combined values.';
COMMENT ON COLUMN xmm4dr11slim.CONFUSED IS 'Normally set False, but set True when a given detection has a probability above zero of being associated with two or more distinct sources. The SRCID is that of the match with the highest probability, but there remains some uncertainty about which source is the correct match for the detection.';
COMMENT ON COLUMN xmm4dr11slim.WEBPAGE_URL IS 'Webpage URL of the source';

