FORTRAN Generation
(/./ftp/cats/J/AJ/137/3884)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/137/3884 into FORTRAN code for loading all data files into arrays.

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 2026-Jun-15
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. J/AJ/137/3884     Quasar candidates selected from the SDSS     (Richards+, 2009)
*================================================================================
*Eight-dimensional mid-infrared/optical Bayesian quasar selection.
*    Richards G.T., Deo R.P., Lacy M., Myers A.D., Nichol R.C., Zakamska N.L.,
*    Brunner R.J., Brandt W.N., Gray A.G., Parejko J.K., Ptak A.,
*    Schneider D.P., Storrie-Lombardi L.J., Szalay A.S.
*   <Astron. J., 137, 3884-3899 (2009)>
*   =2009AJ....137.3884R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table5.dat'	! Bayesian quasar candidates

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Seq        (nr__) ! [1/6138] Unique catalog number,
*                                         <[RDL2009] NNNN> in Simbad
      real*8        RAdeg      (nr__) ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination in decimal degrees (J2000)
      character*18  SDSS       (nr__) ! SDSS Name (JHHMMSS.SS+DDMMSS.S)
      character*18  ID         (nr__) ! SDSS Object ID
      real*4        umag       (nr__) ! (mag) SDSS u band PSF asinh magnitude (1)
      real*4        gmag       (nr__) ! (mag) SDSS g band PSF asinh magnitude (1)
      real*4        rmag       (nr__) ! (mag) SDSS r band PSF asinh magnitude (1)
      real*4        imag       (nr__) ! (mag) SDSS i band PSF asinh magnitude (1)
      real*4        zmag       (nr__) ! (mag) SDSS z band PSF asinh magnitude (1)
      real*8        F3_6       (nr__) ! (uJy) Spitzer/IRAC 3.6 micron band flux density
      real*8        F4_5       (nr__) ! (uJy) Spitzer/IRAC 4.5 micron band flux density
      real*8        F5_8       (nr__) ! (uJy) Spitzer/IRAC 5.8 micron band flux density
      real*8        F8_0       (nr__) ! (uJy) Spitzer/IRAC 8.0 micron band flux density
      real*4        e_umag     (nr__) ! (mag) Error in umag
      real*4        e_gmag     (nr__) ! (mag) Error in gmag
      real*4        e_rmag     (nr__) ! (mag) Error in rmag
      real*4        e_imag     (nr__) ! (mag) Error in imag
      real*4        e_zmag     (nr__) ! (mag) Error in zmag
      real*8        e_F3_6     (nr__) ! (uJy) Error in F3.6
      real*8        e_F4_5     (nr__) ! (uJy) Error in F4.5
      real*8        e_F5_8     (nr__) ! (uJy) Error in F5.8
      real*8        e_F8_0     (nr__) ! (uJy) Error in F8.0
      real*4        Au         (nr__) ! (mag) The u band Galactic extinction (2)
      integer*4     cl         (nr__) ! [3/6] SDSS Morphology (6=point, 3=extended)
      integer*4     wL         (nr__) ! [0/1] Lacy wedge region flag (1=in, 0=out)
      integer*4     wS         (nr__) ! [0/1] Stern wedge region flag (1=in, 0=out)
      integer*4     wSm        (nr__) ! [0/1] Modified Stern wedge flag (1=in, 0=out)
      integer*4     cl8        (nr__) ! [0/1] 8-D Bayesian classification (1=in, 0=out)
      integer*4     cl6        (nr__) ! [0/1] 6-D Bayesian classification (1=in, 0=out)
      real*4        zph8       (nr__) ! 8-D photometric redshift (5)
      real*4        e_zph8     (nr__) ! Lower limit on zph8
      real*4        E_zph8_1   (nr__) ! Upper limit on zph8
      real*4        zpr8       (nr__) ! 8-D photometric redshift range probability
      real*4        zph6       (nr__) ! 6-D photometric redshift (5)
      real*4        e_zph6     (nr__) ! Lower limit on zph6
      real*4        E_zph6_1   (nr__) ! Upper limit on zph6
      real*4        zpr6       (nr__) ! 6-D photometric redshift range probability
      integer*4     O          (nr__) ! [0/1] Optical selection flag (6)
      character*10  P_ID       (nr__) ! Previous catalog identification  with
*                                morphological type (G1)
      real*8        P_z        (nr__) ! Previous catalog object redshift
