FORTRAN Generation
(/./ftp/cats/J/ApJS/234/23)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJS/234/23 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-Oct-13
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/ApJS/234/23          The WISE AGN candidates catalogs          (Assef+, 2018)
*================================================================================
*The WISE AGN catalog.
*    Assef R.J., Stern D., Noirot G., Jun H.D., Cutri R.M., Eisenhardt P.R.M.
*   <Astrophys. J. Suppl. Ser., 234, 23-23 (2018)>
*   =2018ApJS..234...23A    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'r90cat.dat'	! R90 final AGN candidates catalog (table 1)

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  WISEA      (nr__) ! AllWISE designation (JHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg      (nr__) ! (deg) Right ascension (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination (J2000)
      real*4        W1mag      (nr__) ! (mag) [8/21.7] WISE W1 (3.4um) magnitude
      real*4        e_W1mag    (nr__) ! (mag) [0.01/0.6]?=- W1mag uncertainty
      real*4        W2mag      (nr__) ! (mag) [7/17.7] WISE W2 (4.2um) magnitude
      real*4        e_W2mag    (nr__) ! (mag) [0.008/0.3] W2mag uncertainty
      real*4        W3mag      (nr__) ! (mag) [1.2/17.3]?=- WISE W3 (12um) magnitude
      real*4        e_W3mag    (nr__) ! (mag) [0.006/0.6]?=- W3mag uncertainty
      real*4        W4mag      (nr__) ! (mag) [-3.2/10.5]?=- WISE W4 (22um) magnitude
      real*4        e_W4mag    (nr__) ! (mag) [0.003/0.6]?=- W4mag uncertainty
      integer*4     MS         (nr__) ! [0/1] Moon-SAA flag (1)
      integer*4     SigPix     (nr__) ! (deg-2) [5/2497]? {Sigma}_pix_ value;
*                                   only for the final catalogs (2)
*Note (1): We strongly caution the user when considering faint sources near the
*  south Atlantic anomaly (SAA) in fields with high Moon background. To aid in
*  identifying possibly problematic sources, we have added a MOON_SAA flag to
*  the catalog, which is equal to 1 if the source is at a declination between
*  -15{deg} and -45{deg}, consistent with the SAA latitude, has a moon_lev flag
*  in W2 equal or greater to 3, and W2 S/N<=7.
*  See section 3.3.2. for further explanations.
*Note (2): We find a number of spurious sources associated with residuals left
*          by solar system planets in the co-added WISE data.
*          We include for each source in the final R90 and C75 catalogs the
*          surface density of the HEALPix pixel that contains it ({Sigma}_pix_)
*          so the user can decide how to best deal with the artifacts described
*          in section 3.3.4.

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

C  Declarations for 'c75cat.dat'	! C75 final AGN candidates catalog (table 2)

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  WISEA_1    (nr__1) ! AllWISE designation (JHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg_1    (nr__1) ! (deg) Right ascension (J2000)
      real*8        DEdeg_1    (nr__1) ! (deg) Declination (J2000)
      real*4        W1mag_1    (nr__1) ! (mag) [8/21.7] WISE W1 (3.4um) magnitude
      real*4        e_W1mag_1  (nr__1) ! (mag) [0.01/0.6]?=- W1mag uncertainty
      real*4        W2mag_1    (nr__1) ! (mag) [7/17.7] WISE W2 (4.2um) magnitude
      real*4        e_W2mag_1  (nr__1) ! (mag) [0.008/0.3] W2mag uncertainty
      real*4        W3mag_1    (nr__1) ! (mag) [1.2/17.3]?=- WISE W3 (12um) magnitude
      real*4        e_W3mag_1  (nr__1) ! (mag) [0.006/0.6]?=- W3mag uncertainty
      real*4        W4mag_1    (nr__1) ! (mag) [-3.2/10.5]?=- WISE W4 (22um) magnitude
      real*4        e_W4mag_1  (nr__1) ! (mag) [0.003/0.6]?=- W4mag uncertainty
      integer*4     MS_1       (nr__1) ! [0/1] Moon-SAA flag (1)
      integer*4     SigPix_1   (nr__1) ! (deg-2) [5/2497]? {Sigma}_pix_ value;
*                                   only for the final catalogs (2)
*Note (1): We strongly caution the user when considering faint sources near the
*  south Atlantic anomaly (SAA) in fields with high Moon background. To aid in
*  identifying possibly problematic sources, we have added a MOON_SAA flag to
*  the catalog, which is equal to 1 if the source is at a declination between
*  -15{deg} and -45{deg}, consistent with the SAA latitude, has a moon_lev flag
*  in W2 equal or greater to 3, and W2 S/N<=7.
*  See section 3.3.2. for further explanations.
*Note (2): We find a number of spurious sources associated with residuals left
*          by solar system planets in the co-added WISE data.
*          We include for each source in the final R90 and C75 catalogs the
*          surface density of the HEALPix pixel that contains it ({Sigma}_pix_)
*          so the user can decide how to best deal with the artifacts described
*          in section 3.3.4.

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

C  Declarations for 'r90ex.dat'	! R90 catalog of extended sources (table 7)

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  WISEA_2    (nr__2) ! AllWISE designation (JHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg_2    (nr__2) ! (deg) Right ascension (J2000)
      real*8        DEdeg_2    (nr__2) ! (deg) Declination (J2000)
      real*4        W1mag_2    (nr__2) ! (mag) [8/21.7] WISE W1 (3.4um) magnitude
      real*4        e_W1mag_2  (nr__2) ! (mag) [0.01/0.6]?=- W1mag uncertainty
      real*4        W2mag_2    (nr__2) ! (mag) [7/17.7] WISE W2 (4.2um) magnitude
      real*4        e_W2mag_2  (nr__2) ! (mag) [0.008/0.3] W2mag uncertainty
      real*4        W3mag_2    (nr__2) ! (mag) [1.2/17.3]?=- WISE W3 (12um) magnitude
      real*4        e_W3mag_2  (nr__2) ! (mag) [0.006/0.6]?=- W3mag uncertainty
      real*4        W4mag_2    (nr__2) ! (mag) [-3.2/10.5]?=- WISE W4 (22um) magnitude
      real*4        e_W4mag_2  (nr__2) ! (mag) [0.003/0.6]?=- W4mag uncertainty
      integer*4     MS_2       (nr__2) ! [0/1] Moon-SAA flag (1)
      integer*4     SigPix_2   (nr__2) ! (deg-2) [5/2497]? {Sigma}_pix_ value;
*                                   only for the final catalogs (2)
*Note (1): We strongly caution the user when considering faint sources near the
*  south Atlantic anomaly (SAA) in fields with high Moon background. To aid in
*  identifying possibly problematic sources, we have added a MOON_SAA flag to
*  the catalog, which is equal to 1 if the source is at a declination between
*  -15{deg} and -45{deg}, consistent with the SAA latitude, has a moon_lev flag
*  in W2 equal or greater to 3, and W2 S/N<=7.
*  See section 3.3.2. for further explanations.
*Note (2): We find a number of spurious sources associated with residuals left
*          by solar system planets in the co-added WISE data.
*          We include for each source in the final R90 and C75 catalogs the
*          surface density of the HEALPix pixel that contains it ({Sigma}_pix_)
*          so the user can decide how to best deal with the artifacts described
*          in section 3.3.4.

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

C  Declarations for 'c75ex.dat'	! C75 catalog of extended sources (table 8)

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  WISEA_3    (nr__3) ! AllWISE designation (JHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg_3    (nr__3) ! (deg) Right ascension (J2000)
      real*8        DEdeg_3    (nr__3) ! (deg) Declination (J2000)
      real*4        W1mag_3    (nr__3) ! (mag) [8/21.7] WISE W1 (3.4um) magnitude
      real*4        e_W1mag_3  (nr__3) ! (mag) [0.01/0.6]?=- W1mag uncertainty
      real*4        W2mag_3    (nr__3) ! (mag) [7/17.7] WISE W2 (4.2um) magnitude
      real*4        e_W2mag_3  (nr__3) ! (mag) [0.008/0.3] W2mag uncertainty
      real*4        W3mag_3    (nr__3) ! (mag) [1.2/17.3]?=- WISE W3 (12um) magnitude
      real*4        e_W3mag_3  (nr__3) ! (mag) [0.006/0.6]?=- W3mag uncertainty
      real*4        W4mag_3    (nr__3) ! (mag) [-3.2/10.5]?=- WISE W4 (22um) magnitude
      real*4        e_W4mag_3  (nr__3) ! (mag) [0.003/0.6]?=- W4mag uncertainty
      integer*4     MS_3       (nr__3) ! [0/1] Moon-SAA flag (1)
      integer*4     SigPix_3   (nr__3) ! (deg-2) [5/2497]? {Sigma}_pix_ value;
*                                   only for the final catalogs (2)
*Note (1): We strongly caution the user when considering faint sources near the
*  south Atlantic anomaly (SAA) in fields with high Moon background. To aid in
*  identifying possibly problematic sources, we have added a MOON_SAA flag to
*  the catalog, which is equal to 1 if the source is at a declination between
*  -15{deg} and -45{deg}, consistent with the SAA latitude, has a moon_lev flag
*  in W2 equal or greater to 3, and W2 S/N<=7.
*  See section 3.3.2. for further explanations.
*Note (2): We find a number of spurious sources associated with residuals left
*          by solar system planets in the co-added WISE data.
*          We include for each source in the final R90 and C75 catalogs the
*          surface density of the HEALPix pixel that contains it ({Sigma}_pix_)
*          so the user can decide how to best deal with the artifacts described
*          in section 3.3.4.

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

C  Loading file 'r90cat.dat'	! R90 final AGN candidates catalog (table 1)

C  Format for file interpretation

    1 format(
     +  A19,1X,F11.7,1X,F11.7,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,I1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'r90cat.dat')
      write(6,*) '....Loading file: r90cat.dat'
      do i__=1,4543530
        read(1,'(A106)')ar__
        read(ar__,1)
     +  WISEA(i__),RAdeg(i__),DEdeg(i__),W1mag(i__),e_W1mag(i__),
     +  W2mag(i__),e_W2mag(i__),W3mag(i__),e_W3mag(i__),W4mag(i__),
     +  e_W4mag(i__),MS(i__),SigPix(i__)
        if (idig(ar__(52:57)).EQ.0) e_W1mag(i__) =  rNULL__
        if (idig(ar__(73:78)).EQ.0) W3mag(i__) =  rNULL__
        if (idig(ar__(80:85)).EQ.0) e_W3mag(i__) =  rNULL__
        if (idig(ar__(87:92)).EQ.0) W4mag(i__) =  rNULL__
        if (idig(ar__(94:99)).EQ.0) e_W4mag(i__) =  rNULL__
        if(ar__(103:106) .EQ. '') SigPix(i__) = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  WISEA(i__),RAdeg(i__),DEdeg(i__),W1mag(i__),e_W1mag(i__),
     +  W2mag(i__),e_W2mag(i__),W3mag(i__),e_W3mag(i__),W4mag(i__),
     +  e_W4mag(i__),MS(i__),SigPix(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'c75cat.dat'	! C75 final AGN candidates catalog (table 2)

C  Format for file interpretation

    2 format(
     +  A19,1X,F11.7,1X,F11.7,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,I1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'c75cat.dat')
      write(6,*) '....Loading file: c75cat.dat'
      do i__=1,20907127
        read(1,'(A106)')ar__1
        read(ar__1,2)
     +  WISEA_1(i__),RAdeg_1(i__),DEdeg_1(i__),W1mag_1(i__),
     +  e_W1mag_1(i__),W2mag_1(i__),e_W2mag_1(i__),W3mag_1(i__),
     +  e_W3mag_1(i__),W4mag_1(i__),e_W4mag_1(i__),MS_1(i__),
     +  SigPix_1(i__)
        if (idig(ar__1(52:57)).EQ.0) e_W1mag_1(i__) =  rNULL__
        if (idig(ar__1(73:78)).EQ.0) W3mag_1(i__) =  rNULL__
        if (idig(ar__1(80:85)).EQ.0) e_W3mag_1(i__) =  rNULL__
        if (idig(ar__1(87:92)).EQ.0) W4mag_1(i__) =  rNULL__
        if (idig(ar__1(94:99)).EQ.0) e_W4mag_1(i__) =  rNULL__
        if(ar__1(103:106) .EQ. '') SigPix_1(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  WISEA_1(i__),RAdeg_1(i__),DEdeg_1(i__),W1mag_1(i__),
     +  e_W1mag_1(i__),W2mag_1(i__),e_W2mag_1(i__),W3mag_1(i__),
     +  e_W3mag_1(i__),W4mag_1(i__),e_W4mag_1(i__),MS_1(i__),
     +  SigPix_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'r90ex.dat'	! R90 catalog of extended sources (table 7)

C  Format for file interpretation

    3 format(
     +  A19,1X,F11.7,1X,F11.7,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,I1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'r90ex.dat')
      write(6,*) '....Loading file: r90ex.dat'
      do i__=1,20645
        read(1,'(A106)')ar__2
        read(ar__2,3)
     +  WISEA_2(i__),RAdeg_2(i__),DEdeg_2(i__),W1mag_2(i__),
     +  e_W1mag_2(i__),W2mag_2(i__),e_W2mag_2(i__),W3mag_2(i__),
     +  e_W3mag_2(i__),W4mag_2(i__),e_W4mag_2(i__),MS_2(i__),
     +  SigPix_2(i__)
        if (idig(ar__2(52:57)).EQ.0) e_W1mag_2(i__) =  rNULL__
        if (idig(ar__2(73:78)).EQ.0) W3mag_2(i__) =  rNULL__
        if (idig(ar__2(80:85)).EQ.0) e_W3mag_2(i__) =  rNULL__
        if (idig(ar__2(87:92)).EQ.0) W4mag_2(i__) =  rNULL__
        if (idig(ar__2(94:99)).EQ.0) e_W4mag_2(i__) =  rNULL__
        if(ar__2(103:106) .EQ. '') SigPix_2(i__) = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  WISEA_2(i__),RAdeg_2(i__),DEdeg_2(i__),W1mag_2(i__),
     +  e_W1mag_2(i__),W2mag_2(i__),e_W2mag_2(i__),W3mag_2(i__),
     +  e_W3mag_2(i__),W4mag_2(i__),e_W4mag_2(i__),MS_2(i__),
     +  SigPix_2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'c75ex.dat'	! C75 catalog of extended sources (table 8)

C  Format for file interpretation

    4 format(
     +  A19,1X,F11.7,1X,F11.7,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,I1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'c75ex.dat')
      write(6,*) '....Loading file: c75ex.dat'
      do i__=1,26331
        read(1,'(A106)')ar__3
        read(ar__3,4)
     +  WISEA_3(i__),RAdeg_3(i__),DEdeg_3(i__),W1mag_3(i__),
     +  e_W1mag_3(i__),W2mag_3(i__),e_W2mag_3(i__),W3mag_3(i__),
     +  e_W3mag_3(i__),W4mag_3(i__),e_W4mag_3(i__),MS_3(i__),
     +  SigPix_3(i__)
        if (idig(ar__3(52:57)).EQ.0) e_W1mag_3(i__) =  rNULL__
        if (idig(ar__3(73:78)).EQ.0) W3mag_3(i__) =  rNULL__
        if (idig(ar__3(80:85)).EQ.0) e_W3mag_3(i__) =  rNULL__
        if (idig(ar__3(87:92)).EQ.0) W4mag_3(i__) =  rNULL__
        if (idig(ar__3(94:99)).EQ.0) e_W4mag_3(i__) =  rNULL__
        if(ar__3(103:106) .EQ. '') SigPix_3(i__) = iNULL__
c    ..............Just test output...........
        write(6,4)
     +  WISEA_3(i__),RAdeg_3(i__),DEdeg_3(i__),W1mag_3(i__),
     +  e_W1mag_3(i__),W2mag_3(i__),e_W2mag_3(i__),W3mag_3(i__),
     +  e_W3mag_3(i__),W4mag_3(i__),e_W4mag_3(i__),MS_3(i__),
     +  SigPix_3(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C Locate position of first digit in string; or return 0
      integer function idig(c)
      character*(*) c
      character*1 c1
      integer lc,i
      lc=len(c)
      idig=0
      do i=1,lc
         if(c(i:i).ne.' ') go to 1
      end do
    1 if(i.gt.lc) return
      c1=c(i:i)
      if(c1.eq.'.'.or.c1.eq.'-'.or.c1.eq.'+') i=i+1
      if(i.gt.lc) return
      c1=c(i:i)
      if(c1.ge.'0'.and.c1.le.'9') idig=i
      return
      end