FORTRAN Generation
(/./ftp/cats/VII/279)

Conversion of standardized ReadMe file for file /./ftp/cats/VII/279 into FORTRAN code for reading data files line by line.

Note that special values are assigned to unknown or unspecified numbers (also called NULL numbers); when necessary, the coordinate components making up the right ascension and declination are converted into floating-point numbers representing these angles in degrees.



      program load_ReadMe
C=============================================================================
C  F77-compliant program generated by readme2f_1.81 (2015-09-23), on 2024-Apr-19
C=============================================================================
*  This code was generated from the ReadMe file documenting a catalogue
*  according to the "Standard for Documentation of Astronomical Catalogues"
*  currently in use by the Astronomical Data Centers (CDS, ADC, A&A)
*  (see full documentation at URL http://vizier.u-strasbg.fr/doc/catstd.htx)
*  Please report problems or questions to   
C=============================================================================

      implicit none
*  Unspecified or NULL values, generally corresponding to blank columns,
*  are assigned one of the following special values:
*     rNULL__    for unknown or NULL floating-point values
*     iNULL__    for unknown or NULL   integer      values
      real*4     rNULL__
      integer*4  iNULL__
      parameter  (rNULL__=--2147483648.)  	! NULL real number
      parameter  (iNULL__=(-2147483647-1))	! NULL int  number
      integer    idig			! testing NULL number

C=============================================================================
Cat. VII/279          SDSS quasar catalog: twelfth data release   (Paris+, 2017)
*================================================================================
*The Sloan Digital Sky Survey Quasar Catalog: Twelfth data release.
*    Paris I., Petitjean P., Ross N.P., Myers A.D., Aubourg E., Streblyanska A.,
*    Bailey S., Armengaud E., Palanque-Delabrouille N., Yeche C., Hamann F.,
*    Strauss M.A., Albareti F.D., Bovy J., Bizyaev D., Brandt W.N., Brusa M.,
*    Buchner J., Comparat J., Croft R.A.C., Dwelly T., Fan X., Font-Ribera A.,
*    Ge J., Georgakakis A., Hall P.B., Jiang L., Kinemuchi K., Malanushenko E.,
*    Malanushenko V., Mcmahon R.G., Menzel M.-L., Merloni A., Nandra K.,
*    Noterdaeme P., Oravetz D., Pan K., Pieri M.M., Prada F., Salvato M.,
*    Schlegel D.J., Schneider D.P., Simmons A., Viel M., Weinberg D.H., Zhu L.
*   <Astron. Astrophys., 597, A79 (2017)>
*   =2017A&A...597A..79P    (SIMBAD/NED BibCode)
*   =2017yCat.7278....0P
*   =2017yCat.7279....0P
C=============================================================================

C  Internal variables

      integer*4 i__

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'dr12q.dat'	! SDSS-DR12 Quasar Catalog

      integer*4 nr__
      parameter (nr__=297301)	! Number of records
      character*2742 ar__   	! Full-size record

C  J2000 position composed of: RAdeg DEdeg
      character*18  SDSS        ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                      (J2000) corrected by CDS
*                                      (SDSS_NAMEc) (G1)
      character*18  SDSSo       ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                       (J2000) (SDSS_NAME) (G1)
      real*8        RAdeg       ! (deg) Right Ascension (J2000) (RA)
      real*8        DEdeg       ! (deg) Declination (J2000) (DEC)
      integer*8     THINGID     ! Thing_ID (unique identifier of SDSS
*                                       sources) (THING_ID)
      integer*4     Plate       ! Spectroscopic Plate number (PLATE)
      integer*4     MJD         ! Spectroscopic MJD (MJD)
      integer*4     Fiber       ! Spectroscopic Fiber number (FIBERID)
      real*8        z_v         ! Redshift from visual inspection (Z_VI)
      real*8        z_b         ! ?=-1 Redshift from BOSS pipeline (Z_PIPE)
      real*8        e_z_b       ! []?=-1 Error on BOSS pipeline redshift
*                                       (error codes -4, -5, -6) (ERR_ZPIPE)
      integer*4     f_z_b       ! ZWARNING flag (ZWARNING) (G3)
      real*8        z_PCA       ! Refined PCA redshift (Z_PCA) (G4)
      real*8        e_z_PCA     ! ?=-1 Error on refined PCA redshift
*                                       (ERR_ZPCA)
      real*4        qCont       ! Estimator of the PCA continuum quality
*                                       (PCA_QUAL)
      real*8        zCIV        ! Redshift of CIV emission line (Z_CIV)
      real*8        zCIII       ! Redshift of C iii] emission complex
*                                       (Z_CIII)
      real*8        zMgII       ! Redshift of Mg ii emission line (Z_MGII)
      integer*4     Morph       ! SDSS morphology flag
*                                       0=point source 1=extended (SDSS_MORPHO)
      integer*8     Btarg1      ! BOSS target flag for main survey
*                                       (BOSS_TARGET1) (G5)
      integer*8     Atarg1      ! BOSS target flag for ancillary programs
*                                       (ANCILLARY_TARGET1) (G5)
      integer*8     Atarg2      ! BOSS target flag for ancillary programs
*                                       (ANCILLARY_TARGET2) (G5)
      integer*8     eBtarg0     ! Target selection flag for the
*                                      SDSS-IV/eBOSS pilot survey (EBOSS_TARGET0)
      integer*4     NspBOSS     ! Number of additional spectra available in
*                                       SDSS-III/BOSS (NSPEC_BOSS)
      integer*4     PlateDup   (32) ! Spectroscopic plate number for each
*                                       duplicate spectrum (PLATE_DUPLICATE)
      integer*4     MJDDup     (32) ! Spectroscopic MJD for each duplicate
*                                       spectrum (MJD_DUPLICATE)
      integer*4     FiberDup   (32) ! Spectroscopic fiber number for each
*                                       duplicate spectrum (FIBERID_DUPLICATE)
      integer*4     f7          ! [0/1] 1 if the quasar is known from DR7
*                                       (SDSS_DR7)
      integer*4     Plate7      ! ?=-1 SDSS-DR7 spectroscopic Plate number
*                                       if the quasar is known from DR7
*                                       (PLATE_DR7)
      integer*4     MJD7        ! ?=-1 SDSS-DR7 spectroscopic MJD if the
*                                       quasar is known from DR7 (MJD_DR7)
      integer*4     Fiber7      ! ?=-1 SDSS-DR7 spectroscopic Fiber number
*                                       if the quasar is known from DR7
*                                       (FIBERID_DR7)
      integer*4     US          ! [0/2] Uniform sample flag (UNIFORM) (G6)
      real*8        alphanu     ! Spectral index measurement (ALPHA_NU)
      real*8        SNRSpec     ! Median signal-to-noise ratio over the
*                                       whole spectrum (SNR_SPEC)
      real*8        SNRDup     (32) ! Median signal-to-noise ratio over the
*                                       whole spectrum of duplicate SDSS-III/BOSS
*                                       spectra when available (SNR_DUPLICATE)
      real*8        SNR1700     ! Median signal-to-noise ratio in the
*                                       window 1650-1750{AA} (rest frame)
*                                       (SNR_1700)
      real*8        SNR3000     ! Median signal-to-noise ratio in the
*                                       window 2950-3050{AA} (rest frame)
*                                       (SNR_3000)
      real*8        SNR5150     ! Median signal-to-noise ratio in the
*                                       window 5100-5250{AA} (rest frame)
*                                       (SNR_5150)
      real*8        FW_CIV      ! (km/s) ?=-1 FWHM of CIV emission line (FWHM_CIV)
      real*8        HW_CIV_b    ! (km/s) ?=-1 Blue HWHM of CIV emission line
*                                       (BHWHM_CIV)
      real*8        HW_CIV_r    ! (km/s) ?=-1 Red HWHM of CIV emission line
*                                       (RHWHM_CIV)
      real*8        A_CIV       ! Amplitude of CIV emission line in units
*                                       of median rms pixel noise (AMP_CIV)
      real*4        W_CIV       ! (0.1nm) ?=-1 Rest frame equivalent width of CIV
*                                       emission line in {AA} (REWE_CIV)
      real*4        e_W_CIV     ! (0.1nm) ?=-1 Uncertainty on the rest frame
*                                       equivalent width of CIV emission line
*                                       (ERR_REWE_CIV)
      real*8        FW_CIII     ! (km/s) ?=-1 FWHM of CIII] emission complex
*                                       (FWHM_CIII)
      real*8        HW_CIII_b   ! (km/s) ?=-1 Blue HWHM of CIII] emission line
*                                       (BHWHM_CIII)
      real*8        HW_CIII_r   ! (km/s) ?=-1 Red HWHM of CIII] emission line
