FORTRAN Generation
(/./ftp/cats/II/208)

Conversion of standardized ReadMe file for file /./ftp/cats/II/208 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-Jun-10
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. II/208              BVRI CCD photometry in the field of M 31  (Magnier+ 1992)
*================================================================================
*BVRI CCD photometry of 361281 objects in the field of M 31
*     Magnier E.A., Lewin W.H.G., van Paradijs J., Hasinger G.,
*     Jain A., Pietsch W., Truemper J.
*    <Astron. Astrophys. Suppl. Ser. 96, 379 (1992)>
*    =1992A&AS...96..379M
*Astrometry in the field of M 31.
*    Magnier E.A., Lewin W.H.G., van Paradijs J., Hasinger G.,
*    Pietsch W., Truemper J.
*   <Astron. Astrophys., 272, 695 (1993)>
*    =1993A&A...272..695M
*Extension of the Magnier et al. catalogue of objects in the field of M31.
*    Haiman Z., Magnier E., Lewin W.H.G., Lester R.R., van Paradijs J.,
*    Hasinger G., Pietsch W., Supper R., Truemper J.
*   <Astron. Astrophys., 286, 725 (1994)>
*   =1994A&A...286..725H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'bv.dat'	! Stars with both B and V photometry

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Seq         ! [1,485425]+ Sequence number
      real*8        RAdeg       ! (deg) Right ascension (J2000)
      real*8        e_RAdeg     ! (deg) Scatter for the star, if multiple measurements
      real*8        DEdeg       ! (deg) Declination (J2000)
      real*8        e_DEdeg     ! (deg) Scatter if multiple measurements
      real*8        Bmag        ! (mag) ?=-9.999 B magnitude
      real*4        e_Bmag      ! (mag) ?=0.000  Mean error on Bmag
      integer*4     o_Bmag      ! [-5,7] Number of detection in B images (2)
      character*6   tBmag       ! [0-57] DoPHOT type for each detection (1)
      real*8        Vmag        ! (mag) ?=-9.999 V magnitude
      real*4        e_Vmag      ! (mag) ?=0.000  Mean error on Vmag
      integer*4     o_Vmag      ! [-6,7] Number of detection in V images (2)
      character*6   tVmag       ! [0-57] DoPHOT type for each detection (1)
      real*8        Rmag        ! (mag) ?=-9.999 R magnitude (Cousins)
      real*4        e_Rmag      ! (mag) ?=0.000  Mean error on Rmag
      integer*4     o_Rmag      ! [-5,6] Number of detection in R images (2)
      character*6   tRmag       ! [0-57] DoPHOT type for each detection (1)
      real*8        Imag        ! (mag) ?=-9.999 I magnitude (Cousins)
      real*4        e_Imag      ! (mag) ?=0.000  Mean error on Imag
      integer*4     o_Imag      ! [-5,6] Number of detection in I images (2)
      character*6   tImag       ! [0-57] DoPHOT type for each detection (1)
*Note (1): See Schechter et al. (1993) for a description of DoPHOT;
*     the "DoPHOT types" assign numbers depending of the similarity
*     of the objects profile to the PSF. The definitions are:
*     1 = star
*     2 = extended profile (ie, galaxy)
*     3 = double profile (pair of stars)
*     4 = failed to converge in 4 parameter fit
*     5 = large number of bad pixels (ie, near the edge of CCD)
*     7 = failed to converge in 7 parameter fit.
*Note (2): negative numbers indicate that the object lies in a crowded
*     area, and is likely to be either a blended image of two stars,
*     or may be mismatched in the other filters.

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