*Note (1): Corrected for Galactic extinction.
*Note (2): Where Au/Ag/Ar/Ai/Az = 5.155/3.793/2.751/2.086/1.479 * E(B-V).
*Note (5): See Weinstein et al. (2004ApJS..155..243W).
*Note (6): From Richards et al. (2009ApJS..180...67R).

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

C  Declarations for 'table6.dat'	! Wedge quasar candidates

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Seq_1      (nr__1) ! [1/6138] Unique catalog number,
*                                         <[RDL2009] NNNN> in Simbad
      real*8        RAdeg_1    (nr__1) ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination in decimal degrees (J2000)
      character*18  SDSS_1     (nr__1) ! SDSS Name (JHHMMSS.SS+DDMMSS.S)
      character*18  ID_1       (nr__1) ! SDSS Object ID
      real*4        umag_1     (nr__1) ! (mag) SDSS u band PSF asinh magnitude (1)
      real*4        gmag_1     (nr__1) ! (mag) SDSS g band PSF asinh magnitude (1)
      real*4        rmag_1     (nr__1) ! (mag) SDSS r band PSF asinh magnitude (1)
      real*4        imag_1     (nr__1) ! (mag) SDSS i band PSF asinh magnitude (1)
      real*4        zmag_1     (nr__1) ! (mag) SDSS z band PSF asinh magnitude (1)
      real*8        F3_6_1     (nr__1) ! (uJy) Spitzer/IRAC 3.6 micron band flux density
      real*8        F4_5_1     (nr__1) ! (uJy) Spitzer/IRAC 4.5 micron band flux density
      real*8        F5_8_1     (nr__1) ! (uJy) Spitzer/IRAC 5.8 micron band flux density
      real*8        F8_0_1     (nr__1) ! (uJy) Spitzer/IRAC 8.0 micron band flux density
      real*4        e_umag_1   (nr__1) ! (mag) Error in umag
      real*4        e_gmag_1   (nr__1) ! (mag) Error in gmag
      real*4        e_rmag_1   (nr__1) ! (mag) Error in rmag
      real*4        e_imag_1   (nr__1) ! (mag) Error in imag
      real*4        e_zmag_1   (nr__1) ! (mag) Error in zmag
      real*8        e_F3_6_1   (nr__1) ! (uJy) Error in F3.6
      real*8        e_F4_5_1   (nr__1) ! (uJy) Error in F4.5
      real*8        e_F5_8_1   (nr__1) ! (uJy) Error in F5.8
      real*8        e_F8_0_1   (nr__1) ! (uJy) Error in F8.0
      real*4        Au_1       (nr__1) ! (mag) The u band Galactic extinction (2)
      integer*4     cl_1       (nr__1) ! [3/6] SDSS Morphology (6=point, 3=extended)
      integer*4     wL_1       (nr__1) ! [0/1] Lacy wedge region flag (1=in, 0=out)
      integer*4     wS_1       (nr__1) ! [0/1] Stern wedge region flag (1=in, 0=out)
      integer*4     wSm_1      (nr__1) ! [0/1] Modified Stern wedge flag (1=in, 0=out)
      integer*4     cl8_1      (nr__1) ! [0/1] 8-D Bayesian classification (1=in, 0=out)
      integer*4     cl6_1      (nr__1) ! [0/1] 6-D Bayesian classification (1=in, 0=out)
      real*4        zph8_1     (nr__1) ! 8-D photometric redshift (5)
      real*4        e_zph8_2   (nr__1) ! Lower limit on zph8
      real*4        E_zph8_3   (nr__1) ! Upper limit on zph8
      real*4        zpr8_1     (nr__1) ! 8-D photometric redshift range probability
      real*4        zph6_1     (nr__1) ! 6-D photometric redshift (5)
      real*4        e_zph6_2   (nr__1) ! Lower limit on zph6
      real*4        E_zph6_3   (nr__1) ! Upper limit on zph6
      real*4        zpr6_1     (nr__1) ! 6-D photometric redshift range probability
      integer*4     O_1        (nr__1) ! [0/1] Optical selection flag (6)
      character*10  P_ID_1     (nr__1) ! Previous catalog identification  with
*                                morphological type (G1)
      real*8        P_z_1      (nr__1) ! Previous catalog object redshift
