FORTRAN Generation
(/./ftp/cats/J/MNRAS/388/849)

Conversion of standardized ReadMe file for file /./ftp/cats/J/MNRAS/388/849 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-Apr-19
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/MNRAS/388/849     NGC253 XMM observations                  (Barnard+, 2008)
*================================================================================
*A multi-coloured survey of NGC253 with XMM-Newton: testing the methods used for
*creating luminosity functions from low-count data.
*    Barnard R., Greening L.S., Kolb U.
*   <Mon. Not. R. Astron. Soc., 388, 849-862 (2008)>
*   =2008MNRAS.388..849B
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'tablea1.dat'	! Positions of X-ray sources in the XMM-Newton
                              observations of NGC 253, along with some
                              observed properties

      integer*4 nr__
      parameter (nr__=185)	! Number of records
      character*44 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)

      integer*4     v_BGK2008_ (nr__) ! Source sequential number (G1)
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000)
      character*1   DE_        (nr__) ! Declination sign (J2000)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Declination (J2000)
      character*1   inD25      (nr__) ! [yn] indicates whether the source is within
*                                       the D25 isophotal region of NGC 253
      integer*4     Rs         (nr__) ! (arcsec) Source extraction radius
      real*4        Ab_As      (nr__) ! Background-to-source area ratio
      real*4        EEF        (nr__) ! Encircled energy fraction (1)
*Note (1): Sources with an EEF of zero were detected, but no suitable
*     spectra were obtained.

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

C  Declarations for 'tablea2.dat'	! Spectral properties for each source from
                              Observation 2

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

      integer*4     v_BGK2008__1(nr__1) ! Source sequential number (G1)
      integer*4     CtPN       (nr__1) ! (ct) pn source counts
      integer*4     CtMOS      (nr__1) ! (ct) MOS source counts
      character*10  Mod        (nr__1) ! Best fitting model (1)
      real*4        NH         (nr__1) ! (10+22cm-2) ? Absorption
      real*4        e_NH       (nr__1) ! (10+22cm-2) ? rms uncertainty on NH at
*                                       90% confidence level
      character*1   f_NH       (nr__1) ! [f] f for fixed absorption
      real*4        Param      (nr__1) ! ? Parameter (spectral index or
*                                       temperature) (2)
      real*4        e_Param    (nr__1) ! ? rms uncertainty on Param at
*                                       90% confidence level
      real*4        Param2     (nr__1) ! ? Second parameter value (spectral index or
*                                       temperature) (2)
      real*4        e_Param2   (nr__1) ! ? rms uncertainty on Param2 at
*                                       90% confidence level
      real*4        chi2       (nr__1) ! ? chi^2^ value
      integer*4     DOF        (nr__1) ! ? Degree Of Freedom (3)
      real*4        gf         (nr__1) ! ? Good fit probability
      real*8        LBF        (nr__1) ! (10+29W) ? Best-fitting luminosity
      real*8        e_LBF      (nr__1) ! (10+29W) ? rms uncertainty on LBF at
*                                       90% confidence level
      real*8        LSM        (nr__1) ! (10+29W) ?=0.  Standard model (Method I) luminosity
*Note (1): Best-fitting models for bright sources can be as follows:
*     PO = a power law
*     BB = blackbody
*     BR = bremsstrahlung
*     2C = a two-component model consisting of a BB plus power law
*          Faint sources are modelled using a best-fitting power law:
* -----------------------------------------------------------------------------
* Model NFnt  NH/10^20^  Gamma    chi2/dof [gf]   Flux(pn thin) Flux (MOS med)
* -----------------------------------------------------------------------------
*  IS      7   1.3      0.4 (.03)   71/54  [0.06]  12000(200)    36000(8000)
*  OS     36   1.3      1.23(.13)   55/44  [0.12]   4800(400)    19000(2000)
* -----------------------------------------------------------------------------
*Note (2): Parameter (spectral index or temperature), spectral index for
*     PO models, temperature for BB and BR models, spectral index and
*     temperature for 2C models.
*Note (3): The quality of the spectrum may be deduced from the number of
*     degrees of freedom because the spectra are grouped to a minimum number
*     of counts per bin (brighter sources have more degrees of freedom).

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

C  Loading file 'tablea1.dat'	! Positions of X-ray sources in the XMM-Newton
*                              observations of NGC 253, along with some
*                              observed properties

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea1.dat')
      write(6,*) '....Loading file: tablea1.dat'
      do i__=1,185
        read(1,'(A44)')ar__
        read(ar__,1)
     +  v_BGK2008_(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),inD25(i__),Rs(i__),Ab_As(i__),EEF(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_BGK2008_(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),inD25(i__),Rs(i__),Ab_As(i__),EEF(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 'tablea2.dat'	! Spectral properties for each source from
*                              Observation 2

C  Format for file interpretation

    2 format(
     +  I3,1X,I5,1X,I5,1X,A10,F5.3,F5.3,A1,2X,F5.3,1X,F5.3,1X,F4.2,
     +  F4.2,2X,F5.1,1X,I3,1X,F5.3,1X,F9.2,1X,F9.2,2X,F7.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'tablea2.dat')
      write(6,*) '....Loading file: tablea2.dat'
      do i__=1,185
        read(1,'(A105)')ar__1
        read(ar__1,2)
     +  v_BGK2008__1(i__),CtPN(i__),CtMOS(i__),Mod(i__),NH(i__),
     +  e_NH(i__),f_NH(i__),Param(i__),e_Param(i__),Param2(i__),
     +  e_Param2(i__),chi2(i__),DOF(i__),gf(i__),LBF(i__),e_LBF(i__),
     +  LSM(i__)
        if(ar__1(27:31) .EQ. '') NH(i__) = rNULL__
        if(ar__1(32:36) .EQ. '') e_NH(i__) = rNULL__
        if(ar__1(40:44) .EQ. '') Param(i__) = rNULL__
        if(ar__1(46:50) .EQ. '') e_Param(i__) = rNULL__
        if(ar__1(52:55) .EQ. '') Param2(i__) = rNULL__
        if(ar__1(56:59) .EQ. '') e_Param2(i__) = rNULL__
        if(ar__1(62:66) .EQ. '') chi2(i__) = rNULL__
        if(ar__1(68:70) .EQ. '') DOF(i__) = iNULL__
        if(ar__1(72:76) .EQ. '') gf(i__) = rNULL__
        if(ar__1(78:86) .EQ. '') LBF(i__) = rNULL__
        if(ar__1(88:96) .EQ. '') e_LBF(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  v_BGK2008__1(i__),CtPN(i__),CtMOS(i__),Mod(i__),NH(i__),
     +  e_NH(i__),f_NH(i__),Param(i__),e_Param(i__),Param2(i__),
     +  e_Param2(i__),chi2(i__),DOF(i__),gf(i__),LBF(i__),e_LBF(i__),
     +  LSM(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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