*                                       (RHWHM_CIII)
      real*8        A_CIII      ! Amplitude of CIII] emission complex in
*                                      units of median rms pixel noise (AMP_CIII)
      real*4        W_CIII      ! (0.1nm) ?=-1 Rest frame equivalent width of CIII]
*                                       emission line in {AA} (REWE_CIII)
      real*4        e_W_CIII    ! (0.1nm) ?=-1 Uncertainty on the rest frame
*                                       equivalent width of CIII] emission
*                                       complex (ERR_REWE_CIII)
      real*8        FW_MgII     ! (km/s) ?=-1 FWHM of MgII emission line
*                                       (FWHM_MGII)
      real*8        HW_MgII_b   ! (km/s) ?=-1 Blue HWHM of MgII emission line
*                                       (BHWHM_MGII)
      real*8        HW_MgII_r   ! (km/s) ?=-1 Red HWHM of MgII emission line
*                                       (RHWHM_MGII)
      real*8        A_MgII      ! Amplitude of MgII emission line in units
*                                       of median rms pixel noise (AMP_MGII)
      real*4        W_MgII      ! (0.1nm) ?=-1 Rest frame equivalent width of MgII
*                                       emission line (REWE_MGII)
      real*4        e_W_MgII    ! (0.1nm) ?=-1 Uncertainty on the rest frame
*                                       equivalent width of MgII emission
*                                       (ERR_REWE_MGII)
      integer*4     BAL_VI      ! [0/1] BAL flag from visual inspection
*                                       (BAL_FLAG_VI)
      real*8        BI_CIVt     ! (km/s) ?=-1 Balnicity index of CIV trough
*                                       (BI_CIV)
      real*8        e_BI_CIVt   ! (km/s) ?=-1 Error on the Balnicity index of CIV
*                                       trough (ERR_BI_CIV)
      real*8        AI_CIVt     ! (km/s) ?=-1 Absorption index of CIV trough
*                                       (AI_CIV)
      real*8        e_AI_CIVt   ! (km/s) ?=-1 Error on the absorption index of
*                                       CIV trough (ERR_AI_CIV)
      real*8        Chi2CIVt    ! ?=0 {chi}^2^ of the trough from Eq. (3) in
*                                       Paris et al. (2012, Cat. VII/269)
*                                       (CHI2TROUGH)
      integer*4     N2t         ! Number of distinct CIV troughs of width
*                                       larger than 2000km/s (NCIV_2000)
      real*8        Vmin2t      ! (km/s) ?=0  Minimum velocity of the CIV troughs
*                                       (VMIN_CIV_2000)
      real*8        Vmax2t      ! (km/s) ?=0  Maximum velocity of the CIV troughs
*                                       (VMAX_CIV_2000)
      integer*4     N_45t       ! Number of distinct CIV troughs of width
*                                       larger than 450km/s (NCIV_450)
      real*8        Vmin_45t    ! (km/s) ?=0 Minimum velocity of the CIV troughs
*                                       (VMIN_CIV_450)
      real*8        Vmax_45t    ! (km/s) ?=0 Maximum velocity of the CIV troughs
*                                       (VMAX_CIV_450)
      real*8        W_SiIVt     ! (0.1nm) ?=0 Rest frame equivalent width of the
*                                       Si iv trough (REW_SIIV)
      real*8        W_CIVt      ! (0.1nm) ?=0 Rest frame equivalent width of the
*                                       CIV trough (REW_CIV)
      real*8        W_AlIIIt    ! (0.1nm) ?=0 Rest frame equivalent width of the
*                                       AlIII] trough (REW_ALIII)
      integer*4     RUN         ! SDSS Imaging Run Number of photometric
*                                       measurements (RUN_NUMBER)
      integer*4     Ph_MJD      ! Modified Julian Date of imaging
*                                       observation (PHOTO_MJD)
      character*3   Rerun       ! SDSS Photometric Processing Rerun Number
*                                       (RERUN_NUMBER)
      integer*4     Colcam      ! [1/6]?=0 SDSS Camera Column Number
*                                       (COL_NUMBER)
      integer*4     Field       ! SDSS Field Number (FIELD_NUMBER)
      character*19  objID       ! SDSS Object Identification Number (OBJ_ID)
      real*4        Fu          ! (3.63uJy) ?=-9999 PSF flux in u band (not corrected
*                                       for Galactic extinction)
*                                       in nnomggies (PSFFLUXu) (G2)
      real*4        Fg          ! (3.63uJy) ?=-9999 PSF flux in g band (not corrected
*                                       for Galactic extinction)
*                                       in nnomggies (PSFFLUXg) (G2)
      real*4        Fr          ! (3.63uJy) ?=-9999 PSF flux in r band (not corrected
*                                       for Galactic extinction) in nnomggies
*                                       (PSFFLUXr) (G2)
      real*4        Fi          ! (3.63uJy) ?=-9999 PSF flux in i band (not corrected
*                                       for Galactic extinction) in nnomggies
*                                       (PSFFLUXi) (G2)
      real*4        Fz          ! (3.63uJy) ?=-9999 PSF flux in z band (not corrected
*                                       for Galactic extinction) in nnomggies
*                                       (PSFFLUXz) (G2)
      real*8        IVFu        ! (3.63uJy) Inverse variance of PSF flux in u band
*                                       in nnomggies (IVAR_PSFFLUXu) (G2)
      real*8        IVFg        ! (3.63uJy) Inverse variance of PSF flux in g band
*                                       in nnomggies (IVAR_PSFFLUXg) (G2)
      real*8        IVFr        ! (3.63uJy) Inverse variance of PSF flux in r band
*                                       in nnomggies (IVAR_PSFFLUXr) (G2)
      real*8        IVFi        ! (3.63uJy) Inverse variance of PSF flux in i band
*                                       in nnomggies (IVAR_PSFFLUXi) (G2)
      real*8        IVFz        ! (3.63uJy) Inverse variance of PSF flux in z band
*                                       in nnomggies (G2) (IVAR_PSFFLUXz)
      real*4        umag        ! (mag) ?=-9999 PSF magnitude in u band (not
*                                       corrected for Galactic extinction)
*                                        (PSFMAGu)
      real*4        gmag        ! (mag) ?=-9999 PSF magnitude in g band (not
*                                       corrected for Galactic extinction)
*                                        (PSFMAGg)
      real*4        rmag        ! (mag) ?=-9999 PSF magnitude in r band (not
*                                       corrected for Galactic extinction)
*                                        (PSFMAGr)
      real*4        imag        ! (mag) ?=-9999 PSF magnitude in i band (not
*                                       corrected for Galactic extinction)
*                                        (PSFMAGi)
      real*4        zmag        ! (mag) ?=-9999 PSF magnitude in z band (not
*                                       corrected for Galactic extinction)
      real*4        e_umag      ! (mag) ?=-9999 error in PSF magnitude in u band
*                                        (ERR_PSFMAGu)
      real*4        e_gmag      ! (mag) ?=-9999 error in PSF magnitude in g band
*                                        (ERR_PSFMAGg)
      real*4        e_rmag      ! (mag) ?=-9999 error in PSF magnitude in r band
*                                        (ERR_PSFMAGr)
      real*4        e_imag      ! (mag) ?=-9999 error in PSF magnitude in i band
*                                        (ERR_PSFMAGi)
      real*4        e_zmag      ! (mag) ?=-9999 error in PSF magnitude in z band
*                                        (ERR_PSFMAGz)
      real*4        Fut         ! (3.63uJy) ?=-9999 Target flux in the u band
*                                       (not corrected for Galactic extinction)
*                                       in nnomggies (G2) (TARGET_FLUXu)
      real*4        Fgt         ! (3.63uJy) ?=-9999 Target flux in the g band
*                                       (not corrected for Galactic extinction)
*                                       in nnomggies (G2) (TARGET_FLUXg)
      real*4        Frt         ! (3.63uJy) ?=-9999 Target flux in the r band
*                                        (not corrected for Galactic extinction)
*                                        in nnomggies (G2) (TARGET_FLUXr)
      real*4        Fit         ! (3.63uJy) ?=-9999 Target flux in the i band
*                                        (not corrected for Galactic extinction)
*                                        in nnomggies (G2) (TARGET_FLUXi)
      real*4        Fzt         ! (3.63uJy) ?=-9999 Target flux in the z band
*                                        (not corrected for Galactic extinction)
*                                        in nnomggies (G2) (TARGET_FLUXz)
      real*8        iMAG_1      ! (mag) ? Absolute i magnitude (1)
      real*8        D_g_i       ! (mag) ? {Delta}(g-i)=(g-i)-<(g-i)>_redshift_
*                                       (Galactic extinction corrected)
*                                       (DGMI) (G7)
      real*8        Extu        ! (mag) ? Galactic extinction in u band
