FORTRAN Generation
(/./ftp/cats/J/A_A/472/705)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/472/705 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-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/A+A/472/705   BeppoSAX WFC X-ray source catalogue (SAXWFC) (Verrecchia+, 2007)
*================================================================================
*The BeppoSAX WFC X-ray source catalogue
*    Verrecchia F., in 't Zand J.J.M., Giommi P., Santolamazza P., Granata S.,
*    Schuurmans J.J., Antonelli A.
*   <Astron. Astrophys. 472, 705 (2007)>
*   =2007A&A...472..705V
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! Catalogue of X-ray sources detected by the
                              two Wide Field Cameras (WFCs)

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

      character*14  SAXWFC      ! WFC name (JHHMM.m+DDMM.m)
      character*1   n_SAXWFC    ! [hijk] Detection note (1)
      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
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
      real*4        e_Pos       ! (arcmin) Mean position error (2)
      real*4        ExpTime     ! (ks) Exposure time
      real*8        Flux        ! (10fW/m2) ? Unabsorbed 2-10keV flux in
*                                    units of 10^-11^erg/cm^2^/s (3)
      real*4        e_Flux      ! (10fW/m2) ?=- Error on the 2-10keV flux in
*                                      units of 10^-11^erg/cm^2^/s (3)
      real*4        SNR1        ! Signal-to-noise ratio in the 2-8keV band
      real*4        SNR2        ! Signal-to-noise ratio in the 8-19keV band
      integer*4     Ndet        ! Number of detections
      real*8        Texpo       ! (ks) ?=- Total exposure time
      real*8        Mflux       ! (10fW/m2) ? Mean unabsorbed 2-10keV flux in
*                                    units of 10^-11^erg/cm^2^/s (4)
      real*4        e_Mflux     ! (10fW/m2) ?=- Error on the mean 2-10keV flux in
*                                      units of 10^-11^erg/cm^2^/s (4)
      real*4        ChiFl       ! ?=- Reduced chi_flux^2^ (5)
      real*8        Maxfl       ! (10fW/m2) ?=- Maximum unabsorbed 2-10keV flux in
*                                      units of 10^-11^erg/cm^2^/s (6)
      real*8        Minfl       ! (10fW/m2) ?=- Minimum unabsorbed 2-10keV flux in
*                                      units of 10^-11^erg/cm^2^/s (6)
      character*21  Name        ! Source name
      character*22  Class       ! Source class (7)
*Note (1): Detection notes as follows:
*      h = detected with the highest snr in a softed band, 2-5.5 or 
*          2-3.2keV with respect to the catalogue reference 2-8keV band.
*      i = detected with the highest snr in a harder band, 8-19, 5.5-11, 6-13
*          or 11-19keV with respect to the catalogue reference 2-8keV band
*      j = detected with the highest snr in a larger band, 2-19 or 2-26keV
*          band, with respect to the catalogue reference 2-8keV band
*      k = source detected in the first processing stage only
*Note (2): The position error is the mean 99% X, Y error added in quadrature
*          to a systematic error of 1.3'.
*Note (3): 2-10keV flux and error in units of 10^-11^erg/s/cm^2^
*          (10^-14^W/m^2^).
*Note (4): The flux weighted mean among all the detections of a source
*          and its standard deviation in units of 10^-11erg/s/cm^2^
*          (10^-14^W/m^2^).
*Note (5): The 2-10keV flux reduced Chi^2^ among all source detections.
*Note (6): The maximum and minimum 2-10keV flux among all source detections.
*Note (7): Classification uses the following abbreviations:
*          AGN = active galactic nucleus
*       AM Her = AM Her type star
*          AXP = anomalous X-ray pulsar
*            B = burster
*           Be = B-emission star
*       BY Dra = BY Dra type star
*          ClG = cluster of galaxies
*           CV = cataclysmic variable
*            D = dipper
*           DN = dwarf nova
*            E = intermediate objects
*          GlC = in globular cluster
*           IP = intermediate polar
*        HMXRB = high-mass X-ray binary
*          LBV = luminous blue variable type star
*        LMXRB = low-mass X-ray binary
*            P = polar
*          QSO = quasar
*           RG = radio galaxy
*           RP = radio pulsar
*        RSCVn = RS CVn type star
*   Seyfert 1  = Seyfert galaxy type 1
*   Seyfert 2  = Seyfert galaxy type 2
*          SNR = Supernova remnant
*           Sy = Symbiotic star
*            T = transient source
*        U Gem = U Gem type star
*           WD = White dwarf
*           XB = X-ray binary
*           XP = X-ray pulsar

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

C  Loading file 'table3.dat'	! Catalogue of X-ray sources detected by the
*                              two Wide Field Cameras (WFCs)

C  Format for file interpretation

    1 format(
     +  7X,A14,1X,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,F4.1,1X,
     +  F3.1,1X,F5.1,1X,F8.2,F6.2,F5.1,1X,F5.1,1X,I3,1X,F7.1,1X,F7.1,
     +  1X,F6.1,1X,F6.1,1X,F7.1,1X,F7.1,1X,A21,1X,A22)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,253
        read(1,'(A177)')ar__
        read(ar__,1)
     +  SAXWFC,n_SAXWFC,RAh,RAm,RAs,DE_,DEd,DEm,DEs,e_Pos,ExpTime,
     +  Flux,e_Flux,SNR1,SNR2,Ndet,Texpo,Mflux,e_Mflux,ChiFl,Maxfl,
     +  Minfl,Name,Class
        if(ar__(58:65) .EQ. '') Flux = rNULL__
        if (idig(ar__(66:71)).EQ.0) e_Flux =  rNULL__
        if (idig(ar__(88:94)).EQ.0) Texpo =  rNULL__
        if(ar__(96:102) .EQ. '') Mflux = rNULL__
        if (idig(ar__(104:109)).EQ.0) e_Mflux =  rNULL__
        if (idig(ar__(111:116)).EQ.0) ChiFl =  rNULL__
        if (idig(ar__(118:124)).EQ.0) Maxfl =  rNULL__
        if (idig(ar__(126:132)).EQ.0) Minfl =  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)
     +  SAXWFC,n_SAXWFC,RAh,RAm,RAs,DE_,DEd,DEm,DEs,e_Pos,ExpTime,
     +  Flux,e_Flux,SNR1,SNR2,Ndet,Texpo,Mflux,e_Mflux,ChiFl,Maxfl,
     +  Minfl,Name,Class
        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