FORTRAN Generation
(/./ftp/cats/VII/206)

Conversion of standardized ReadMe file for file /./ftp/cats/VII/206 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 2017-Nov-20
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. VII/206             General Photometry of Galaxies        (Prugniel+ 1998)
*================================================================================
*Total magnitude, radius, color indices, color gradients and
*photometric type of galaxies
*       Prugniel P., Heraudeau P.
*      <Astron. Astrophys. Suppl. Ser. 128, 299 (1998)>
*      =1998A&AS..128..299P
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Catalogue of aperture photometry

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

      character*12  Name        ! *Galaxy identifier
      character*1   Type        ! *[GN*M] Object type
      integer*4     StarN       ! [1/5]? Number of the star if Type=*
      character*1   f_Imag      ! *[CLNU] Identification flag
      integer*4     f_Rmag      ! *[0/1] Rejection flag
      character*1   Method      ! *[DSPI] Measurement method
      real*4        logA        ! ([0.1arcmin]) *? Size of the circular aperture
      character*6   Dataset     ! Dataset name detailed in table2.dat
      real*4        Vmag        ! (mag) ? Aperture magnitude in V (Johnson)
      character*1   u_Vmag      ! *Uncertainty on Vmag (: = uncertain)
      character*1   n_Vmag      ! *[BU] V color
      real*4        B_V         ! (mag) ? B-V (Johnson)
      character*1   u_B_V       ! Uncertainty on B-V (: = uncertain)
      character*1   n_B_V       ! *[U ] B-V color
      real*4        U_B         ! (mag) ? U-B (Johnson)
      character*1   u_U_B       ! Uncertainty on U-B (: = uncertain)
      real*4        Rmag        ! (mag) ? R magnitude in the Rsyst system
      character*1   u_Rmag      ! Uncertainty on Rmag (: = uncertain)
      character*1   n_Rmag      ! *[CGJV ] Magnitude system
      real*4        Imag        ! (mag) ? I magnitude in the I_syst system
      character*1   u_Imag      ! Uncertainty on Imag (: = uncertain)
      character*1   n_Imag      ! *[CJ ] Magnitude system
*Note on Name:
*   The Name has been adopted by descending the hierarchy:
*   1) NGC (Cat. <VII/118>)
*   2) IC  (Cat. <VII/118>)
*   3) UGC (Cat. <VII/26>) or ESO (Cat. <VII/34>)
*   4) PGC (Cat. <VII/119>) Lyon-Meudon Extragalactic Database internal
*      identifier, also acronimed PGC for numbers greater than 73097.
*   The objects left unfolded into this hierarchy are designated as in
*   the original reference, or by their coordinates: Arrrrrrsdddddd.
*   The galaxy identifiers follow the rule already used in Prugniel &
*   Simien 1996 (J/A+A/309/749) and in Prugniel et al. 1998
*   (J/A+AS/127/117).
*Note on Type:
*   G  Galaxy
*   N  Not a galaxy (e.g. nebula or cluster)
*   *# foreground star included in the aperture, # is the number of the star
*   M  Multiple; the aperture encompasses more than one object
*Note on f_Imag:
*   U Uncertain identification
*   L Cross identified in leda
*   C Identified by coordinates
*   N Not recognized
*Note on f_Rmag:
*   0 Standard measurement
*   1 Interactively marqued to be rejected because it departs
*      from the growth curve
*Note on Method:
*   D Diaphram; Photoelectric photometry
*   S Star count
*   P Simulated aperture photometry from a photometric profile
*   I Aperture measurement on an image
*Note on logA:
*   Decimal logarithm of the aperture diameter in 0.1 arcmin
*Note on u_Vmag:
*   All the uncertainty notes come from original publications
*Note on n_Vmag:
*   B The magnitude in the V field in B (Johnson)
*   U The magnitude in the V field in U (Johnson)
*Note on n_B-V:
*   U The index in B-V field is U-V (Johnson)
*Note on n_Rmag, n_Imag:
*   The colour system for the R and I bands is coded as:
*    J Johnson
*    C Cousins
*    V Sandage-Visvanathan
*    G Gunn

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

C  Declarations for 'table2.dat'	! Bibliographic references for table1.dat

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

      character*6   Dataset_1   ! Dataset name as in table1.dat and table3.dat
      character*19  Bibcode     ! CDS/ADS reference code
      character*150 Text        ! Bibliographic reference

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