*                                       (EXTINCTIONu) (G8)
      real*8        Extg        ! (mag) ? Galactic extinction in g band
*                                       (EXTINCTIONg) (G8)
      real*8        Extr        ! (mag) ? Galactic extinction in r band
*                                       (EXTINCTIONr) (G8)
      real*8        Exti        ! (mag) ? Galactic extinction in i band
*                                       (EXTINCTIONi) (G8)
      real*8        Extz        ! (mag) ? Galactic extinction in z band
*                                       (EXTINCTIONz) (G8)
      real*8        ExtuR       ! (mag) Recalculated Galactic extinction in u
*                                       (EXTINCTION_RECALu) (G9)
      real*8        ExtgR       ! (mag) Recalculated Galactic extinction in g
*                                       (EXTINCTION_RECALg) (G9)
      real*8        ExtrR       ! (mag) Recalculated Galactic extinction in r
*                                       (EXTINCTION_RECALr) (G9)
      real*8        ExtiR       ! (mag) Recalculated Galactic extinction in i
*                                       (EXTINCTION_RECALi) (G9)
      real*8        ExtzR       ! (mag) Recalculated Galactic extinction in z
*                                       (EXTINCTION_RECALz) (G9)
      real*8        logNHI      ! ([cm-2]) logarithm of Galactic HI column density
*                                        (HI_GAL)
      integer*4     Varmatch    ! Flag for variability information
*                                       (0 if not available) (VAR_MATCHED)
      real*8        Varchi2     ! Reduced {chi}^2^ when the light curve is
*                                       fit with a constant (VAR_CHI2)
      real*8        VarA        ! Structure function parameter A as defined
*                                       in Palanque-Delabrouille et al.
*                                       (2011A&A...530A.122P) (VAR_A)
      real*8        Vargamma    ! Structure function parameter {gamma} as
*                                       defined in Palanque-Delabrouille et al.
*                                       (2011A&A...530A.122P) (VAR_GAMMA)
      real*4        logXct      ! ([ct/s]) log RASS full band count rate
*                                       (RASS_COUNTS)
      real*8        SNR_X       ! S/N of the RASS count rate
*                                        (RASS_COUNTS_SNR)
      real*8        sepX        ! (arcsec) SDSS-RASS separation in arcsec
*                                        (SDSS2ROSAT_SEP)
      integer*4     NDetX       ! Number of detections in XMM-Newton
*                                        (N_DETECTION_XMM)
      real*4        F0_2_12     ! (mW/m2) Total flux (0.2-12keV) from XMM-Newton
*                                       computed from the longest observation
*                                       FLUX02_12KEV_SGL)
      real*4        e_F0_2_12   ! (mW/m2) Error in total flux (0.2-12keV) from
*                                       XMM-NewtonR_FLUX02_12KEV_SGL)
      real*4        F0_2_2      ! (mW/m2) Soft (0.2-2keV) X-ray flux from
*                                       XMM-Newton (FLUX02_2KEV)
      real*4        e_F0_2_2    ! (mW/m2) Error in soft (0.2-2keV) X-ray flux from
*                                       XMM-Newton (ERR_FLUX02_2KEV)
      real*4        F4_5_12     ! (mW/m2) Hard (4.5-12keV) X-ray flux from
*                                       XMM-Newton (FLUX2_12KEV)
      real*4        e_F4_5_12   ! (mW/m2) Error in hard (4.5-12keV) X-ray flux
*                                       from XMM-Newton (ERR_FLUX2_12KEV)
      real*4        F0_2_12W    ! (mW/m2) Total weighted average flux (0.2-12keV)
*                                       from XMM-Newton (FLUX02_12KEV)
      real*4        e_F0_2_12W  ! (mW/m2) Error in total flux (0.2-12keV)
*                                       from XMM-Newton (ERR_FLUX02_12KEV)
      real*4        L0_2_12     ! (10-7W) Total X-ray luminosity (0.2-12keV) from
*                                       XMM-Newton using the longest observation
*                                        (LUM02_2KEV_SGL) (2)
      real*4        L0_5_2      ! (10-7W) Soft (0.2-2keV) X-ray luminosity from
*                                       XMM-Newton (LUM05_2KEV) (2)
      real*4        L4_5_12     ! (10-7W) Hard (4.5-12keV) X-ray luminosity from
*                                       XMM-Newton (LUM2_12KEV) (2)
      real*4        L0_2_2W     ! (10-7W) Total X-ray luminosity (0.2-12keV) from
*                                       XMM-Newton using weighted average flux
*                                       (LUM02_2KEV) (2)
      integer*4     f_F4_5_12   ! [0/1]?=-1 Flag for upper limit of hard
*                                       X-ray flux (LUMX2_10_UPPER)
      real*4        sepXM       ! (arcsec) ?=0 SDSS-XMM-Newton separation in arcsec
*                                       (SDSS2XMM_SEP)
      integer*4     GALEX       ! GALEX match (GALEX_MATCHED)
      real*8        FFUV        ! (3.63uJy) ?=0 FUV flux (GALEX) (FUV)
      real*8        IVFUV       ! (3.63uJy-2) ?=0 Inverse variance of FUV flux
*                                       (in nnomggies^-2^) (FUV_IVAR)
      real*8        FNUV        ! (3.63uJy) ?=0 NUV flux (GALEX) (NUV)
      real*8        IVNUV       ! (3.63uJy-2) ?=0 Inverse variance of NUV flux
*                                       (in nnomggies^-2^) (NUV_IVAR)
      real*8        Jmag        ! (mag) ?=0 2MASS J magnitude (Vega) (JMAG)
      real*8        e_Jmag      ! (mag) ?=0 Error in J magnitude (Vega)
*                                       (ERR_JMAG)
      real*8        SNR_J       ! ?=0 J-band S/N (JSNR)
      integer*4     f_Jmag      ! ?=0 J-band photometry flag (JRDFLAG)
      real*8        Hmag        ! (mag) ?=0 2MASS H magnitude (Vega) (HMAG)
      real*8        e_Hmag      ! (mag) ?=0 Error in H magnitude (ERR_HMAG)
      real*8        SNR_H       ! ?=0 H-band S/N (HSNR)
      integer*4     f_Hmag      ! ?=0 H-band photometry flag (HRDFLAG)
      real*8        Kmag        ! (mag) ?=0 2MASS K magnitude (Vega) (KMAG)
      real*8        e_Kmag      ! (mag) ?=0 Error in K magnitude (ERR_KMAG)
      real*8        SNR_K       ! ?=0 K-band S/N (KSNR)
      integer*4     f_Kmag      ! ?=0 K-band photometry flag (KRDFLAG)
      real*8        Sep2        ! (arcsec) ?=0 SDSS-2MASS separation in arcsec
*                                       (SDSS2MASS_SEP)
      real*8        W1mag       ! (mag) ?=0 WISE W1 magnitude (Vega) (W1MAG)
      real*8        e_W1mag     ! (mag) ?=0 Error in W1 magnitude (ERR_W1MAG)
      real*8        W1SNR       ! ?=0 S/N in W1 band (W1SNR)
      real*8        W1chi2      ! ?=0 {chi}^2^ in W1 band (W1CHI2)
      real*8        W2mag       ! (mag) ?=0 WISE W2 magnitude (Vega) (W2MAG)
      real*8        e_W2mag     ! (mag) ?=0 Error in W2 magnitude (ERR_W2MAG)
      real*8        W2SNR       ! ?=0 S/N in W2 band (W2SNR)
      real*8        W2chi2      ! ?=0 {chi}^2^ in W2 band (W2CHI2)
      real*8        W3mag       ! (mag) ?=0 WISE W3 magnitude (Vega) (W3MAG)
      real*8        e_W3mag     ! (mag) ?=0 Error in W3 magnitude
*                                       (ERR_W3MAG)
      real*8        W3SNR       ! ?=0 S/N in W3 band (W3SNR)
      real*8        W3chi2      ! ?=0 {chi}^2^ in W3 band (W3CHI2)
      real*8        W4mag       ! (mag) ?=0 WISE W4 magnitude (Vega) (W4MAG)
      real*8        e_W4mag     ! (mag) ?=0 Error in W4 magnitude
*                                       (ERR_W4MAG)
      real*8        W4SNR       ! S/N in W4 band (W4SNR)
      real*4        W4chi2      ! {chi}^2^ in W4 band (W4CHI2)
      character*4   CCflags     ! WISE contamination and confusion flag
*                                       (CC_FLAGS)
      character*4   PHflag      ! WISE photometric quality flag (PH_FLAG)
      real*4        sepW        ! (arcsec) SDSS-WISE separation in arcsec
