FORTRAN Generation
(/./ftp/cats/J/ApJ/577/738)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/577/738 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 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/577/738       M31 Chandra X-ray point sources          (Kong+, 2002)
*================================================================================
*X-ray point sources in the central region of M31 as seen by Chandra.
*    Kong A.K.H., Garcia M.R., Primini F.A., Murray S.S., di Stefano R.,
*    McClintock J.E.
*   <Astrophys. J. 577, 738 (2002)>
*   =2002ApJ...577..738K
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! CHANDRA ACIS catalog of the central region of M31

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

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

      character*6   v_KGP2002_ (nr__) ! Object identification
      character*16  CXOM31     (nr__) ! Chandra name (JHHMMSS.s+DDMMSS)
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs        (nr__) ! (s) Second of Right Ascension (J2000)
      character*1   DE_        (nr__) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        PosErr     (nr__) ! (arcsec) Positional error
      integer*4     NCts       (nr__) ! (ct) The net counts
      real*4        CRate      (nr__) ! (10-2ct/s) The count rate in units of 10^-2^ct/s
      real*4        e_CRate    (nr__) ! (10-2ct/s) Error in CRate
      real*4        HR1        (nr__) ! The first hardness ratio (1)
      real*4        e_HR1      (nr__) ! The error in HR1
      real*4        HR2        (nr__) ! The second hardness ratio (2)
      real*4        e_HR2      (nr__) ! The error in HR2
      real*4        LXray      (nr__) ! (10+30W) The 0.3-7keV luminosity in
*                                     units of 10^37^erg/s (3)
      character*8   Notes      (nr__) ! Additional notes (4)
*Note (1): HR1 = (M-S)/(M+S) where S is the 0.3-1.0keV energy band and
*           M is the 1-2keV energy band.
*Note (2): HR2 = (H-S)/(H+S) where S is the 0.3-1.0keV energy band and
*           H is the 2-7keV energy band.
*Note (3): Assuming an absorbed power-law model with a photon index of 1.7
*           and N_H_=10^21^cm^-2^.
*Note (4): Additional notes:
*    e = Extragalactic objects
*    f = Foreground stars
*    g = Globular Cluster
*    p = Planetary nebula
*    r = ROSAT HRI sources
*    s = Supernova remnant
*    v = Variables
*   sv = Spectral variables
*    t = Transients

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

C  Declarations for 'table4.dat'	! Optical IDs

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

      character*6   v_KGP2002__1(nr__1) ! Object identification
      character*16  CXOM31_1   (nr__1) ! Chandra Name (JHHMMSS.s+DDMMSS)
      character*4   MType      (nr__1) ! Morphological type
      character*12  Ident      (nr__1) ! Identification (1)
      real*4        Off        (nr__1) ! (arcsec) Radial offset between the catalogued object
*                                   and the ACIS source
      character*7   Ident2     (nr__1) ! Second identification (1)
      real*4        Off2       (nr__1) ! (arcsec) ? Radial offset between the catalogued object
*                                     and the ACIS source
*Note (1): Identifications as follows:
*    mita = Magnier, 1993, Ph.D. thesis, MIT
*    Bo   = Battistini et al., 1987A&AS...67..447B
*    Ha94 = Haiman et al., 1994, Cat. <II/208>
*    Ford = Ford & Jacoby, 1978ApJ...219..437F,
*            Ciardullo et al., 1989ApJ...339...53
*    PB   = Barmby, 2001, Ph.D. thesis, Harvard Univ.
*    DO80 = d'Odorico et al., 1980A&AS...40...67D
*    MLA  = SIMBAD.

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

C  Declarations for 'table5.dat'	! Cross-Correlation of Chandra and ROSAT Sources

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

      character*6   v_KGP2002__2(nr__2) ! Object Identification
      character*16  CXOM31_2   (nr__2) ! Chandra name (JHHMMSS.s+DDMMSS)
      integer*4     v_PFJ93_   (nr__2) ! ? ROSAT HRI Identification (Primini et al.,
*                                    1993ApJ...410..615P
      real*4        Off_1      (nr__2) ! (arcsec) Radial offset between the HRI and ACIS objects

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

C  Loading file 'table2.dat'	! CHANDRA ACIS catalog of the central region of M31

C  Format for file interpretation

    1 format(
     +  A6,7X,A16,1X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F5.2,1X,F4.2,
     +  1X,I4,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,
     +  1X,A8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,204
        read(1,'(A114)')ar__
        read(ar__,1)
     +  v_KGP2002_(i__),CXOM31(i__),RAh(i__),RAm(i__),RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),PosErr(i__),NCts(i__),
     +  CRate(i__),e_CRate(i__),HR1(i__),e_HR1(i__),HR2(i__),
     +  e_HR2(i__),LXray(i__),Notes(i__)
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  v_KGP2002_(i__),CXOM31(i__),RAh(i__),RAm(i__),RAs(i__),
     +  DE_(i__),DEd(i__),DEm(i__),DEs(i__),PosErr(i__),NCts(i__),
     +  CRate(i__),e_CRate(i__),HR1(i__),e_HR1(i__),HR2(i__),
     +  e_HR2(i__),LXray(i__),Notes(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Optical IDs

C  Format for file interpretation

    2 format(A6,2X,A16,1X,A4,1X,A12,1X,F3.1,1X,A7,1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,39
        read(1,'(A58)')ar__1
        read(ar__1,2)
     +  v_KGP2002__1(i__),CXOM31_1(i__),MType(i__),Ident(i__),
     +  Off(i__),Ident2(i__),Off2(i__)
        if(ar__1(56:58) .EQ. '') Off2(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  v_KGP2002__1(i__),CXOM31_1(i__),MType(i__),Ident(i__),
     +  Off(i__),Ident2(i__),Off2(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Cross-Correlation of Chandra and ROSAT Sources

C  Format for file interpretation

    3 format(A6,2X,A16,1X,I2,1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,77
        read(1,'(A31)')ar__2
        read(ar__2,3)
     +  v_KGP2002__2(i__),CXOM31_2(i__),v_PFJ93_(i__),Off_1(i__)
        if(ar__2(26:27) .EQ. '') v_PFJ93_(i__) = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  v_KGP2002__2(i__),CXOM31_2(i__),v_PFJ93_(i__),Off_1(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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