C  Declarations for 'table3.dat'	! Weights and systematic corrections to be
                                    applied to data in table1.dat

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

      character*6   Dataset_2   ! Dataset name detailed in table2.dat
      real*8        Rres        ! (mag) Mean residual in B (unweighted)
      real*4        e_Rres      ! (mag) rms uncertainty on Rres
      real*4        Nmeas       ! ? Number of measurements used for this reference
      real*4        Wres        ! (mag) Mean residual in B (after weighting)
      real*4        e_Wres      ! (mag) rms uncertainty on Wres (after weighting)
      real*4        o_Wres      ! weighted number of measurements
      real*4        Bcorr       ! (mag) *Correction on B magnitude
      real*4        Vcorr       ! (mag) *Correction on V magnitude
      real*4        Rcorr       ! (mag) *Correction on R magnitude
      real*4        Icorr       ! (mag) *Correction on I magnitude
      real*4        Ucorr       ! (mag) *Correction on U magnitude
      real*4        WG          ! Global weight for this reference
      real*4        WZ          ! Zero point weight
      integer*4     Ngal        ! Number of galaxies observed in this ref.
      real*4        WD          ! Density sampling weight
*Note on Bcorr:
*  Corrected magnitude = (measure in table1.dat) - (correction in table3.dat)
*Note on Vcorr:
*  Corrected magnitude = (measure in table1.dat) - (correction in table3.dat)
*Note on Rcorr:
*  Corrected magnitude = (measure in table1.dat) - (correction in table3.dat)
*Note on Icorr:
*  Corrected magnitude = (measure in table1.dat) - (correction in table3.dat)
*Note on Ucorr:
*  Corrected magnitude = (measure in table1.dat) - (correction in table3.dat)

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

C  Declarations for 'table4.dat'	! Derived photometric parameters for the
                                    sample's galaxies

      integer*4 nr__3
      parameter (nr__3=7288)	! Number of records
      character*170 ar__3  	! Full-size record

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

      character*11  Name_1      ! *Galaxy identifier
      integer*4     RAh         ! (h) Right ascension (1950.0)
      integer*4     RAm         ! (min) Right ascension (1950.0)
      real*4        RAs         ! (s) [0/60] Right ascension (1950.0)
      character*1   DE_         ! Declination sign
      integer*4     DEd         ! (deg) Declination (1950.0)
      integer*4     DEm         ! (arcmin) Declination (1950.0)
      integer*4     DEs         ! (arcsec) Declination (1950.0)
      real*4        Bt          ! (mag) Asymptotic magnitude in B
      real*4        SBe         ! (mag/arcsec2) Mean surface brightness within the
*                                    effective aperture
      real*4        e1          ! (mag) Residual 1-sigma error on Bt
      real*4        e2          ! ([0.1arcmin]) *1-sigma error on log(Ae)
      real*4        e3          ! (mag) Effect of e2 on Bt
      real*4        e4          ! 1-sigma error on Tphot
      real*4        e5          ! (mag) Effect of e4 on Bt
      real*4        B_Ve        ! (mag) ?=9.99 mean B-V within effective aperture
      real*4        e_B_Ve      ! (mag) ?=9.99 1-sigma error on B-Ve
      real*4        gB_V        ! ?=9.99 Color gradient in B-V
      real*4        U_Be        ! (mag) ?=9.99 mean U-B within effective aperture
      real*4        e_U_Be      ! (mag) ?=9.99 1-sigma error on U-Be
      real*4        gU_B        ! ?=9.99 Color gradient in U-B
      real*4        V_Re        ! (mag) ?=9.99 mean V-R within effective aperture
      real*4        e_V_Re      ! (mag) ?=9.99 1-sigma error on V-Re
      real*4        gV_R        ! ?=9.99 Color gradient in V-R
      real*4        V_Ie        ! (mag) ?=9.99 mean V-I within effective aperture
      real*4        e_V_Ie      ! (mag) ?=9.99 1-sigma error on V-Ie
      real*4        gV_I        ! ?=9.99 Color gradient in V-I
      integer*4     Nap         ! ?=9.99 Number of aperture available
      real*4        LastA       ! ([0.1arcmin]) log(A)-log(Ae) of the last used Ap
      real*4        Tphot       ! Photometric type
      integer*4     Mode        ! [0-1] Mode
      integer*4     Q           ! [0-6] Quality flag
*Note on Name:
*   The Name has been adopted by descending the hierarchy:
*   1) NGC (Cat. <VII/118>)
*   2) IC  (Cat. <VII/118>)
*   3) UGC (Cat. <VII/26>) or ESO (Cat. <VII/34>)
*   4) PGC (Cat. <VII/119>) Lyon-Meudon Extragalactic Database internal
*      identifier, also acronimed PGC for numbers greater than 73097.
*   The objects left unfolded into this hierarchy are designated as in
*   the original reference, or by their coordinates: Arrrrrrsdddddd.
*   The galaxy identifiers follow the rule already used in Prugniel &
*   Simien 1996 (J/A+A/309/749) and in Prugniel et al. 1998
*   (J/A+AS/127/117).
*Note on e2:
*  log(Ae) is the logarithm of the effective aperture in 0.1 arcmin

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