*                                       (SDSS2WISE_SEP)
      integer*4     UKIDSS      ! UKIDSS Matched (UKIDSS_MATCHED)
      real*4        FY          ! (W/m2/Hz) Y-band flux density from UKIDSS (YFLUX)
      real*4        e_FY        ! (W/m2/Hz) ?=0 Error in Y-band density flux from
*                                       UKIDSS (YFLUX_ERR)
      real*4        FJ          ! (W/m2/Hz) ?=0 J-band flux density from UKIDSS
*                                       (JFLUX)
      real*4        e_FJ        ! (W/m2/Hz) ?=0 Error in J-band flux density from
*                                       UKIDSS (JFLUX_ERR)
      real*4        FH          ! (W/m2/Hz) ?=0 H-band flux density from UKIDSS
*                                       (HFLUX)
      real*4        e_FH        ! (W/m2/Hz) ?=0 Error in H-band flux density from
*                                       UKIDSS (HFLUX_ERR)
      real*4        FK          ! (W/m2/Hz) ?=0 K-band flux density from UKIDSS
*                                       (KFLUX)
      real*4        e_FK        ! (W/m2/Hz) ?=0 Error in K-band flux density from
*                                       UKIDSS (KFLUX_ERR)
      integer*4     FIRST       ! FIRST matched (FIRST_MATCHED)
      real*8        F1p         ! (mJy) ?=0 FIRST peak flux density at 20 cm
*                                       expressed in mJy (FIRST_FLUX)
      real*8        SNR_1       ! ?=0 S/N of the FIRST flux density
*                                       (FIRST_SNR)
      real*4        sep1        ! (arcsec) ?=0 SDSS-FIRST separation in arcsec
*                                       (SDSS2FIRST_SEP)
*Note (1): [z=2](H0=67.8km/s/Mpc, {OMEGA}_M_=0.308, {OMEGA}_{lambda}=0.692,
*    {alpha}_v_=-0.5 (MI)
*Note (2): using Z_VI and H0=70km/s/Mpc, {OMEGA}_M_=0.3, {OMEGA}_{lambda}=0.7

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'dr12qbal.dat'	! Detailed properties of BAL quasars

      integer*4 nr__1
      parameter (nr__1=29580)	! Number of records
      character*1525 ar__1  	! Full-size record

C  J2000 position composed of: RAdeg DEdeg
      character*18  SDSS_1      ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                       (J2000) corrected by CDS
*                                       (SDSS_NAMEc) (G1)
      character*18  SDSSo_1     ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                       (J2000) (SDSS_NAME) (G1)
      real*8        RAdeg_1     ! (deg) Right Ascension (J2000) (RA)
      real*8        DEdeg_1     ! (deg) Declination (J2000) (DEC)
      integer*8     THINGID_1   ! Thing_ID (unique SDSS source identifier)
*                                       (THING_ID)
      integer*4     Plate_1     ! Spectroscopic Plate number (PLATE)
      integer*4     MJD_1       ! Spectroscopic MJD (MJD)
      integer*4     Fiber_1     ! Spectroscopic Fiber number (FIBERID)
      real*8        z_v_1       ! Redshift from visual inspection (Z_VI)
      real*8        z_b_1       ! ?=-1 Redshift from BOSS pipeline (Z_PIPE)
      real*8        e_z_b_1     ! []?=-1 Error on BOSS pipeline redshift
*                                       (error codes -4, -5, -6) (ERR_ZPIPE)
      integer*4     f_z_b_1     ! ZWARNING flag (ZWARNING) (G3)
      real*8        z_PCA_1     ! ?=-1 PCA redshift (Z_PCA) (G4)
      real*8        e_z_PCA_1   ! ?=-1 Error on PCA redshift (ERR_ZPCA)
      integer*4     Morph_1     ! [0/1]?=-1 SDSS morphology flag
*                                       0=point source 1=extended (SDSS_MORPHO)
      integer*8     Btarg1_1    ! BOSS target flag for main survey
*                                       (BOSS_TARGET1) (G5)
      integer*8     Atarg1_1    ! BOSS target flag for ancillary programs
*                                       (ANCILLARY_TARGET1) (G5)
      integer*8     Atarg2_1    ! BOSS target flag for ancillary programs
*                                       (ANCILLARY_TARGET2) (G5)
      integer*8     eBtarg0_1   ! Target selection flag for eBOSS pilot
*                                       survey  (EBOSS_TARGET0)
      real*8        Fu_1        ! (3.63uJy) PSF flux in the u band (not corrected for
*                                       Galactic extinction) in nnomggies unit
*                                       (PSFFLUXu) (G2)
      real*8        Fg_1        ! (3.63uJy) PSF flux in the g band (not corrected for
*                                       Galactic extinction) in nnomggies unit
*                                       (PSFFLUXg) (G2)
      real*8        Fr_1        ! (3.63uJy) PSF flux in the r band (not corrected for
*                                       Galactic extinction) in nnomggies unit
*                                       (PSFFLUXr) (G2)
      real*8        Fi_1        ! (3.63uJy) PSF flux in the i band (not corrected for
*                                       Galactic extinction) in nnomggies unit
*                                       (PSFFLUXi) (G2)
      real*8        Fz_1        ! (3.63uJy) PSF flux in the z band (not corrected for
*                                       Galactic extinction) in nnomggies unit
*                                       (PSFFLUXz) (G2)
      real*8        IVFu_1      ! Inverse variance of u flux (IVAR_PSFFLUXu)
      real*8        IVFg_1      ! Inverse variance of g flux (IVAR_PSFFLUXg)
      real*8        IVFr_1      ! Inverse variance of r flux (IVAR_PSFFLUXr)
      real*8        IVFi_1      ! Inverse variance of i flux (IVAR_PSFFLUXi)
      real*8        IVFz_1      ! Inverse variance of z flux (IVAR_PSFFLUXz)
      real*8        umag_1      ! (mag) PSF magnitude in u band (not corrected for
*                                       Galactic extinction) (PSFMAGu)
      real*8        gmag_1      ! (mag) PSF magnitude in g band (not corrected for
*                                       Galactic extinction) (PSFMAGg)
      real*8        rmag_1      ! (mag) PSF magnitude in r band (not corrected for
*                                       Galactic extinction) (PSFMAGr)
      real*8        imag_2      ! (mag) PSF magnitude in i band (not corrected for
*                                       Galactic extinction) (PSFMAGi)
      real*8        zmag_1      ! (mag) PSF magnitude in z band (not corrected for
*                                       Galactic extinction) (PSFMAGz)
      real*8        e_umag_1    ! (mag) Error in u PSF magnitude (ERR_PSFMAGu)
      real*8        e_gmag_1    ! (mag) Error in g PSF magnitude (ERR_PSFMAGg)
      real*8        e_rmag_1    ! (mag) Error in r PSF magnitude (ERR_PSFMAGr)
      real*8        e_imag_1    ! (mag) Error in i PSF magnitude (ERR_PSFMAGi)
      real*8        e_zmag_1    ! (mag) Error in z PSF magnitude (ERR_PSFMAGz)
      real*8        Extu_1      ! (mag) Galactic extinction in u band
*                                        (EXTINCTIONu) (G8)
      real*8        Extg_1      ! (mag) Galactic extinction in g band
*                                        (EXTINCTIONg) (G8)
      real*8        Extr_1      ! (mag) Galactic extinction in r band
*                                        (EXTINCTIONr) (G8)
      real*8        Exti_1      ! (mag) Galactic extinction in i band
*                                        (EXTINCTIONi) (G8)
      real*8        Extz_1      ! (mag) Galactic extinction in z band
*                                        (EXTINCTIONz) (G8)
      real*8        SNRspec_1   ! Median signal-to-noise ratio per pixel
*                                       over the whole spectrum (SNR_SPEC)
      real*8        SNR1700_1   ! Median signal-to-noise ratio per pixel in
*                                      the window 1650-1750{AA} (rest frame)
*                                       (SNR_1700)
      real*8        SNR3000_1   ! Median signal-to-noise ratio per pixel in
*                                      the window 2950-3050{AA} (rest frame)
*                                       (SNR_3000)
      real*8        BI_CIVt_1   ! (km/s) ?=-1 Balnicity Index (BI) (BI_CIV)
      real*8        e_BI_CIVt_1 ! (km/s) ?=-1 Error on Balnicity index (ERR_BI_CIV)
      integer*4     N2t_1       ! Number of troughs wider than 2000km/s
*                                       (NCIV_2000)
      real*8        Vmin2t1     ! Minimum velocity of each detected
*                                       absorption trough (VMIN_CIV_2000_1)
      real*8        Vmin2t2     ! Minimum velocity of each detected
*                                       absorption trough (VMIN_CIV_2000_2)
      real*8        Vmin2t3     ! Minimum velocity of each detected
*                                       absorption trough (VMIN_CIV_2000_3)
      real*8        Vmin2t4     ! Minimum velocity of each detected
*                                       absorption trough (VMIN_CIV_2000_4)
      real*8        Vmin2t5     ! Minimum velocity of each detected
*                                       absorption trough (VMIN_CIV_2000_5)
      real*8        Vmax2t1     ! Maximum velocity of each detected
*                                       absorption trough (VMAX_CIV_2000_1)
      real*8        Vmax2t2     ! Maximum velocity of each detected
*                                       absorption trough (VMAX_CIV_2000_2)
      real*8        Vmax2t3     ! Maximum velocity of each detected
*                                       absorption trough (VMAX_CIV_2000_3)
      real*8        Vmax2t4     ! Maximum velocity of each detected
*                                       absorption trough (VMAX_CIV_2000_4)
      real*8        Vmax2t5     ! Maximum velocity of each detected
*                                       absorption trough (VMAX_CIV_2000_5)
      real*8        posmin2t1   ! (km/s) Position of the minimum of each absorption
*                                       trough (POSMIN_CIV_2000_1)
      real*8        posmin2t2   ! (km/s) Position of the minimum of each absorption
*                                       trough (POSMIN_CIV_2000_2)
      real*8        posmin2t3   ! (km/s) Position of the minimum of each absorption
*                                       trough (POSMIN_CIV_2000_3)
      real*8        posmin2t4   ! (km/s) Position of the minimum of each absorption
*                                       trough (POSMIN_CIV_2000_4)
      real*8        posmin2t5   ! (km/s) Position of the minimum of each absorption
*                                       trough (POSMIN_CIV_2000_5)
      real*8        Fmin2t1     ! Normalized flux density at the minimum of
*                                       each absorption trough (FMIN_CIV_2000_1)
      real*8        Fmin2t2     ! Normalized flux density at the minimum of
*                                       each absorption trough (FMIN_CIV_2000_2)
      real*8        Fmin2t3     ! Normalized flux density at the minimum of
*                                       each absorption trough (FMIN_CIV_2000_3)
      real*8        Fmin2t4     ! Normalized flux density at the minimum of
*                                       each absorption trough (FMIN_CIV_2000_4)
      real*8        Fmin2t5     ! Normalized flux density at the minimum of
*                                       each absorption trough (FMIN_CIV_2000_5)
      real*8        AI_CIVt_1   ! (km/s) ?=-1 Absorption index (AI) (AI_CIV)
      real*8        e_AI_CIVt_1 ! (km/s) ?=-1 Error on absorption index
*                                        (ERR_AI_CIV)
      integer*4     N_45t_1     ! ?=-1 Number of absorption trough wider
*                                       than 450km/s (NCIV_450)
      real*8        Vmin_45t1   ! ?=-1 Minimum velocity of first detected
*                                         absorption trough (VMIN_CIV_450)
      real*8        Vmin_45to  (16) ! ?=-1 Minimum velocity of others detected
*                                       absorption troughs (VMIN_CIV_450)
      real*8        Vmax_45t1   ! ?=-1 Maximum velocity of first detected
*                                       absorption trough (VMAX_CIV_450)
      real*8        Vmax_45to  (16) ! ?=-1 Maximum velocity of other detected
*                                       absorption troughs (VMAX_CIV_450)
      real*8        posmin_45t1 ! (km/s) ?=-1 Position of the minimum of first
*                                       absorption trough (POSMIN_CIV_450)
      real*8        posmin_45to(16) ! (km/s) ?=-1 Position of the minimum of other
*                                       absorption troughs (POSMIN_CIV_450)
      real*8        Fmin_45t1   ! ?=-1 Normalized flux density at the
*                                       minimum of first absorption trough
*                                       (FMIN_CIV_450)
      real*8        Fmin_45to  (16) ! ?=-1 Normalized flux density at the
*                                       minimum of other absorption troughs
*                                       (FMIN_CIV_450)

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'dr12qsp.dat'	! Supplementary list that contains serendipitous
                                  quasars

      integer*4 nr__2
      parameter (nr__2=4841)	! Number of records
      character*476 ar__2  	! Full-size record

C  J2000 position composed of: RAdeg DEdeg
      character*18  SDSS_2      ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                   (J2000) corrected by CDS (SDSS_NAMEc) (G1)
      character*18  SDSSo_2     ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                   (J2000) (SDSS_NAME) (G1)
      real*8        RAdeg_2     ! (deg) Right Ascension (J2000) (RA)
      real*8        DEdeg_2     ! (deg) Declination (J2000) (DEC)
      integer*8     THINGID_2   ! Thing_ID (THING_ID)
      integer*4     Plate_2     ! Spectroscopic Plate number (PLATE)
      integer*4     MJD_2       ! Spectroscopic MJD (MJD)
      integer*4     Fiber_2     ! Spectroscopic Fiber number (FIBERID)
      real*8        z_v_2       ! Redshift from visual inspection (Z_VI)
      real*8        z_b_2       ! ?=-1 Redshift from BOSS pipeline (Z_PIPE)
      real*8        e_z_b_2     ! []?=-1 Error on BOSS pipeline redshift
*                                   (error codes -4, -5, -6) (ERR_ZPIPE)
      integer*4     f_z_b_2     ! ZWARNING flag|(ZWARNING) (G4)
      integer*4     Morph_2     ! SDSS morphology flag
*                                   0=point source 1=extended|(SDSS_MORPHO)
      integer*8     Btarg1_2    ! BOSS target flag for main survey
*                                   (BOSS_TARGET1)
      integer*8     Atarg1_2    ! BOSS target flag for ancillary programs
*                                   (ANCILLARY_TARGET1)
      integer*8     Atarg2_2    ! BOSS target flag for ancillary programs
*                                   (ANCILLARY_TARGET2)
      integer*8     eBtarg0_2   ! Target selection flag for eBOSS pilot survey
*                                   (EBOSS_TARGET0)
      integer*4     BAL_VI_1    ! BAL flag from visual inspection|(BAL_FLAG_VI)
      character*19  objID_1     ! SDSS Object Identification Number|(OBJ_ID)
      real*8        Fu_2        ! (3.63uJy) ?=0 PSF flux in u band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXu)(G2)
      real*8        Fg_2        ! (3.63uJy) ?=0 PSF flux in g band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXg)(G2)
      real*8        Fr_2        ! (3.63uJy) ?=0 PSF flux in r band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXr)(G2)
      real*8        Fi_2        ! (3.63uJy) ?=0 PSF flux in i band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXi)(G2)
      real*8        Fz_2        ! (3.63uJy) ?=0 PSF flux in z band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXz)(G2)
      real*8        IVFu_2      ! (3.63uJy) Inverse variance of PSF flux in u band
