FORTRAN Generation
(/./ftp/cats/J/ApJ/645/256)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/645/256 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-Oct-08
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/645/256       XMM observations of Fornax A (NGC 1316)  (Isobe+, 2006)
*================================================================================
*The XMM-Newton examination of energetics in the east lobe of the nearby radio
*galaxy Fornax A (NGC 1316).
*    Isobe N., Makishima K., Tashiro M., Itoh K., Iyomoto N., Takahashi I.,
*    Kaneda H.
*   <Astrophys. J., 645, 256-263 (2006)>
*   =2006ApJ...645..256I
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! List of Sources Detected within the MOS FOV

      integer*4 nr__
      parameter (nr__=59)	! Number of records
      character*128 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     v_IMT2006_  ! Source sequential number
      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 sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      integer*4     DEs         ! (arcsec) Declination (J2000)
      real*4        ePos        ! (arcsec) Positional error
      real*4        CR1s        ! (10-3ct/s) ?=- Detected sources count rate in the soft
*                                        (0.3-1.5keV) band with MOS1 (1)
      real*4        e_CR1s      ! (10-3ct/s) ?=- rms uncertainty on CR1s
      real*4        CR1h        ! (10-3ct/s) ?=- Detected sources count rate in the hard
*                                        (1.5-10keV) band with MOS1 (1)
      real*4        e_CR1h      ! (10-3ct/s) ?=- rms uncertainty on CR1h
      real*4        HR1         ! ?=- Harness ratio with MOS1 (2)
      real*4        e_HR1       ! ?=- rms uncertainty on HR1
      real*4        CR2s        ! (10-3ct/s) ?=- Detected sources count rate in the soft
*                                        (0.3-1.5keV) band with MOS2 (1)
      real*4        e_CR2s      ! (10-3ct/s) ?=- rms uncertainty on CR2s
      real*4        CR2h        ! (10-3ct/s) ?=- Detected sources count rate in the hard
*                                        (1.5-10keV) band with MOS2 (1)
      real*4        e_CR2h      ! (10-3ct/s) ?=- rms uncertainty on CR2h
      real*4        HR2         ! ?=- Harness ratio with MOS2 (2)
      real*4        e_HR2       ! ?=- rms uncertainty on HR2
      character*23  Nsrc        ! Nearby Source (3)
      character*15  Nsrc2       ! Second Nearby Source (3)
*Note (1): Detected sources count rate in the soft (0.3-1.5keV) and hard
*     (1.5-10keV) bands. Assuming a PL spectrum of a photon index of 2
*     modified with the Galactic absorption, a count rate of 10^-2^ct/s in
*     the soft and the hard band corresponds to a flux of 8.62x10^-14^ and
*     2.36x10^-13^erg/cm^2^/s, respectively.
*Note (2): Hardness ratio, defined as HR=(H-S)/(H+S). A PL spectrum of a
*     photon index of 1.5, 2.0, and 2.5 corresponds to HR=-0.06, -0.34, and
*     -0.56, respectively.
*Note (3): Nearby sources found in the NASA/IPAC Extragalactic Database
*     (NED) within 15" (which corresponds to the half-power diameter of MOS)
*     from the detected source. (HB89 0321-374 = [HB93] 0321-374 in Simbad)

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

C  Loading file 'table2.dat'	! List of Sources Detected within the MOS FOV

C  Format for file interpretation

    1 format(
     +  I2,1X,I2,I2,F4.1,A1,I2,I2,I2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,
     +  1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,
     +  F5.2,1X,F4.2,1X,A23,A15)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,59
        read(1,'(A128)')ar__
        read(ar__,1)
     +  v_IMT2006_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,ePos,CR1s,e_CR1s,CR1h,
     +  e_CR1h,HR1,e_HR1,CR2s,e_CR2s,CR2h,e_CR2h,HR2,e_HR2,Nsrc,Nsrc2
        if (idig(ar__(25:29)).EQ.0) CR1s =  rNULL__
        if (idig(ar__(31:34)).EQ.0) e_CR1s =  rNULL__
        if (idig(ar__(36:40)).EQ.0) CR1h =  rNULL__
        if (idig(ar__(42:45)).EQ.0) e_CR1h =  rNULL__
        if (idig(ar__(47:51)).EQ.0) HR1 =  rNULL__
        if (idig(ar__(53:56)).EQ.0) e_HR1 =  rNULL__
        if (idig(ar__(58:62)).EQ.0) CR2s =  rNULL__
        if (idig(ar__(64:67)).EQ.0) e_CR2s =  rNULL__
        if (idig(ar__(69:73)).EQ.0) CR2h =  rNULL__
        if (idig(ar__(75:78)).EQ.0) e_CR2h =  rNULL__
        if (idig(ar__(80:84)).EQ.0) HR2 =  rNULL__
        if (idig(ar__(86:89)).EQ.0) e_HR2 =  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)
     +  v_IMT2006_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,ePos,CR1s,e_CR1s,CR1h,
     +  e_CR1h,HR1,e_HR1,CR2s,e_CR2s,CR2h,e_CR2h,HR2,e_HR2,Nsrc,Nsrc2
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
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