FORTRAN Generation
(/./ftp/cats/J/ApJ/561/189)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/561/189 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-05
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/561/189            Chandra X-ray sources in M101            (Pence+, 2001)
*================================================================================
*Chandra X-ray sources in M101.
*    Pence W.D., Snowden S.L., Mukai K., Kuntz K.D.
*   <Astrophys. J. 561, 189 (2001)>
*   =2001ApJ...561..189P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! S3 Chip X-ray Sources in M101

      integer*4 nr__
      parameter (nr__=110)	! Number of records
      character*79 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_PSM2001_  ! Source 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)
      real*4        DEs         ! (arcsec) Declination (J2000)
      integer*4     Area        ! (pix) Area of source region in units of the 0.49"
*                                   CHANDRA CCD pixels
      integer*4     S1          ! (ct) First soft X-ray energy band net counts (1)
      integer*4     M1          ! (ct) First medium X-ray energy band net counts (1)
      integer*4     H1          ! (ct) First hard X-ray energy band net counts (1)
      integer*4     S2          ! (ct) Second soft X-ray energy band net counts (1)
      integer*4     M2          ! (ct) Second medium X-ray energy band net counts (1)
      integer*4     H2          ! (ct) Second hard X-ray energy band net counts (1)
      real*4        logFS2      ! ([mW/m2]) ? Log of the S2 X-ray flux (in erg/cm^2^/s)
      real*4        logFM2      ! ([mW/m2]) ? Log of the M2 X-ray flux (in erg/cm^2^/s)
      real*4        logFH2      ! ([mW/m2]) ? Log of the H2 X-ray flux (in erg/cm^2^/s)
*Note (1): The energy ranges for the first set of bands (S1, M1, and H1)
*     were selected to produce roughly equal count rates in each band for
*     the typical sample of sources seen in M101. For the second set of
*     bands (S2, M2, and H2) a more standard set of astrophysically relevant
*     energy ranges were used to facilitate the comparison of our results
*     with those from previous X-ray missions. The energy bands are:
*          S1=0.125-0.8keV; M1=0.8-1.3keV; H1=1.3-8.0keV;
*          S2=0.125-0.5keV; M2=0.5-2.0keV; H2=2.0-8.0keV.

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

C  Declarations for 'table2.dat'	! Cross-Identifications

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

      integer*4     v_PSM2001__1 ! Source number
      character*3   v_WIP99_    ! ROSAT source identification from Wang et al.,
*                                   1999ApJ...523..121W, [WIP99] NN in Simbad
      character*5   n__WIP99_   ! Note on  the nature of the source
      character*4   v_MF97_     ! SNR identification from Matonick & Fesen,
*                                   1997ApJS..112...49M, [MF97] M101 NN in Simbad
      character*20  Other       ! Other identifications

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

C  Declarations for 'table4.dat'	! XSPEC Model Fits to the 29 Brightest Sources

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

      integer*4     v_PSM2001__2 ! Source number
      real*4        alpha       ! ? Simple absorbed power-law spectrum model
*                                      parameter (1)
      real*4        BB          ! (kT) ? Absorbed blackbody model parameter (1)
      real*4        NH          ! (10+21cm-2) Hydrogen column density
      real*4        Chi2V       ! Reduced chi^2^ value
      real*4        logFXS2     ! ([mW/m2]) X-ray flux over the energy range of the
*                                     S2 (0.12-50.5keV) energy band (2)
      real*4        logFXM2     ! ([mW/m2]) X-ray flux over the energy range of the
*                                     M2 (0.5-2.0keV) energy band (2)
      real*4        logFXH2     ! ([mW/m2]) X-ray flux over the energy range of the
*                                     H2 (2.0-8.0keV) energy band (2)
      real*4        logLXS2     ! ([10-7W]) X-ray luminosity in S2 energy band
*                                     (0.12-50.5keV) (3)
      real*4        logLXM2     ! ([10-7W]) X-ray luminosity in M2 energy band
*                                     (0.5-2.0keV) (3)
      real*4        logLXH2     ! ([10-7W]) X-ray luminosity in H2 energy band
*                                     (2.0-8.0keV) (3)
*Note (1): Most of the sources could be satisfactorily fitted with a simple
*          absorbed power-law spectrum model; however, eight of the softest
*          sources were better fitted by an absorbed blackbody model.
*Note (2): Apparent X-ray fluxes calculated by integrating the model spectrum
*          over the energy range of the S2, M2 and H2 energy bands.
*Note (3): Intrinsic X-ray luminosity of the source in each of the three bands,
*          correcting for the model NH absorption and assuming a distance
*          of 7.2Mpc to M101.

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

C  Loading file 'table1.dat'	! S3 Chip X-ray Sources in M101

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,110
        read(1,'(A79)')ar__
        read(ar__,1)
     +  v_PSM2001_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Area,S1,M1,H1,S2,M2,H2,
     +  logFS2,logFM2,logFH2
        if(ar__(60:65) .EQ. '') logFS2 = rNULL__
        if(ar__(67:72) .EQ. '') logFM2 = rNULL__
        if(ar__(74:79) .EQ. '') logFH2 = 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_PSM2001_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Area,S1,M1,H1,S2,M2,H2,
     +  logFS2,logFM2,logFH2
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Cross-Identifications

C  Format for file interpretation

    2 format(I3,2X,A3,1X,A5,1X,A4,2X,A20)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,27
        read(1,'(A41)')ar__1
        read(ar__1,2)v_PSM2001__1,v_WIP99_,n__WIP99_,v_MF97_,Other
c    ..............Just test output...........
        write(6,2)v_PSM2001__1,v_WIP99_,n__WIP99_,v_MF97_,Other
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! XSPEC Model Fits to the 29 Brightest Sources

C  Format for file interpretation

    3 format(
     +  I3,1X,F4.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,
     +  F5.2,1X,F5.2,1X,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,29
        read(1,'(A63)')ar__2
        read(ar__2,3)
     +  v_PSM2001__2,alpha,BB,NH,Chi2V,logFXS2,logFXM2,logFXH2,
     +  logLXS2,logLXM2,logLXH2
        if(ar__2(5:8) .EQ. '') alpha = rNULL__
        if(ar__2(10:13) .EQ. '') BB = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  v_PSM2001__2,alpha,BB,NH,Chi2V,logFXS2,logFXM2,logFXH2,
     +  logLXS2,logLXM2,logLXH2
c    .......End.of.Just test output...........
      end do
      close(1)

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