*                                   in nnomggies (IVAR_PSFFLUXu) (G2)
      real*8        IVFg_2      ! (3.63uJy) Inverse variance of PSF flux in g band
*                                   in nnomggies (IVAR_PSFFLUXg) (G2)
      real*8        IVFr_2      ! (3.63uJy) Inverse variance of PSF flux in r band
*                                   in nnomggies (IVAR_PSFFLUXr) (G2)
      real*8        IVFi_2      ! (3.63uJy) Inverse variance of PSF flux in i band
*                                   in nnomggies (IVAR_PSFFLUXi) (G2)
      real*8        IVFz_2      ! (3.63uJy) Inverse variance of PSF flux in z band
*                                   in nnomggies (G2) (IVAR_PSFFLUXz)
      real*8        umag_2      ! (mag) PSF magnitude in u band (not corrected for
*                                   Galactic extinction) (PSFMAGu)
      real*8        gmag_2      ! (mag) PSF magnitude in g band (not corrected for
*                                   Galactic extinction) (PSFMAGg)
      real*8        rmag_2      ! (mag) PSF magnitude in r band (not corrected for
*                                   Galactic extinction) (PSFMAGr)
      real*8        imag_3      ! (mag) PSF magnitude in i band (not corrected for
*                                   Galactic extinction) (PSFMAGi)
      real*8        zmag_2      ! (mag) PSF magnitude in z band (not corrected for
*                                   Galactic extinction) (PSFMAGz)
      real*8        e_umag_2    ! (mag) Error in PSF magnitude in u band (ERR_PSFMAGu)
      real*8        e_gmag_2    ! (mag) Error in PSF magnitude in g band (ERR_PSFMAGg)
      real*8        e_rmag_2    ! (mag) Error in PSF magnitude in r band (ERR_PSFMAGr)
      real*8        e_imag_2    ! (mag) Error in PSF magnitude in i band (ERR_PSFMAGi)
      real*8        e_zmag_2    ! (mag) Error in PSF magnitude in z band (ERR_PSFMAGz)
      real*8        Extu_2      ! (mag) Galactic extinction in u band