*Note (1): Corrected for Galactic extinction.
*Note (2): Where Au/Ag/Ar/Ai/Az = 5.155/3.793/2.751/2.086/1.479 * E(B-V).
*Note (5): See Weinstein et al. (2004ApJS..155..243W).
*Note (6): From Richards et al. (2009ApJS..180...67R).

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

C  Declarations for 'table7.dat'	! XMM-Newton objects in the XFLS area

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

C  J2000 position composed of: RAdeg DEdeg
      character*18  XName      (nr__2) ! Name (XHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg_2    (nr__2) ! (deg) Right Ascension in decimal degrees (J2000)
      real*8        DEdeg_2    (nr__2) ! (deg) Declination in decimal degrees (J2000)
      real*4        Exp        (nr__2) ! (ks) XMM-Newton exposure time
      real*4        Ftot       (nr__2) ! (mW/m2) ? Total flux
      real*4        Scts       (nr__2) ! (ct) ? Soft-band counts (background corrected)
      real*4        Hcts       (nr__2) ! (ct) ? Hard-band counts (background corrected)
      real*4        HR         (nr__2) ! ? Hardness ratio
      real*4        e_HR       (nr__2) ! ? Error in HR
      integer*4     Seq_2      (nr__2) ! ? Quasar catalog number
      character*7   P_ID_2     (nr__2) ! Previous catalog identification with
*                                      morphological type (G1)
      real*4        P_z_2      (nr__2) ! ? Previous catalog object redshift

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

C  Loading file 'table5.dat'	! Bayesian quasar candidates

C  Format for file interpretation

    1 format(
     +  I4,1X,F10.6,1X,F9.6,1X,A18,1X,A18,1X,F6.3,1X,F6.3,1X,F6.3,1X,
     +  F6.3,1X,F6.3,1X,F8.3,1X,F8.3,1X,F8.3,1X,F8.3,1X,F6.3,1X,F6.3,
     +  1X,F5.3,1X,F5.3,1X,F5.3,1X,F7.3,1X,F7.3,1X,F7.3,1X,F7.3,1X,
     +  F5.3,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,F4.2,1X,F4.2,1X,
     +  F4.2,1X,F5.3,1X,F4.2,1X,F4.2,1X,F4.2,1X,F5.3,1X,I1,1X,A10,1X,
     +  F9.6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,5546
        read(1,'(A281)')ar__
        read(ar__,1)
     +  Seq(i__),RAdeg(i__),DEdeg(i__),SDSS(i__),ID(i__),umag(i__),
     +  gmag(i__),rmag(i__),imag(i__),zmag(i__),F3_6(i__),F4_5(i__),
     +  F5_8(i__),F8_0(i__),e_umag(i__),e_gmag(i__),e_rmag(i__),
     +  e_imag(i__),e_zmag(i__),e_F3_6(i__),e_F4_5(i__),e_F5_8(i__),
     +  e_F8_0(i__),Au(i__),cl(i__),wL(i__),wS(i__),wSm(i__),cl8(i__),
     +  cl6(i__),zph8(i__),e_zph8(i__),E_zph8_1(i__),zpr8(i__),
     +  zph6(i__),e_zph6(i__),E_zph6_1(i__),zpr6(i__),O(i__),
     +  P_ID(i__),P_z(i__)
c    ..............Just test output...........
        write(6,1)
     +  Seq(i__),RAdeg(i__),DEdeg(i__),SDSS(i__),ID(i__),umag(i__),
     +  gmag(i__),rmag(i__),imag(i__),zmag(i__),F3_6(i__),F4_5(i__),
     +  F5_8(i__),F8_0(i__),e_umag(i__),e_gmag(i__),e_rmag(i__),
     +  e_imag(i__),e_zmag(i__),e_F3_6(i__),e_F4_5(i__),e_F5_8(i__),
     +  e_F8_0(i__),Au(i__),cl(i__),wL(i__),wS(i__),wSm(i__),cl8(i__),
     +  cl6(i__),zph8(i__),e_zph8(i__),E_zph8_1(i__),zpr8(i__),
     +  zph6(i__),e_zph6(i__),E_zph6_1(i__),zpr6(i__),O(i__),
     +  P_ID(i__),P_z(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! Wedge quasar candidates

C  Format for file interpretation

    2 format(
     +  I4,1X,F10.6,1X,F9.6,1X,A18,1X,A18,1X,F6.3,1X,F6.3,1X,F6.3,1X,
     +  F6.3,1X,F6.3,1X,F8.3,1X,F8.3,1X,F8.3,1X,F8.3,1X,F6.3,1X,F6.3,
     +  1X,F5.3,1X,F5.3,1X,F5.3,1X,F7.3,1X,F7.3,1X,F7.3,1X,F7.3,1X,
     +  F5.3,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,F4.2,1X,F4.2,1X,
     +  F4.2,1X,F5.3,1X,F4.2,1X,F4.2,1X,F4.2,1X,F5.3,1X,I1,1X,A10,1X,
     +  F9.6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,592
        read(1,'(A281)')ar__1
        read(ar__1,2)
     +  Seq_1(i__),RAdeg_1(i__),DEdeg_1(i__),SDSS_1(i__),ID_1(i__),
     +  umag_1(i__),gmag_1(i__),rmag_1(i__),imag_1(i__),zmag_1(i__),
     +  F3_6_1(i__),F4_5_1(i__),F5_8_1(i__),F8_0_1(i__),e_umag_1(i__),
     +  e_gmag_1(i__),e_rmag_1(i__),e_imag_1(i__),e_zmag_1(i__),
     +  e_F3_6_1(i__),e_F4_5_1(i__),e_F5_8_1(i__),e_F8_0_1(i__),
     +  Au_1(i__),cl_1(i__),wL_1(i__),wS_1(i__),wSm_1(i__),cl8_1(i__),
     +  cl6_1(i__),zph8_1(i__),e_zph8_2(i__),E_zph8_3(i__),
     +  zpr8_1(i__),zph6_1(i__),e_zph6_2(i__),E_zph6_3(i__),
     +  zpr6_1(i__),O_1(i__),P_ID_1(i__),P_z_1(i__)
c    ..............Just test output...........
        write(6,2)
     +  Seq_1(i__),RAdeg_1(i__),DEdeg_1(i__),SDSS_1(i__),ID_1(i__),
     +  umag_1(i__),gmag_1(i__),rmag_1(i__),imag_1(i__),zmag_1(i__),
     +  F3_6_1(i__),F4_5_1(i__),F5_8_1(i__),F8_0_1(i__),e_umag_1(i__),
     +  e_gmag_1(i__),e_rmag_1(i__),e_imag_1(i__),e_zmag_1(i__),
     +  e_F3_6_1(i__),e_F4_5_1(i__),e_F5_8_1(i__),e_F8_0_1(i__),
     +  Au_1(i__),cl_1(i__),wL_1(i__),wS_1(i__),wSm_1(i__),cl8_1(i__),
     +  cl6_1(i__),zph8_1(i__),e_zph8_2(i__),E_zph8_3(i__),
     +  zpr8_1(i__),zph6_1(i__),e_zph6_2(i__),E_zph6_3(i__),
     +  zpr6_1(i__),O_1(i__),P_ID_1(i__),P_z_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table7.dat'	! XMM-Newton objects in the XFLS area

C  Format for file interpretation

    3 format(
     +  1X,A18,1X,F10.6,1X,F9.6,1X,F4.1,1X,E11.4,1X,F5.1,1X,F4.1,1X,
     +  F5.2,1X,F4.2,1X,I4,1X,A7,2X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table7.dat')
      write(6,*) '....Loading file: table7.dat'
      do i__=1,23
        read(1,'(A99)')ar__2
        read(ar__2,3)
     +  XName(i__),RAdeg_2(i__),DEdeg_2(i__),Exp(i__),Ftot(i__),
     +  Scts(i__),Hcts(i__),HR(i__),e_HR(i__),Seq_2(i__),P_ID_2(i__),
     +  P_z_2(i__)
        if(ar__2(47:57) .EQ. '') Ftot(i__) = rNULL__
        if(ar__2(59:63) .EQ. '') Scts(i__) = rNULL__
        if(ar__2(65:68) .EQ. '') Hcts(i__) = rNULL__
        if(ar__2(70:74) .EQ. '') HR(i__) = rNULL__
        if(ar__2(76:79) .EQ. '') e_HR(i__) = rNULL__
        if(ar__2(81:84) .EQ. '') Seq_2(i__) = iNULL__
        if(ar__2(95:99) .EQ. '') P_z_2(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  XName(i__),RAdeg_2(i__),DEdeg_2(i__),Exp(i__),Ftot(i__),
     +  Scts(i__),Hcts(i__),HR(i__),e_HR(i__),Seq_2(i__),P_ID_2(i__),
     +  P_z_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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