CDS.headStuff2 FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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-26
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/464/641   Double stars CCD photometry and astrometry. III (Lampens+, 2007)
*================================================================================
*Multicolour CCD measurements of visual double and multiple stars. III.
*    Lampens P., Strigachev A., Duval D.
*   <Astron. Astrophys. 464, 641 (2007)>
*   =2007A&A...464..641L
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table4.dat'	! Astrometry of the observed stars

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

      character*12  Name        ! Identifier of the star
      character*1   n_Name      ! [*] * denotes two epochs for the same target
      character*3   m_Name      ! Double star component
      real*8        Epoch       ! (yr) Epoch in Besselian year
      integer*4     Nfr         ! Number of frames
      real*4        rho         ! (arcsec) ?=- Angular separation
      real*4        e_rho       ! (arcsec) ?=- Standard error of angular separation
      real*4        theta       ! (deg) ?=- Position angle
      real*4        e_theta     ! (deg) ?=- Standard error of position angle
      character*3   Tel         ! Telescope (1)
      character*34  Remark      ! Remark
*Note (1): Telescope as follows:
*    2   = 2-m telescope at NAO Rozhen
*    0.6 = 60-cm telescope at AO Belogradchik

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

C  Declarations for 'table5.dat'	! Differential photometry of the observed stars

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

      character*12  Name_1      ! Identifier of the star
      character*1   n_Name_1    ! [*] * denotes two epochs for the same target
      character*3   m_Name_1    ! Double star component
      real*8        HJD         ! (d) Heliocentric Julian Date
      real*4        DVmag       ! (mag) Magnitude V difference of the components
      real*4        e_DVmag     ! (mag) Standard error of magnitude difference
      real*4        D_B_V       ! (mag) ?=- B-V colour difference of the components
      real*4        e_D_B_V     ! (mag) ?=- Standard error of colour difference
      real*4        D_V_R       ! (mag) ?=- V-R colour difference of the components
      character*1   u_D_V_R     ! [)] Uncertainty flag on DV-DR
      real*4        e_D_V_R     ! (mag) ?=- Standard error of colour difference
      character*1   u_e_D_V_R   ! [)] Uncertainty flag on e_DV-DR
      real*4        D_V_I       ! (mag) ?=- V-I colour difference of the components
      real*4        e_D_V_I     ! (mag) ?=- Standard error of colour difference

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

C  Declarations for 'table6.dat'	! Relative position compared to the
                              Hipparcos/CCDM data

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

      character*12  Name_2      ! Identifier of the star
      character*1   n_Name_2    ! [*] * denotes two epochs for the same target
      character*3   m_Name_2    ! Double star component
      integer*4     Nfr_1       ! Number of frames
      real*8        Epoch_1     ! (yr) Epoch in Bessel year (1)
      real*4        rho_1       ! (arcsec) Angular separation
      real*4        theta_1     ! (deg) Position angle
      real*4        Drho        ! (arcsec) Comparison with Hipparcos/CCDM
*                                   angular separation
      real*8        Dtheta      ! (deg) Comparison with Hipparcos/CCDM position angle
      real*4        Dpos        ! (arcsec) Comparison with Hipparcos/CCDM
*                                   relative position
      character*24  Code        ! Remarks concerning the system (2)
*Note (1): Epoch: 1991.25 from Hipparcos else epoch from CCDM
*Note (2): Codes as follows:
*      L = optical
*      M = motion
*      O = orbital
*      S = stable
*      * = 180{deg} converted
*      ** = alternative Hipparcos solution
*      Pap II = Lampens & Strigachev, 2004, Cat. <J/A+A/422/1023>

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

C  Loading file 'table4.dat'	! Astrometry of the observed stars

C  Format for file interpretation

    1 format(
     +  A12,1X,A1,A3,1X,F9.4,1X,I2,1X,F6.3,1X,F5.3,1X,F6.2,1X,F4.2,1X,
     +  A3,1X,A34)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,138
        read(1,'(A94)')ar__
        read(ar__,1)
     +  Name,n_Name,m_Name,Epoch,Nfr,rho,e_rho,theta,e_theta,Tel,
     +  Remark
        if (idig(ar__(32:37)).EQ.0) rho =  rNULL__
        if (idig(ar__(39:43)).EQ.0) e_rho =  rNULL__
        if (idig(ar__(45:50)).EQ.0) theta =  rNULL__
        if (idig(ar__(52:55)).EQ.0) e_theta =  rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name,n_Name,m_Name,Epoch,Nfr,rho,e_rho,theta,e_theta,Tel,
     +  Remark
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! Differential photometry of the observed stars

C  Format for file interpretation

    2 format(
     +  A12,1X,A1,A3,1X,F12.4,1X,F5.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,
     +  A1,1X,F5.3,A1,1X,F6.3,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,124
        read(1,'(A83)')ar__1
        read(ar__1,2)
     +  Name_1,n_Name_1,m_Name_1,HJD,DVmag,e_DVmag,D_B_V,e_D_B_V,
     +  D_V_R,u_D_V_R,e_D_V_R,u_e_D_V_R,D_V_I,e_D_V_I
        if (idig(ar__1(44:49)).EQ.0) D_B_V =  rNULL__
        if (idig(ar__1(51:55)).EQ.0) e_D_B_V =  rNULL__
        if (idig(ar__1(57:62)).EQ.0) D_V_R =  rNULL__
        if (idig(ar__1(65:69)).EQ.0) e_D_V_R =  rNULL__
        if (idig(ar__1(72:77)).EQ.0) D_V_I =  rNULL__
        if (idig(ar__1(79:83)).EQ.0) e_D_V_I =  rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1,n_Name_1,m_Name_1,HJD,DVmag,e_DVmag,D_B_V,e_D_B_V,
     +  D_V_R,u_D_V_R,e_D_V_R,u_e_D_V_R,D_V_I,e_D_V_I
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! Relative position compared to the
*                              Hipparcos/CCDM data

C  Format for file interpretation

    3 format(
     +  A12,1X,A1,A3,1X,I2,1X,F7.2,1X,F6.3,1X,F6.2,1X,F6.3,1X,F8.3,1X,
     +  F6.3,1X,A24)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,63
        read(1,'(A90)')ar__2
        read(ar__2,3)
     +  Name_2,n_Name_2,m_Name_2,Nfr_1,Epoch_1,rho_1,theta_1,Drho,
     +  Dtheta,Dpos,Code
c    ..............Just test output...........
        write(6,3)
     +  Name_2,n_Name_2,m_Name_2,Nfr_1,Epoch_1,rho_1,theta_1,Drho,
     +  Dtheta,Dpos,Code
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