*                                   (EXTINCTIONu) (G8)
      real*8        Extg_2      ! (mag) Galactic extinction in g band
*                                   (EXTINCTIONg) (G8)
      real*8        Extr_2      ! (mag) Galactic extinction in r band
*                                   (EXTINCTIONr) (G8)
      real*8        Exti_2      ! (mag) Galactic extinction in i band
*                                   (EXTINCTIONi) (G8)
      real*8        Extz_2      ! (mag) Galactic extinction in z band
*                                   (EXTINCTIONz) (G8)

c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

C  Declarations for 'dr12qspb.dat'	! Supplementary list that contains quasars
                                  identified on bad plates

      integer*4 nr__3
      parameter (nr__3=226)	! Number of records
      character*476 ar__3  	! Full-size record

C  J2000 position composed of: RAdeg DEdeg
      character*18  SDSS_3      ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                   (J2000) corrected by CDS (SDSS_NAMEc) (G1)
      character*18  SDSSo_3     ! SDSS-DR12 designation HHMMSS.ss+DDMMSS.s
*                                   (J2000) (SDSS_NAME) (G1)
      real*8        RAdeg_3     ! (deg) Right Ascension (J2000) (RA)
      real*8        DEdeg_3     ! (deg) Declination (J2000) (DEC)
      integer*8     THINGID_3   ! Thing_ID (THING_ID)
      integer*4     Plate_3     ! Spectroscopic Plate number (PLATE)
      integer*4     MJD_3       ! Spectroscopic MJD (MJD)
      integer*4     Fiber_3     ! Spectroscopic Fiber number (FIBERID)
      real*8        z_v_3       ! Redshift from visual inspection (Z_VI)
      real*8        z_b_3       ! ?=-1 Redshift from BOSS pipeline (Z_PIPE)
      real*8        e_z_b_3     ! []?=-1 Error on BOSS pipeline redshift
*                                   (error codes -4, -5, -6) (ERR_ZPIPE)
      integer*4     f_z_b_3     ! ZWARNING flag|(ZWARNING) (G4)
      integer*4     Morph_3     ! SDSS morphology flag
*                                   0=point source 1=extended|(SDSS_MORPHO)
      integer*8     Btarg1_3    ! BOSS target flag for main survey
*                                   (BOSS_TARGET1)
      integer*8     Atarg1_3    ! BOSS target flag for ancillary programs
*                                   (ANCILLARY_TARGET1)
      integer*8     Atarg2_3    ! BOSS target flag for ancillary programs
*                                   (ANCILLARY_TARGET2)
      integer*8     eBtarg0_3   ! Target selection flag for eBOSS pilot survey
*                                   (EBOSS_TARGET0)
      integer*4     BAL_VI_2    ! BAL flag from visual inspection|(BAL_FLAG_VI)
      character*19  objID_2     ! SDSS Object Identification Number|(OBJ_ID)
      real*8        Fu_3        ! (3.63uJy) ?=0 PSF flux in u band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXu)(G2)
      real*8        Fg_3        ! (3.63uJy) ?=0 PSF flux in g band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXg)(G2)
      real*8        Fr_3        ! (3.63uJy) ?=0 PSF flux in r band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXr)(G2)
      real*8        Fi_3        ! (3.63uJy) ?=0 PSF flux in i band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXi)(G2)
      real*8        Fz_3        ! (3.63uJy) ?=0 PSF flux in z band (not corrected
*                                   for Galactic extinction)
*                                   in nnomggies (PSFFLUXz)(G2)
      real*8        IVFu_3      ! (3.63uJy) Inverse variance of PSF flux in u band
*                                   in nnomggies (IVAR_PSFFLUXu) (G2)
      real*8        IVFg_3      ! (3.63uJy) Inverse variance of PSF flux in g band
*                                   in nnomggies (IVAR_PSFFLUXg) (G2)
      real*8        IVFr_3      ! (3.63uJy) Inverse variance of PSF flux in r band
*                                   in nnomggies (IVAR_PSFFLUXr) (G2)
      real*8        IVFi_3      ! (3.63uJy) Inverse variance of PSF flux in i band
*                                   in nnomggies (IVAR_PSFFLUXi) (G2)
      real*8        IVFz_3      ! (3.63uJy) Inverse variance of PSF flux in z band
*                                   in nnomggies (G2) (IVAR_PSFFLUXz)
      real*8        umag_3      ! (mag) PSF magnitude in u band (not corrected for
*                                   Galactic extinction) (PSFMAGu)
      real*8        gmag_3      ! (mag) PSF magnitude in g band (not corrected for
*                                   Galactic extinction) (PSFMAGg)
      real*8        rmag_3      ! (mag) PSF magnitude in r band (not corrected for
*                                   Galactic extinction) (PSFMAGr)
      real*8        imag_4      ! (mag) PSF magnitude in i band (not corrected for
*                                   Galactic extinction) (PSFMAGi)
      real*8        zmag_3      ! (mag) PSF magnitude in z band (not corrected for
*                                   Galactic extinction) (PSFMAGz)
      real*8        e_umag_3    ! (mag) Error in PSF magnitude in u band (ERR_PSFMAGu)
      real*8        e_gmag_3    ! (mag) Error in PSF magnitude in g band (ERR_PSFMAGg)
      real*8        e_rmag_3    ! (mag) Error in PSF magnitude in r band (ERR_PSFMAGr)
      real*8        e_imag_3    ! (mag) Error in PSF magnitude in i band (ERR_PSFMAGi)
      real*8        e_zmag_3    ! (mag) Error in PSF magnitude in z band (ERR_PSFMAGz)
      real*8        Extu_3      ! (mag) Galactic extinction in u band
*                                   (EXTINCTIONu) (G8)
      real*8        Extg_3      ! (mag) Galactic extinction in g band
*                                   (EXTINCTIONg) (G8)
      real*8        Extr_3      ! (mag) Galactic extinction in r band
*                                   (EXTINCTIONr) (G8)
      real*8        Exti_3      ! (mag) Galactic extinction in i band
*                                   (EXTINCTIONi) (G8)
      real*8        Extz_3      ! (mag) Galactic extinction in z band
*                                   (EXTINCTIONz) (G8)

C=============================================================================

C  Loading file 'dr12q.dat'	! SDSS-DR12 Quasar Catalog

