FORTRAN Generation
(/./ftp/cats/J/ApJ/586/814)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/586/814 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-Mar-28
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/ApJ/586/814       NGC 4472 Chandra/HST study               (Maccarone+, 2003)
*================================================================================
*The low-mass X-ray binary-globular connection.
*II. NGC 4472 X-ray source properties and source catalogs.
*    Maccarone T.J., Kundu A., Zepf S.E.
*   <Astrophys. J. 586, 814 (2003)>
*   =2003ApJ...586..814M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! The X-ray Source List

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

      integer*4     XID         ! X-ray catalog Number, [MKZ2003] XID NNN
      character*15  CXOMKZ      ! CXOMKZ Source Name (JHHMMSSs+DDMMSS)
      real*4        Gamma       ! Spectral index in photon space
      real*4        EGamma      ! ? 90% error in the positive direction (G1)
      real*4        eGamma_1    ! ? 90% error in the negative direction (G1)
      real*4        SFlux       ! (mW/m2) The (0.5-2.0keV) X-ray model flux (G2)
      real*4        HFlux       ! (mW/m2) The (2.0-8.0keV) X-ray model flux (G2)
      real*4        XLum        ! (10-7W) The (0.5-8.0keV) X-ray luminosity (G2)
      real*4        Chi2        ! The chi^2^ of the model fit
      integer*4     DOF         ! Degrees of freedom
      character*1   GR          ! [YN] Good region flag (3)
      character*1   HST         ! HST region flag (4)
      integer*4     OID         ! ? The optical catalog number,
*                                    [MKZ2003] OID NNNN (5)
*Note (3): Y indicates the source is outside the central 10" region
*    associated with nuclear emission.
*Note (4): Y indicates the source is in one or more of the HST
*    observation regions.
*Note (5): Refers to the catalog number in table 3.
*    A blank indicates the source has no counterpart in the HST data set.

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

