FORTRAN Generation
(/./ftp/cats/J/AJ/128/1501)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/128/1501 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 2026-May-17
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/128/1501         CLASXS: X-ray catalog                        (Yang+, 2004)
*================================================================================
*The Chandra Large Area Synoptic X-ray Survey (CLASXS) of the
*Lockman Hole-Northwest: the X-ray catalog.
*    Yang Y., Mushotzky R.F., Steffen A.T., Barger A.J., Cowie L.L.
*   <Astron. J., 128, 1501-1523 (2004)>
*   =2004AJ....128.1501Y
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Main Chandra Catalog: Basic Source Properties

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg       ! (deg) Right Ascension J2000
      real*8        DEdeg       ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     CLASXS      ! Source identification number (1)
      character*16  CXCCLASXS   ! Source name (2)
      integer*4     RAh         ! (h) Hour of right ascension (J2000)
      integer*4     RAm         ! (min) Minute of right ascension (J2000)
      real*4        RAs         ! (s) Second of right ascension (J2000)
      character*1   DE_         ! Sign of the declination (J2000)
      integer*4     DEd         ! (deg) Degree of declination (J2000)
      integer*4     DEm         ! (arcmin) Arcminute of declination (J2000)
      real*4        DEs         ! (arcsec) Arcsecond of declination (J2000)
      real*4        e_RAs       ! (arcsec) Statistical error in RAs
      real*4        e_DEs       ! (arcsec) Statistical error in DEs
      character*1   l_Soft      ! Limit flag on Soft
      real*4        Soft        ! (aW/m2) The 0.4-2.0keV band flux (3)
      real*4        E_Soft      ! (aW/m2) ? The upper 1{sigma} Poisson error on
*                                        Soft
      real*4        e_Soft_1    ! (aW/m2) ? The lower 1{sigma} Poisson error on
*                                        Soft
      character*1   l_Hard      ! Limit flag on Hard
      real*8        Hard        ! (aW/m2) The 2.0-8.0keV band flux (3)
      real*4        E_Hard      ! (aW/m2) ? The upper 1{sigma} Poisson error on
*                                        Hard
      real*4        e_Hard_1    ! (aW/m2) ? The lower 1{sigma} Poisson error on
*                                        Hard
      character*1   l_Full      ! Limit flag on Full
      real*4        Full        ! (aW/m2) The 0.4-8.0keV band flux (3)
      real*4        E_Full      ! (aW/m2) ? The upper 1{sigma} Poisson error on
*                                        Full
      real*4        e_Full_1    ! (aW/m2) ? The lower 1{sigma} Poisson error on
*                                        Full
      character*1   l_HR        ! Limit flag on HR
      real*8        HR          ! Hardness ratio (4)
*Note (1): The numbers correspond to ascending order of right ascension.
*Note (2): Source name follows the IAU convention and should read CXCCLASXS,
*          plus the name given in the table.
*Note (3): In units of 10^-15^ergs/cm^2^/s.  If a source is detected
*    in multiple observations, and if there is more than one observation in
*    which the source effective area is more than 80% of the effective area
*    at the aim point, then the mean flux is used; otherwise, the flux from
*    the observation that has the largest effective area is used. The
*    errors quoted are the 1{sigma} upper and lower Poisson errors, using
*    the approximations from Gehrels (1986ApJ...303..336G). For any source
*    detected in one band but with a very weak signal in another, the
*    background- subtracted flux could be negative. In this case, only the
*    upper Poisson error is quoted.
*Note (4): HR=C_Hard_/C_Soft_, where C_Hard_ and C_Soft_ are the count rates
*    in the hard and soft bands.

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

C  Declarations for 'table3.dat'	! Main Chandra Catalog: Additional Source
                                 Properties

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

      integer*4     CLASXS_1    ! Source identification number (1)
      character*1   l_Nsoft     ! Limit flag on Nsoft
      real*8        Nsoft       ! (ct) Net 0.4-2.0keV band counts (2)
      real*4        E_Nsoft     ! (ct) ? The upper 1{sigma} Poisson error on Nsoft
      real*4        e_Nsoft_1   ! (ct) ? The lower 1{sigma} Poisson error on Nsoft
      character*1   l_Nhard     ! Limit flag on Nhard
      real*8        Nhard       ! (ct) Net 2.0-8.0keV band counts (2)
      real*4        E_Nhard     ! (ct) ? The upper 1{sigma} Poisson error on Nhard
      real*8        e_Nhard_1   ! (ct) ? The lower 1{sigma} Poisson error on Nhard
      character*1   l_Nfull     ! Limit flag on Nfull
      real*4        Nfull       ! (ct) Net 0.4-8.0keV band counts (2)
      real*4        E_Nfull     ! (ct) ? The upper 1{sigma} Poisson error on Nfull
      real*4        e_Nfull_1   ! (ct) ? The lower 1{sigma} Poisson error on Nfull
      real*4        Tsoft       ! (s) Effective 0.4-2.0keV band exposure time
      real*4        Thard       ! (s) Effective 2.0-8.0keV band exposure time
      real*4        Tfull       ! (s) Effective 0.4-8.0keV band exposure time
      integer*4     FNum        ! LHNW field number where the source has the