C  Declarations for 'bvi.dat'	! Stars with all B, V and I photometry

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Seq_1       ! [1,485425]+ Sequence number
      real*8        RAdeg_1     ! (deg) Right ascension (J2000)
      real*8        e_RAdeg_1   ! (deg) Scatter for the star, if multiple measurements
      real*8        DEdeg_1     ! (deg) Declination (J2000)
      real*8        e_DEdeg_1   ! (deg) Scatter if multiple measurements
      real*8        Bmag_1      ! (mag) ?=-9.999 B magnitude
      real*4        e_Bmag_1    ! (mag) ?=0.000  Mean error on Bmag
      integer*4     o_Bmag_1    ! [-5,7] Number of detection in B images (2)
      character*6   tBmag_1     ! [0-57] DoPHOT type for each detection (1)
      real*8        Vmag_1      ! (mag) ?=-9.999 V magnitude
      real*4        e_Vmag_1    ! (mag) ?=0.000  Mean error on Vmag
      integer*4     o_Vmag_1    ! [-6,7] Number of detection in V images (2)
      character*6   tVmag_1     ! [0-57] DoPHOT type for each detection (1)
      real*8        Rmag_1      ! (mag) ?=-9.999 R magnitude (Cousins)
      real*4        e_Rmag_1    ! (mag) ?=0.000  Mean error on Rmag
      integer*4     o_Rmag_1    ! [-5,6] Number of detection in R images (2)
      character*6   tRmag_1     ! [0-57] DoPHOT type for each detection (1)
      real*8        Imag_1      ! (mag) ?=-9.999 I magnitude (Cousins)
      real*4        e_Imag_1    ! (mag) ?=0.000  Mean error on Imag
      integer*4     o_Imag_1    ! [-5,6] Number of detection in I images (2)
      character*6   tImag_1     ! [0-57] DoPHOT type for each detection (1)
*Note (1): See Schechter et al. (1993) for a description of DoPHOT;
*     the "DoPHOT types" assign numbers depending of the similarity
*     of the objects profile to the PSF. The definitions are:
*     1 = star
*     2 = extended profile (ie, galaxy)
*     3 = double profile (pair of stars)
*     4 = failed to converge in 4 parameter fit
*     5 = large number of bad pixels (ie, near the edge of CCD)
*     7 = failed to converge in 7 parameter fit.
*Note (2): negative numbers indicate that the object lies in a crowded
*     area, and is likely to be either a blended image of two stars,
*     or may be mismatched in the other filters.

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

C  Declarations for 'catalog.dat'	! The catalogue of M31 stars.

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

C  J2000 position composed of: RAdeg DEdeg
      integer*4     Seq_2       ! [1,485425]+ Sequence number
      real*8        RAdeg_2     ! (deg) Right ascension (J2000)
      real*8        e_RAdeg_2   ! (deg) Scatter for the star, if multiple measurements
      real*8        DEdeg_2     ! (deg) Declination (J2000)
      real*8        e_DEdeg_2   ! (deg) Scatter if multiple measurements
      real*8        Bmag_2      ! (mag) ?=-9.999 B magnitude
      real*4        e_Bmag_2    ! (mag) ?=0.000  Mean error on Bmag
      integer*4     o_Bmag_2    ! [-5,7] Number of detection in B images (2)
      character*6   tBmag_2     ! [0-57] DoPHOT type for each detection (1)
      real*8        Vmag_2      ! (mag) ?=-9.999 V magnitude
      real*4        e_Vmag_2    ! (mag) ?=0.000  Mean error on Vmag
      integer*4     o_Vmag_2    ! [-6,7] Number of detection in V images (2)
      character*6   tVmag_2     ! [0-57] DoPHOT type for each detection (1)
      real*8        Rmag_2      ! (mag) ?=-9.999 R magnitude (Cousins)
      real*4        e_Rmag_2    ! (mag) ?=0.000  Mean error on Rmag
      integer*4     o_Rmag_2    ! [-5,6] Number of detection in R images (2)
      character*6   tRmag_2     ! [0-57] DoPHOT type for each detection (1)
      real*8        Imag_2      ! (mag) ?=-9.999 I magnitude (Cousins)
      real*4        e_Imag_2    ! (mag) ?=0.000  Mean error on Imag
      integer*4     o_Imag_2    ! [-5,6] Number of detection in I images (2)
      character*6   tImag_2     ! [0-57] DoPHOT type for each detection (1)
*Note (1): See Schechter et al. (1993) for a description of DoPHOT;
*     the "DoPHOT types" assign numbers depending of the similarity
*     of the objects profile to the PSF. The definitions are:
*     1 = star
*     2 = extended profile (ie, galaxy)
*     3 = double profile (pair of stars)
*     4 = failed to converge in 4 parameter fit
*     5 = large number of bad pixels (ie, near the edge of CCD)
*     7 = failed to converge in 7 parameter fit.
*Note (2): negative numbers indicate that the object lies in a crowded
*     area, and is likely to be either a blended image of two stars,
*     or may be mismatched in the other filters.

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