C  Declarations for 'table2.dat'	! The Optical Source List

      integer*4 nr__1
      parameter (nr__1=1102)	! Number of records
      character*75 ar__1  	! 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     OID_1       ! Optical catalog number, [MKZ2003] OID NNNN
      integer*4     RAh         ! (h) Right Ascension (J2000)
      integer*4     RAm         ! (min) Right Ascension (J2000)
      real*4        RAs         ! (s) Right Ascension (J2000)
      character*1   DE_         ! Declination (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
      real*4        Vmag        ! (mag) The V band magnitude
      real*4        e_Vmag      ! (mag) Error in Vmag
      real*4        Imag        ! (mag) The I band magnitude
      real*4        e_Imag      ! (mag) Error in Imag
      real*4        V_I         ! (mag) The V-I color
      real*4        e_V_I       ! (mag) Error in V-I
      real*4        HLRad       ! (arcsec) Half-light radius
      real*4        e_HLRad     ! (arcsec) Error in HLRad
      character*1   CX          ! [YN] Chandra FOV flag (1)
      character*1   GC          ! [YN] Globular cluster color flag (2)
      integer*4     XID_1       ! ? X-ray counterpart ID number,
*                                    [MKZ2003] XID NNN (3)
*Note (1): Y indicates the source is in the Chandra field of view
*Note (2): Y indicates the source has colors consistent with globular
*     clusters (0.8<V-I<1.2)
*Note (3): Refers to the catalog number in table 1. A blank indicates
*     the source has no counterpart in the Chandra data set.

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

C  Declarations for 'table3.dat'	! X-Ray/HST Matches

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

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

      integer*4     XID_2       ! X-ray catalog number, [MKZ2003] XID NNN
      character*15  CXOMKZ_1    ! CXOMKZ source name (JHHMMSSs+DDMMSS)
      real*4        Gamma_1     ! Best-fitting power-law spectral index
      real*4        EGamma_2    ! ? 90% error in the positive direction (G1)
      real*4        eGamma_3    ! ? 90% error in the positive direction (G1)
      character*1   n_Gamma     ! [fb] Note on Gamma (1)
      real*4        SFlux_1     ! (mJy) (0.5-2.0keV) X-ray model flux (G2)
      real*4        HFlux_1     ! (mJy) (2.0-8.0keV) X-ray model flux (G2)
      real*4        XLum_1      ! (10-7W) (0.5-8.0keV) X-ray luminosity (G2)
      real*4        Chi2_1      ! chi2 value of the spectral fit
      integer*4     DOF_1       ! Degree of freedom of the spectral fit
      integer*4     OID_2       ! Optical catalog number, [MKZ2003] OID NNNN
      integer*4     RAh_1       ! (h) Right ascension (J2000)
      integer*4     RAm_1       ! (min) Right ascension (J2000)
      real*4        RAs_1       ! (s) Right ascension (J2000)
      character*1   DE__1       ! Declination sign (J2000)
      integer*4     DEd_1       ! (deg) Declination (J2000)
      integer*4     DEm_1       ! (arcmin) Declination (J2000)
      real*4        DEs_1       ! (arcsec) Declination (J2000)
      real*4        Vmag_1      ! (mag) V magnitude
      real*4        e_Vmag_1    ! (mag) rms uncertainty on Vmag
      real*4        Imag_1      ! (mag) I magnitude
      real*4        e_Imag_1    ! (mag) rms uncertainty on Imag
      real*4        V_I_1       ! (mag) V-I colour index
      real*4        e_V_I_1     ! (mag) rms uncertainty on V-I
      real*4        HLRad_1     ! Half-light radius of the optical counterpart
      real*4        e_HLRad_1   ! rms uncertainty on HLRad
*Note (1): Note on Gamma:
*     f: fixed, b: bad fit

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

C  Loading file 'table1.dat'	! The X-ray Source List

C  Format for file interpretation

    1 format(
     +  I3,8X,A15,1X,F4.2,1X,F5.2,1X,F5.2,1X,E8.2,1X,E8.2,1X,E8.2,1X,
     +  F5.1,1X,I2,1X,A1,1X,A1,1X,I4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,147
        read(1,'(A88)')ar__
        read(ar__,1)
     +  XID,CXOMKZ,Gamma,EGamma,eGamma_1,SFlux,HFlux,XLum,Chi2,DOF,GR,
     +  HST,OID
        if(ar__(33:37) .EQ. '') EGamma = rNULL__
        if(ar__(39:43) .EQ. '') eGamma_1 = rNULL__
        if(ar__(85:88) .EQ. '') OID = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  XID,CXOMKZ,Gamma,EGamma,eGamma_1,SFlux,HFlux,XLum,Chi2,DOF,GR,
     +  HST,OID
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! The Optical Source List

C  Format for file interpretation

    2 format(
     +  I4,1X,I2,1X,I2,1X,F4.1,1X,A1,I1,1X,I2,1X,F4.1,1X,F5.2,1X,F4.2,
     +  1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.1,1X,F3.1,1X,A1,1X,A1,
     +  1X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,1102
        read(1,'(A75)')ar__1
        read(ar__1,2)
     +  OID_1,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Vmag,e_Vmag,Imag,e_Imag,V_I,
     +  e_V_I,HLRad,e_HLRad,CX,GC,XID_1
        if(ar__1(73:75) .EQ. '') XID_1 = iNULL__
        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,2)
     +  OID_1,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Vmag,e_Vmag,Imag,e_Imag,V_I,
     +  e_V_I,HLRad,e_HLRad,CX,GC,XID_1
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! X-Ray/HST Matches

C  Format for file interpretation

    3 format(
     +  I3,8X,A15,1X,F4.2,1X,F4.2,1X,F4.2,A1,1X,E8.2,1X,E8.2,1X,E8.2,
     +  1X,F4.1,1X,I2,1X,I4,1X,I2,1X,I2,1X,F4.1,1X,A1,I1,1X,I2,1X,
     +  F4.1,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,
     +  F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,30
        read(1,'(A144)')ar__2
        read(ar__2,3)
     +  XID_2,CXOMKZ_1,Gamma_1,EGamma_2,eGamma_3,n_Gamma,SFlux_1,
     +  HFlux_1,XLum_1,Chi2_1,DOF_1,OID_2,RAh_1,RAm_1,RAs_1,DE__1,
     +  DEd_1,DEm_1,DEs_1,Vmag_1,e_Vmag_1,Imag_1,e_Imag_1,V_I_1,
     +  e_V_I_1,HLRad_1,e_HLRad_1
        if(ar__2(33:36) .EQ. '') EGamma_2 = rNULL__
        if(ar__2(38:41) .EQ. '') eGamma_3 = rNULL__
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,3)
     +  XID_2,CXOMKZ_1,Gamma_1,EGamma_2,eGamma_3,n_Gamma,SFlux_1,
     +  HFlux_1,XLum_1,Chi2_1,DOF_1,OID_2,RAh_1,RAm_1,RAs_1,DE__1,
     +  DEd_1,DEm_1,DEs_1,Vmag_1,e_Vmag_1,Imag_1,e_Imag_1,V_I_1,
     +  e_V_I_1,HLRad_1,e_HLRad_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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