*                                 largest effective area
      integer*4     Det         ! The LHNW field detection numbers (3)
*Note (1): The numbers correspond to ascending order of right ascension.
*Note (2): If a source is detected in multiple observations, then the
*    observation in which the source has the largest effective area is
*    used. As in Table 2, for the sources with negative counts, only the
*    upper limits are listed.
*Note (3): Each digit represents a field number of the Lockman Hole-NorthWest

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

C  Loading file 'table2.dat'	! Main Chandra Catalog: Basic Source Properties

C  Format for file interpretation

    1 format(
     +  I3,1X,A16,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F5.3,
     +  1X,F5.3,1X,A1,F6.3,1X,F5.3,1X,F4.2,1X,A1,F8.4,1X,F4.2,1X,F5.2,
     +  1X,A1,F6.2,1X,F5.2,1X,F5.2,1X,A1,1X,F7.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,525
        read(1,'(A127)')ar__
        read(ar__,1)
     +  CLASXS,CXCCLASXS,RAh,RAm,RAs,DE_,DEd,DEm,DEs,e_RAs,e_DEs,
     +  l_Soft,Soft,E_Soft,e_Soft_1,l_Hard,Hard,E_Hard,e_Hard_1,
     +  l_Full,Full,E_Full,e_Full_1,l_HR,HR
        if(ar__(66:70) .EQ. '') E_Soft = rNULL__
        if(ar__(72:75) .EQ. '') e_Soft_1 = rNULL__
        if(ar__(87:90) .EQ. '') E_Hard = rNULL__
        if(ar__(92:96) .EQ. '') e_Hard_1 = rNULL__
        if(ar__(106:110) .EQ. '') E_Full = rNULL__
        if(ar__(112:116) .EQ. '') e_Full_1 = rNULL__
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  CLASXS,CXCCLASXS,RAh,RAm,RAs,DE_,DEd,DEm,DEs,e_RAs,e_DEs,
     +  l_Soft,Soft,E_Soft,e_Soft_1,l_Hard,Hard,E_Hard,e_Hard_1,
     +  l_Full,Full,E_Full,e_Full_1,l_HR,HR
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Main Chandra Catalog: Additional Source
*                                 Properties

C  Format for file interpretation

    2 format(
     +  I3,1X,A1,F7.3,1X,F5.2,1X,F6.3,1X,A1,F8.4,1X,F5.2,1X,F7.4,1X,
     +  A1,F6.2,1X,F5.2,1X,F5.2,1X,E8.3,1X,E8.3,1X,E8.3,1X,I1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,525
        read(1,'(A104)')ar__1
        read(ar__1,2)
     +  CLASXS_1,l_Nsoft,Nsoft,E_Nsoft,e_Nsoft_1,l_Nhard,Nhard,
     +  E_Nhard,e_Nhard_1,l_Nfull,Nfull,E_Nfull,e_Nfull_1,Tsoft,Thard,
     +  Tfull,FNum,Det
        if(ar__1(14:18) .EQ. '') E_Nsoft = rNULL__
        if(ar__1(20:25) .EQ. '') e_Nsoft_1 = rNULL__
        if(ar__1(37:41) .EQ. '') E_Nhard = rNULL__
        if(ar__1(43:49) .EQ. '') e_Nhard_1 = rNULL__
        if(ar__1(59:63) .EQ. '') E_Nfull = rNULL__
        if(ar__1(65:69) .EQ. '') e_Nfull_1 = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  CLASXS_1,l_Nsoft,Nsoft,E_Nsoft,e_Nsoft_1,l_Nhard,Nhard,
     +  E_Nhard,e_Nhard_1,l_Nfull,Nfull,E_Nfull,e_Nfull_1,Tsoft,Thard,
     +  Tfull,FNum,Det
c    .......End.of.Just test output...........
      end do
      close(1)

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