C  Loading file 'table1.dat'	! Catalogue of aperture photometry

C  Format for file interpretation

    1 format(
     +  A12,1X,A1,I1,A1,I1,A1,2X,F5.2,1X,A6,1X,F5.2,A1,A1,F5.2,A1,A1,
     +  F5.2,A1,1X,F5.2,A1,A1,2X,F5.2,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,114356
        read(1,'(A70)')ar__
        read(ar__,1)
     +  Name,Type,StarN,f_Imag,f_Rmag,Method,logA,Dataset,Vmag,u_Vmag,
     +  n_Vmag,B_V,u_B_V,n_B_V,U_B,u_U_B,Rmag,u_Rmag,n_Rmag,Imag,
     +  u_Imag,n_Imag
        if(ar__(15:15) .EQ. '') StarN = iNULL__
        if(ar__(21:25) .EQ. '') logA = rNULL__
        if(ar__(34:38) .EQ. '') Vmag = rNULL__
        if(ar__(41:45) .EQ. '') B_V = rNULL__
        if(ar__(48:52) .EQ. '') U_B = rNULL__
        if(ar__(55:59) .EQ. '') Rmag = rNULL__
        if(ar__(64:68) .EQ. '') Imag = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name,Type,StarN,f_Imag,f_Rmag,Method,logA,Dataset,Vmag,u_Vmag,
     +  n_Vmag,B_V,u_B_V,n_B_V,U_B,u_U_B,Rmag,u_Rmag,n_Rmag,Imag,
     +  u_Imag,n_Imag
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Bibliographic references for table1.dat

C  Format for file interpretation

    2 format(A6,1X,A19,A150)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,468
        read(1,'(A176)')ar__1
        read(ar__1,2)Dataset_1,Bibcode,Text
c    ..............Just test output...........
        write(6,2)Dataset_1,Bibcode,Text
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Weights and systematic corrections to be
*                                    applied to data in table1.dat

C  Format for file interpretation

    3 format(
     +  A6,F7.2,F6.2,F5.0,F6.2,F6.2,F6.1,F6.2,F6.2,F6.2,F6.2,F6.2,
     +  F6.2,F6.2,I5,F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,444
        read(1,'(A94)')ar__2
        read(ar__2,3)
     +  Dataset_2,Rres,e_Rres,Nmeas,Wres,e_Wres,o_Wres,Bcorr,Vcorr,
     +  Rcorr,Icorr,Ucorr,WG,WZ,Ngal,WD
        if(ar__2(20:24) .EQ. '') Nmeas = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Dataset_2,Rres,e_Rres,Nmeas,Wres,e_Wres,o_Wres,Bcorr,Vcorr,
     +  Rcorr,Icorr,Ucorr,WG,WZ,Ngal,WD
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Derived photometric parameters for the
*                                    sample's galaxies

C  Format for file interpretation

    4 format(
     +  A11,I2,I2,F4.1,A1,I2,I2,I2,1X,F5.2,1X,F6.2,1X,F6.3,1X,F6.3,1X,
     +  F6.3,1X,F6.3,1X,F6.3,1X,F5.2,1X,F5.3,1X,F6.3,1X,F5.2,1X,F5.3,
     +  1X,F6.3,1X,F5.2,1X,F5.3,1X,F6.3,1X,F5.2,1X,F5.3,1X,F6.3,1X,I3,
     +  1X,F5.2,1X,F5.1,1X,I1,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,7288
        read(1,'(A170)')ar__3
        read(ar__3,4)
     +  Name_1,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Bt,SBe,e1,e2,e3,e4,e5,B_Ve,
     +  e_B_Ve,gB_V,U_Be,e_U_Be,gU_B,V_Re,e_V_Re,gV_R,V_Ie,e_V_Ie,
     +  gV_I,Nap,LastA,Tphot,Mode,Q
        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,4)
     +  Name_1,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Bt,SBe,e1,e2,e3,e4,e5,B_Ve,
     +  e_B_Ve,gB_V,U_Be,e_U_Be,gU_B,V_Re,e_V_Re,gV_R,V_Ie,e_V_Ie,
     +  gV_I,Nap,LastA,Tphot,Mode,Q
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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