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

Conversion of standardized ReadMe file for file /./ftp/cats/VII/206 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 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       (nr__) ! *Galaxy identifier
      character*1   Type       (nr__) ! *[GN*M] Object type
      integer*4     StarN      (nr__) ! [1/5]? Number of the star if Type=*
      character*1   f_Imag     (nr__) ! *[CLNU] Identification flag
      integer*4     f_Rmag     (nr__) ! *[0/1] Rejection flag
      character*1   Method     (nr__) ! *[DSPI] Measurement method
      real*4        logA       (nr__) ! ([0.1arcmin]) *? Size of the circular aperture
      character*6   Dataset    (nr__) ! Dataset name detailed in table2.dat
      real*4        Vmag       (nr__) ! (mag) ? Aperture magnitude in V (Johnson)
      character*1   u_Vmag     (nr__) ! *Uncertainty on Vmag (: = uncertain)
      character*1   n_Vmag     (nr__) ! *[BU] V color
      real*4        B_V        (nr__) ! (mag) ? B-V (Johnson)
      character*1   u_B_V      (nr__) ! Uncertainty on B-V (: = uncertain)
      character*1   n_B_V      (nr__) ! *[U ] B-V color
      real*4        U_B        (nr__) ! (mag) ? U-B (Johnson)
      character*1   u_U_B      (nr__) ! Uncertainty on U-B (: = uncertain)
      real*4        Rmag       (nr__) ! (mag) ? R magnitude in the Rsyst system
      character*1   u_Rmag     (nr__) ! Uncertainty on Rmag (: = uncertain)
      character*1   n_Rmag     (nr__) ! *[CGJV ] Magnitude system
      real*4        Imag       (nr__) ! (mag) ? I magnitude in the I_syst system
      character*1   u_Imag     (nr__) ! Uncertainty on Imag (: = uncertain)
      character*1   n_Imag     (nr__) ! *[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  (nr__1) ! Dataset name as in table1.dat and table3.dat
      character*19  Bibcode    (nr__1) ! CDS/ADS reference code
      character*150 Text       (nr__1) ! 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  (nr__2) ! Dataset name detailed in table2.dat
      real*8        Rres       (nr__2) ! (mag) Mean residual in B (unweighted)
      real*4        e_Rres     (nr__2) ! (mag) rms uncertainty on Rres
      real*4        Nmeas      (nr__2) ! ? Number of measurements used for this reference
      real*4        Wres       (nr__2) ! (mag) Mean residual in B (after weighting)
      real*4        e_Wres     (nr__2) ! (mag) rms uncertainty on Wres (after weighting)
      real*4        o_Wres     (nr__2) ! weighted number of measurements
      real*4        Bcorr      (nr__2) ! (mag) *Correction on B magnitude
      real*4        Vcorr      (nr__2) ! (mag) *Correction on V magnitude
      real*4        Rcorr      (nr__2) ! (mag) *Correction on R magnitude
      real*4        Icorr      (nr__2) ! (mag) *Correction on I magnitude
      real*4        Ucorr      (nr__2) ! (mag) *Correction on U magnitude
      real*4        WG         (nr__2) ! Global weight for this reference
      real*4        WZ         (nr__2) ! Zero point weight
      integer*4     Ngal       (nr__2) ! Number of galaxies observed in this ref.
      real*4        WD         (nr__2) ! 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      (nr__3) ! (deg) Right Ascension 1950.0
      real*8        DEdeg      (nr__3) ! (deg)     Declination 1950.0
C  ---------------------------------- ! (position vector(s) in degrees)

      character*11  Name_1     (nr__3) ! *Galaxy identifier
      integer*4     RAh        (nr__3) ! (h) Right ascension (1950.0)
      integer*4     RAm        (nr__3) ! (min) Right ascension (1950.0)
      real*4        RAs        (nr__3) ! (s) [0/60] Right ascension (1950.0)
      character*1   DE_        (nr__3) ! Declination sign
      integer*4     DEd        (nr__3) ! (deg) Declination (1950.0)
      integer*4     DEm        (nr__3) ! (arcmin) Declination (1950.0)
      integer*4     DEs        (nr__3) ! (arcsec) Declination (1950.0)
      real*4        Bt         (nr__3) ! (mag) Asymptotic magnitude in B
      real*4        SBe        (nr__3) ! (mag/arcsec2) Mean surface brightness within the
*                                    effective aperture
      real*4        e1         (nr__3) ! (mag) Residual 1-sigma error on Bt
      real*4        e2         (nr__3) ! ([0.1arcmin]) *1-sigma error on log(Ae)
      real*4        e3         (nr__3) ! (mag) Effect of e2 on Bt
      real*4        e4         (nr__3) ! 1-sigma error on Tphot
      real*4        e5         (nr__3) ! (mag) Effect of e4 on Bt
      real*4        B_Ve       (nr__3) ! (mag) ?=9.99 mean B-V within effective aperture
      real*4        e_B_Ve     (nr__3) ! (mag) ?=9.99 1-sigma error on B-Ve
      real*4        gB_V       (nr__3) ! ?=9.99 Color gradient in B-V
      real*4        U_Be       (nr__3) ! (mag) ?=9.99 mean U-B within effective aperture
      real*4        e_U_Be     (nr__3) ! (mag) ?=9.99 1-sigma error on U-Be
      real*4        gU_B       (nr__3) ! ?=9.99 Color gradient in U-B
      real*4        V_Re       (nr__3) ! (mag) ?=9.99 mean V-R within effective aperture
      real*4        e_V_Re     (nr__3) ! (mag) ?=9.99 1-sigma error on V-Re
      real*4        gV_R       (nr__3) ! ?=9.99 Color gradient in V-R
      real*4        V_Ie       (nr__3) ! (mag) ?=9.99 mean V-I within effective aperture
      real*4        e_V_Ie     (nr__3) ! (mag) ?=9.99 1-sigma error on V-Ie
      real*4        gV_I       (nr__3) ! ?=9.99 Color gradient in V-I
      integer*4     Nap        (nr__3) ! ?=9.99 Number of aperture available
      real*4        LastA      (nr__3) ! ([0.1arcmin]) log(A)-log(Ae) of the last used Ap
      real*4        Tphot      (nr__3) ! Photometric type
      integer*4     Mode       (nr__3) ! [0-1] Mode
      integer*4     Q          (nr__3) ! [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(i__),Type(i__),StarN(i__),f_Imag(i__),f_Rmag(i__),
     +  Method(i__),logA(i__),Dataset(i__),Vmag(i__),u_Vmag(i__),
     +  n_Vmag(i__),B_V(i__),u_B_V(i__),n_B_V(i__),U_B(i__),
     +  u_U_B(i__),Rmag(i__),u_Rmag(i__),n_Rmag(i__),Imag(i__),
     +  u_Imag(i__),n_Imag(i__)
        if(ar__(15:15) .EQ. '') StarN(i__) = iNULL__
        if(ar__(21:25) .EQ. '') logA(i__) = rNULL__
        if(ar__(34:38) .EQ. '') Vmag(i__) = rNULL__
        if(ar__(41:45) .EQ. '') B_V(i__) = rNULL__
        if(ar__(48:52) .EQ. '') U_B(i__) = rNULL__
        if(ar__(55:59) .EQ. '') Rmag(i__) = rNULL__
        if(ar__(64:68) .EQ. '') Imag(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name(i__),Type(i__),StarN(i__),f_Imag(i__),f_Rmag(i__),
     +  Method(i__),logA(i__),Dataset(i__),Vmag(i__),u_Vmag(i__),
     +  n_Vmag(i__),B_V(i__),u_B_V(i__),n_B_V(i__),U_B(i__),
     +  u_U_B(i__),Rmag(i__),u_Rmag(i__),n_Rmag(i__),Imag(i__),
     +  u_Imag(i__),n_Imag(i__)
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(i__),Bibcode(i__),Text(i__)
c    ..............Just test output...........
        write(6,2)Dataset_1(i__),Bibcode(i__),Text(i__)
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(i__),Rres(i__),e_Rres(i__),Nmeas(i__),Wres(i__),
     +  e_Wres(i__),o_Wres(i__),Bcorr(i__),Vcorr(i__),Rcorr(i__),
     +  Icorr(i__),Ucorr(i__),WG(i__),WZ(i__),Ngal(i__),WD(i__)
        if(ar__2(20:24) .EQ. '') Nmeas(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Dataset_2(i__),Rres(i__),e_Rres(i__),Nmeas(i__),Wres(i__),
     +  e_Wres(i__),o_Wres(i__),Bcorr(i__),Vcorr(i__),Rcorr(i__),
     +  Icorr(i__),Ucorr(i__),WG(i__),WZ(i__),Ngal(i__),WD(i__)
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(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Bt(i__),SBe(i__),e1(i__),e2(i__),e3(i__),
     +  e4(i__),e5(i__),B_Ve(i__),e_B_Ve(i__),gB_V(i__),U_Be(i__),
     +  e_U_Be(i__),gU_B(i__),V_Re(i__),e_V_Re(i__),gV_R(i__),
     +  V_Ie(i__),e_V_Ie(i__),gV_I(i__),Nap(i__),LastA(i__),
     +  Tphot(i__),Mode(i__),Q(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,4)
     +  Name_1(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Bt(i__),SBe(i__),e1(i__),e2(i__),e3(i__),
     +  e4(i__),e5(i__),B_Ve(i__),e_B_Ve(i__),gB_V(i__),U_Be(i__),
     +  e_U_Be(i__),gU_B(i__),V_Re(i__),e_V_Re(i__),gV_R(i__),
     +  V_Ie(i__),e_V_Ie(i__),gV_I(i__),Nap(i__),LastA(i__),
     +  Tphot(i__),Mode(i__),Q(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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