C  Loading file 'bv.dat'	! Stars with both B and V photometry

C  Format for file interpretation

    1 format(
     +  1X,I6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F7.3,1X,F5.3,1X,I2,
     +  1X,A6,1X,F7.3,1X,F5.3,1X,I2,1X,A6,1X,F7.3,1X,F5.3,1X,I2,1X,A6,
     +  1X,F7.3,1X,F5.3,1X,I2,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'bv.dat')
      write(6,*) '....Loading file: bv.dat'
      do i__=1,47776
        read(1,'(A143)')ar__
        read(ar__,1)
     +  Seq,RAdeg,e_RAdeg,DEdeg,e_DEdeg,Bmag,e_Bmag,o_Bmag,tBmag,Vmag,
     +  e_Vmag,o_Vmag,tVmag,Rmag,e_Rmag,o_Rmag,tRmag,Imag,e_Imag,
     +  o_Imag,tImag
c    ..............Just test output...........
        write(6,1)
     +  Seq,RAdeg,e_RAdeg,DEdeg,e_DEdeg,Bmag,e_Bmag,o_Bmag,tBmag,Vmag,
     +  e_Vmag,o_Vmag,tVmag,Rmag,e_Rmag,o_Rmag,tRmag,Imag,e_Imag,
     +  o_Imag,tImag
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'bvi.dat'	! Stars with all B, V and I photometry

C  Format for file interpretation

    2 format(
     +  1X,I6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F7.3,1X,F5.3,1X,I2,
     +  1X,A6,1X,F7.3,1X,F5.3,1X,I2,1X,A6,1X,F7.3,1X,F5.3,1X,I2,1X,A6,
     +  1X,F7.3,1X,F5.3,1X,I2,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'bvi.dat')
      write(6,*) '....Loading file: bvi.dat'
      do i__=1,30177
        read(1,'(A143)')ar__1
        read(ar__1,2)
     +  Seq_1,RAdeg_1,e_RAdeg_1,DEdeg_1,e_DEdeg_1,Bmag_1,e_Bmag_1,
     +  o_Bmag_1,tBmag_1,Vmag_1,e_Vmag_1,o_Vmag_1,tVmag_1,Rmag_1,
     +  e_Rmag_1,o_Rmag_1,tRmag_1,Imag_1,e_Imag_1,o_Imag_1,tImag_1
c    ..............Just test output...........
        write(6,2)
     +  Seq_1,RAdeg_1,e_RAdeg_1,DEdeg_1,e_DEdeg_1,Bmag_1,e_Bmag_1,
     +  o_Bmag_1,tBmag_1,Vmag_1,e_Vmag_1,o_Vmag_1,tVmag_1,Rmag_1,
     +  e_Rmag_1,o_Rmag_1,tRmag_1,Imag_1,e_Imag_1,o_Imag_1,tImag_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'catalog.dat'	! The catalogue of M31 stars.

C  Format for file interpretation

    3 format(
     +  1X,I6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F7.3,1X,F5.3,1X,I2,
     +  1X,A6,1X,F7.3,1X,F5.3,1X,I2,1X,A6,1X,F7.3,1X,F5.3,1X,I2,1X,A6,
     +  1X,F7.3,1X,F5.3,1X,I2,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,485388
        read(1,'(A143)')ar__2
        read(ar__2,3)
     +  Seq_2,RAdeg_2,e_RAdeg_2,DEdeg_2,e_DEdeg_2,Bmag_2,e_Bmag_2,
     +  o_Bmag_2,tBmag_2,Vmag_2,e_Vmag_2,o_Vmag_2,tVmag_2,Rmag_2,
     +  e_Rmag_2,o_Rmag_2,tRmag_2,Imag_2,e_Imag_2,o_Imag_2,tImag_2
c    ..............Just test output...........
        write(6,3)
     +  Seq_2,RAdeg_2,e_RAdeg_2,DEdeg_2,e_DEdeg_2,Bmag_2,e_Bmag_2,
     +  o_Bmag_2,tBmag_2,Vmag_2,e_Vmag_2,o_Vmag_2,tVmag_2,Rmag_2,
     +  e_Rmag_2,o_Rmag_2,tRmag_2,Imag_2,e_Imag_2,o_Imag_2,tImag_2
c    .......End.of.Just test output...........
      end do
      close(1)

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