C  Format for file interpretation

    1 format(
     +  A18,1X,A18,1X,F10.6,1X,F10.6,1X,I10,1X,I4,1X,I5,1X,I4,1X,F8.6,
     +  1X,F9.6,1X,F12.6,1X,I3,1X,F9.6,1X,F9.6,1X,E10.4,1X,F7.4,1X,
     +  F7.4,1X,F7.4,1X,I2,1X,I14,1X,I19,1X,I17,1X,I13,1X,I2,32I6,
     +  32I7,32I6,1X,I1,1X,I5,1X,I6,1X,I4,1X,I1,1X,F9.4,1X,F9.4,
     +  32F10.4,1X,F9.4,1X,F9.4,1X,F9.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,
     +  F9.4,1X,E14.7,E13.7,1X,F10.4,1X,F10.4,1X,F10.4,1X,F9.4,1X,
     +  E13.7,1X,E13.7,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,E13.7,
     +  1X,E13.7,1X,I1,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,
     +  1X,I2,1X,F10.4,1X,F10.4,1X,I3,1X,F10.4,1X,F10.4,1X,F10.4,1X,
     +  F10.4,1X,F10.4,1X,I4,1X,I5,1X,A3,1X,I1,1X,I3,1X,A19,1X,E12.6,
     +  1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,F10.6,1X,F10.6,1X,
     +  F10.6,1X,F10.6,1X,F10.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,
     +  1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,
     +  E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,F13.6,1X,F13.6,
     +  1X,F8.6,1X,F8.6,1X,F8.6,1X,F8.6,1X,F8.6,1X,F8.6,1X,F8.6,1X,
     +  F8.6,1X,F8.6,1X,F8.6,1X,F7.4,1X,I3,1X,F7.2,1X,F7.5,1X,F8.5,1X,
     +  F6.4,1X,F7.4,1X,F7.4,1X,I6,1X,E11.6,1X,E11.6,1X,E11.6,1X,
     +  E11.6,1X,E11.6,1X,E11.6,1X,E11.6,1X,E11.6,1X,E11.6,1X,E11.6,
     +  1X,E11.6,1X,E11.6,5X,I2,1X,F6.4,1X,I1,1X,F9.4,1X,F10.4,1X,
     +  F9.4,1X,F10.4,1X,F7.4,1X,F10.4,1X,F10.4,1X,I1,1X,F7.4,1X,
     +  F10.4,1X,F10.4,1X,I1,1X,F7.4,1X,F10.4,1X,F10.4,1X,I1,1X,F7.4,
     +  1X,F7.4,1X,F9.4,1X,F7.4,1X,F7.4,1X,F7.4,1X,F9.4,1X,F8.4,1X,
     +  F7.4,1X,F7.4,1X,F9.4,1X,F8.4,1X,F8.4,1X,F7.4,1X,F9.4,1X,F7.4,
     +  1X,F3.1,1X,A4,1X,A4,1X,F6.4,1X,I1,1X,E12.6,1X,E12.6,1X,E12.6,
     +  1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,E12.6,1X,I2,1X,F10.4,
     +  1X,F10.4,1X,F6.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dr12q.dat')
      write(6,*) '....Loading file: dr12q.dat'
      do i__=1,297301
        read(1,'(A2742)')ar__
        read(ar__,1)
     +  SDSS,SDSSo,RAdeg,DEdeg,THINGID,Plate,MJD,Fiber,z_v,z_b,e_z_b,
     +  f_z_b,z_PCA,e_z_PCA,qCont,zCIV,zCIII,zMgII,Morph,Btarg1,
     +  Atarg1,Atarg2,eBtarg0,NspBOSS,(PlateDup(j__,),j__=1,32),
     +  (MJDDup(j__,),j__=1,32),(FiberDup(j__,),j__=1,32),f7,Plate7,
     +  MJD7,Fiber7,US,alphanu,SNRSpec,(SNRDup(j__,),j__=1,32),
     +  SNR1700,SNR3000,SNR5150,FW_CIV,HW_CIV_b,HW_CIV_r,A_CIV,W_CIV,
     +  e_W_CIV,FW_CIII,HW_CIII_b,HW_CIII_r,A_CIII,W_CIII,e_W_CIII,
     +  FW_MgII,HW_MgII_b,HW_MgII_r,A_MgII,W_MgII,e_W_MgII,BAL_VI,
     +  BI_CIVt,e_BI_CIVt,AI_CIVt,e_AI_CIVt,Chi2CIVt,N2t,Vmin2t,
     +  Vmax2t,N_45t,Vmin_45t,Vmax_45t,W_SiIVt,W_CIVt,W_AlIIIt,RUN,
     +  Ph_MJD,Rerun,Colcam,Field,objID,Fu,Fg,Fr,Fi,Fz,IVFu,IVFg,IVFr,
     +  IVFi,IVFz,umag,gmag,rmag,imag,zmag,e_umag,e_gmag,e_rmag,
     +  e_imag,e_zmag,Fut,Fgt,Frt,Fit,Fzt,iMAG_1,D_g_i,Extu,Extg,Extr,
     +  Exti,Extz,ExtuR,ExtgR,ExtrR,ExtiR,ExtzR,logNHI,Varmatch,
     +  Varchi2,VarA,Vargamma,logXct,SNR_X,sepX,NDetX,F0_2_12,
     +  e_F0_2_12,F0_2_2,e_F0_2_2,F4_5_12,e_F4_5_12,F0_2_12W,
     +  e_F0_2_12W,L0_2_12,L0_5_2,L4_5_12,L0_2_2W,f_F4_5_12,sepXM,
     +  GALEX,FFUV,IVFUV,FNUV,IVNUV,Jmag,e_Jmag,SNR_J,f_Jmag,Hmag,
     +  e_Hmag,SNR_H,f_Hmag,Kmag,e_Kmag,SNR_K,f_Kmag,Sep2,W1mag,
     +  e_W1mag,W1SNR,W1chi2,W2mag,e_W2mag,W2SNR,W2chi2,W3mag,e_W3mag,
     +  W3SNR,W3chi2,W4mag,e_W4mag,W4SNR,W4chi2,CCflags,PHflag,sepW,
     +  UKIDSS,FY,e_FY,FJ,e_FJ,FH,e_FH,FK,e_FK,FIRST,F1p,SNR_1,sep1
        if(ar__(1963:1975) .EQ. '') iMAG_1 = rNULL__
        if(ar__(1977:1989) .EQ. '') D_g_i = rNULL__
        if(ar__(1991:1998) .EQ. '') Extu = rNULL__
        if(ar__(2000:2007) .EQ. '') Extg = rNULL__
        if(ar__(2009:2016) .EQ. '') Extr = rNULL__
        if(ar__(2018:2025) .EQ. '') Exti = rNULL__
        if(ar__(2027:2034) .EQ. '') Extz = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  SDSS,SDSSo,RAdeg,DEdeg,THINGID,Plate,MJD,Fiber,z_v,z_b,e_z_b,
     +  f_z_b,z_PCA,e_z_PCA,qCont,zCIV,zCIII,zMgII,Morph,Btarg1,
     +  Atarg1,Atarg2,eBtarg0,NspBOSS,(PlateDup(j__,),j__=1,32),
     +  (MJDDup(j__,),j__=1,32),(FiberDup(j__,),j__=1,32),f7,Plate7,
     +  MJD7,Fiber7,US,alphanu,SNRSpec,(SNRDup(j__,),j__=1,32),
     +  SNR1700,SNR3000,SNR5150,FW_CIV,HW_CIV_b,HW_CIV_r,A_CIV,W_CIV,
     +  e_W_CIV,FW_CIII,HW_CIII_b,HW_CIII_r,A_CIII,W_CIII,e_W_CIII,
     +  FW_MgII,HW_MgII_b,HW_MgII_r,A_MgII,W_MgII,e_W_MgII,BAL_VI,
     +  BI_CIVt,e_BI_CIVt,AI_CIVt,e_AI_CIVt,Chi2CIVt,N2t,Vmin2t,
     +  Vmax2t,N_45t,Vmin_45t,Vmax_45t,W_SiIVt,W_CIVt,W_AlIIIt,RUN,
     +  Ph_MJD,Rerun,Colcam,Field,objID,Fu,Fg,Fr,Fi,Fz,IVFu,IVFg,IVFr,
     +  IVFi,IVFz,umag,gmag,rmag,imag,zmag,e_umag,e_gmag,e_rmag,
     +  e_imag,e_zmag,Fut,Fgt,Frt,Fit,Fzt,iMAG_1,D_g_i,Extu,Extg,Extr,
     +  Exti,Extz,ExtuR,ExtgR,ExtrR,ExtiR,ExtzR,logNHI,Varmatch,
     +  Varchi2,VarA,Vargamma,logXct,SNR_X,sepX,NDetX,F0_2_12,
     +  e_F0_2_12,F0_2_2,e_F0_2_2,F4_5_12,e_F4_5_12,F0_2_12W,
     +  e_F0_2_12W,L0_2_12,L0_5_2,L4_5_12,L0_2_2W,f_F4_5_12,sepXM,
     +  GALEX,FFUV,IVFUV,FNUV,IVNUV,Jmag,e_Jmag,SNR_J,f_Jmag,Hmag,
     +  e_Hmag,SNR_H,f_Hmag,Kmag,e_Kmag,SNR_K,f_Kmag,Sep2,W1mag,
     +  e_W1mag,W1SNR,W1chi2,W2mag,e_W2mag,W2SNR,W2chi2,W3mag,e_W3mag,
     +  W3SNR,W3chi2,W4mag,e_W4mag,W4SNR,W4chi2,CCflags,PHflag,sepW,
     +  UKIDSS,FY,e_FY,FJ,e_FJ,FH,e_FH,FK,e_FK,FIRST,F1p,SNR_1,sep1
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================

C  Loading file 'dr12qbal.dat'	! Detailed properties of BAL quasars

C  Format for file interpretation

    2 format(
     +  A18,1X,A18,1X,F10.6,1X,F10.6,1X,I10,1X,I4,1X,I5,1X,I4,1X,F8.6,
     +  1X,F9.6,1X,F10.6,1X,I3,1X,F9.6,1X,F9.6,1X,I2,1X,I14,1X,I19,1X,
     +  I17,1X,I13,1X,F11.6,1X,F11.6,1X,F11.6,1X,F11.6,1X,F11.6,1X,
     +  F10.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,F9.6,1X,F9.6,1X,
     +  F9.6,1X,F9.6,1X,F9.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,
     +  F10.6,1X,F8.6,1X,F8.6,1X,F8.6,1X,F8.6,1X,F8.6,1X,F9.6,1X,
     +  F10.6,1X,F9.6,1X,F10.4,1X,F10.4,1X,I2,1X,F10.4,1X,F10.4,1X,
     +  F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,
     +  1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,
     +  F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,
     +  1X,I3,F11.4,16F11.4,F11.4,16F11.4,F11.4,16F11.4,F11.4,16F11.4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dr12qbal.dat')
      write(6,*) '....Loading file: dr12qbal.dat'
      do i__=1,29580
        read(1,'(A1525)')ar__1
        read(ar__1,2)
     +  SDSS_1,SDSSo_1,RAdeg_1,DEdeg_1,THINGID_1,Plate_1,MJD_1,
     +  Fiber_1,z_v_1,z_b_1,e_z_b_1,f_z_b_1,z_PCA_1,e_z_PCA_1,Morph_1,
     +  Btarg1_1,Atarg1_1,Atarg2_1,eBtarg0_1,Fu_1,Fg_1,Fr_1,Fi_1,Fz_1,
     +  IVFu_1,IVFg_1,IVFr_1,IVFi_1,IVFz_1,umag_1,gmag_1,rmag_1,
     +  imag_2,zmag_1,e_umag_1,e_gmag_1,e_rmag_1,e_imag_1,e_zmag_1,
     +  Extu_1,Extg_1,Extr_1,Exti_1,Extz_1,SNRspec_1,SNR1700_1,
     +  SNR3000_1,BI_CIVt_1,e_BI_CIVt_1,N2t_1,Vmin2t1,Vmin2t2,Vmin2t3,
     +  Vmin2t4,Vmin2t5,Vmax2t1,Vmax2t2,Vmax2t3,Vmax2t4,Vmax2t5,
     +  posmin2t1,posmin2t2,posmin2t3,posmin2t4,posmin2t5,Fmin2t1,
     +  Fmin2t2,Fmin2t3,Fmin2t4,Fmin2t5,AI_CIVt_1,e_AI_CIVt_1,N_45t_1,
     +  Vmin_45t1,(Vmin_45to(j__,),j__=1,16),Vmax_45t1,(Vmax_45to(j__,
     +  ),j__=1,16),posmin_45t1,(posmin_45to(j__,),j__=1,16),
     +  Fmin_45t1,(Fmin_45to(j__,),j__=1,16)
c    ..............Just test output...........
        write(6,2)
     +  SDSS_1,SDSSo_1,RAdeg_1,DEdeg_1,THINGID_1,Plate_1,MJD_1,
     +  Fiber_1,z_v_1,z_b_1,e_z_b_1,f_z_b_1,z_PCA_1,e_z_PCA_1,Morph_1,
     +  Btarg1_1,Atarg1_1,Atarg2_1,eBtarg0_1,Fu_1,Fg_1,Fr_1,Fi_1,Fz_1,
     +  IVFu_1,IVFg_1,IVFr_1,IVFi_1,IVFz_1,umag_1,gmag_1,rmag_1,
     +  imag_2,zmag_1,e_umag_1,e_gmag_1,e_rmag_1,e_imag_1,e_zmag_1,
     +  Extu_1,Extg_1,Extr_1,Exti_1,Extz_1,SNRspec_1,SNR1700_1,
     +  SNR3000_1,BI_CIVt_1,e_BI_CIVt_1,N2t_1,Vmin2t1,Vmin2t2,Vmin2t3,
     +  Vmin2t4,Vmin2t5,Vmax2t1,Vmax2t2,Vmax2t3,Vmax2t4,Vmax2t5,
     +  posmin2t1,posmin2t2,posmin2t3,posmin2t4,posmin2t5,Fmin2t1,
     +  Fmin2t2,Fmin2t3,Fmin2t4,Fmin2t5,AI_CIVt_1,e_AI_CIVt_1,N_45t_1,
     +  Vmin_45t1,(Vmin_45to(j__,),j__=1,16),Vmax_45t1,(Vmax_45to(j__,
     +  ),j__=1,16),posmin_45t1,(posmin_45to(j__,),j__=1,16),
     +  Fmin_45t1,(Fmin_45to(j__,),j__=1,16)
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================

C  Loading file 'dr12qsp.dat'	! Supplementary list that contains serendipitous
*                                  quasars

C  Format for file interpretation

    3 format(
     +  A18,1X,A18,1X,F10.6,1X,F10.6,1X,I10,1X,I4,1X,I5,1X,I4,1X,F8.6,
     +  1X,F9.6,1X,F10.6,1X,I3,1X,I2,1X,I14,1X,I19,1X,I19,1X,I10,1X,
     +  I1,1X,A19,1X,F11.6,1X,F11.6,1X,F11.6,1X,F11.6,1X,F11.6,1X,
     +  F10.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,F9.6,1X,F9.6,1X,
     +  F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,
     +  1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dr12qsp.dat')
      write(6,*) '....Loading file: dr12qsp.dat'
      do i__=1,4841
        read(1,'(A476)')ar__2
        read(ar__2,3)
     +  SDSS_2,SDSSo_2,RAdeg_2,DEdeg_2,THINGID_2,Plate_2,MJD_2,
     +  Fiber_2,z_v_2,z_b_2,e_z_b_2,f_z_b_2,Morph_2,Btarg1_2,Atarg1_2,
     +  Atarg2_2,eBtarg0_2,BAL_VI_1,objID_1,Fu_2,Fg_2,Fr_2,Fi_2,Fz_2,
     +  IVFu_2,IVFg_2,IVFr_2,IVFi_2,IVFz_2,umag_2,gmag_2,rmag_2,
     +  imag_3,zmag_2,e_umag_2,e_gmag_2,e_rmag_2,e_imag_2,e_zmag_2,
     +  Extu_2,Extg_2,Extr_2,Exti_2,Extz_2
c    ..............Just test output...........
        write(6,3)
     +  SDSS_2,SDSSo_2,RAdeg_2,DEdeg_2,THINGID_2,Plate_2,MJD_2,
     +  Fiber_2,z_v_2,z_b_2,e_z_b_2,f_z_b_2,Morph_2,Btarg1_2,Atarg1_2,
     +  Atarg2_2,eBtarg0_2,BAL_VI_1,objID_1,Fu_2,Fg_2,Fr_2,Fi_2,Fz_2,
     +  IVFu_2,IVFg_2,IVFr_2,IVFi_2,IVFz_2,umag_2,gmag_2,rmag_2,
     +  imag_3,zmag_2,e_umag_2,e_gmag_2,e_rmag_2,e_imag_2,e_zmag_2,
     +  Extu_2,Extg_2,Extr_2,Exti_2,Extz_2
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================

C  Loading file 'dr12qspb.dat'	! Supplementary list that contains quasars
*                                  identified on bad plates

C  Format for file interpretation

    4 format(
     +  A18,1X,A18,1X,F10.6,1X,F10.6,1X,I10,1X,I4,1X,I5,1X,I4,1X,F8.6,
     +  1X,F9.6,1X,F10.6,1X,I3,1X,I2,1X,I14,1X,I19,1X,I19,1X,I10,1X,
     +  I1,1X,A19,1X,F11.6,1X,F11.6,1X,F11.6,1X,F11.6,1X,F11.6,1X,
     +  F10.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,F10.6,1X,F9.6,1X,F9.6,1X,
     +  F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,
     +  1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'dr12qspb.dat')
      write(6,*) '....Loading file: dr12qspb.dat'
      do i__=1,226
        read(1,'(A476)')ar__3
        read(ar__3,4)
     +  SDSS_3,SDSSo_3,RAdeg_3,DEdeg_3,THINGID_3,Plate_3,MJD_3,
     +  Fiber_3,z_v_3,z_b_3,e_z_b_3,f_z_b_3,Morph_3,Btarg1_3,Atarg1_3,
     +  Atarg2_3,eBtarg0_3,BAL_VI_2,objID_2,Fu_3,Fg_3,Fr_3,Fi_3,Fz_3,
     +  IVFu_3,IVFg_3,IVFr_3,IVFi_3,IVFz_3,umag_3,gmag_3,rmag_3,
     +  imag_4,zmag_3,e_umag_3,e_gmag_3,e_rmag_3,e_imag_3,e_zmag_3,
     +  Extu_3,Extg_3,Extr_3,Exti_3,Extz_3
c    ..............Just test output...........
        write(6,4)
     +  SDSS_3,SDSSo_3,RAdeg_3,DEdeg_3,THINGID_3,Plate_3,MJD_3,
     +  Fiber_3,z_v_3,z_b_3,e_z_b_3,f_z_b_3,Morph_3,Btarg1_3,Atarg1_3,
     +  Atarg2_3,eBtarg0_3,BAL_VI_2,objID_2,Fu_3,Fg_3,Fr_3,Fi_3,Fz_3,
     +  IVFu_3,IVFg_3,IVFr_3,IVFi_3,IVFz_3,umag_3,gmag_3,rmag_3,
     +  imag_4,zmag_3,e_umag_3,e_gmag_3,e_rmag_3,e_imag_3,e_zmag_3,
     +  Extu_3,Extg_3,Extr_3,Exti_3,Extz_3
c    .......End.of.Just test output...........
      end do
      close(1)

C=============================================================================
      stop
      end