FORTRAN Generation
(/./ftp/cats/J/ApJ/799/4)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/799/4 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 2026-Oct-13
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/ApJ/799/4        Robo-AO observations of binary stars      (Riddle+, 2015)
*================================================================================
*A survey of the high order multiplicity of nearby solar-type binary stars with
*Robo-AO.
*    Riddle R.L., Tokovinin A., Mason B.D., Hartkopf W.I., Roberts L.C.JR,
*    Baranec C., Law N.M., Bui K., Burse M.P., Das H.K., Dekany R.G.,
*    Kulkarni S., Punnadi S., Ramaprakash A.N., Tendulkar S.P.
*   <Astrophys. J., 799, 4 (2015)>
*   =2015ApJ...799....4R
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! List of observed components belonging to
                             595 systems and detection limits

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

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

      integer*4     HIP        (nr__) ! Hipparcos number of the primary component
*                                  in each system
      character*1   m_HIP      (nr__) ! Component identifier
      integer*4     RAh        (nr__) ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Minute of Right Ascension (J2000)
      real*4        RAs        (nr__) ! (s) Second of Right Ascension (J2000)
      character*1   DE_        (nr__) ! Sign of the Declination (J2000)
      integer*4     DEd        (nr__) ! (deg) Degree of Declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Arcsecond of Declination (J2000)
      real*4        Vmag       (nr__) ! (mag) [3.4/17]?=0 The V band magnitude from Hipparcos
      real*4        Sep        (nr__) ! (arcsec) [0/1156] Separation from primary
      real*8        Epoch      (nr__) ! (yr) [2012.6/2013.7] Epoch of observation
      real*4        Sep0_15    (nr__) ! (mag) [0/4] Detection limit {Delta}m(0.15arcsec)
      real*4        Sep0_8     (nr__) ! (mag) [1/6] Detection limit {Delta}m(0.8arcsec)
      real*4        Sep2_1     (nr__) ! (mag) [1/9] Detection limit {Delta}m(2.1arcsec)
      real*4        rho        (nr__) ! (arcsec) [2.5/22] Maximum separation of detectable
*                                  satellite (distance to nearest frame border)

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

C  Declarations for 'table4.dat'	! Measurements of binary stars with Robo-AO

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

      character*10  WDS        (nr__1) ! WDS designation (HHMMm+DDMM; J2000)
      character*8   Disc       (nr__1) ! Discoverer designation
      character*5   m_Disc     (nr__1) ! WDS component
      integer*4     HIP_1      (nr__1) ! Hipparcos number of the primary component
*                                  in each system
      character*1   m_HIP_1    (nr__1) ! Component identifier
      real*8        Epoch_1    (nr__1) ! (yr) [2012.6/2013.7] Epoch of observation
      integer*4     N          (nr__1) ! [1/10] Number of observations
      real*4        PA         (nr__1) ! (deg) [0/360] Position angle {theta}
      real*4        e_PA       (nr__1) ! (deg) [0/2.6] The 1{sigma} error in PA
      real*4        rho_1      (nr__1) ! (arcsec) [0.09/38.7] Separation {rho}
      real*4        e_rho      (nr__1) ! (arcsec) [0/352.1] The 1{sigma} error in rho
      real*4        Dmag       (nr__1) ! (mag) [0/7.1] Magnitude difference between components
      character*2   f_Dmag     (nr__1) ! [:zrw] Flag on Dmag (1)
      real*4        v_O_C_t    (nr__1) ! (deg) ? The (O-C) residual in PA
      real*4        v_O_C_r    (nr__1) ! (arcsec) ? The (O-C) residual in rho
      integer*4     Ref        (nr__1) ! ? Reference code (see refs.dat file)
*Note (1): Flag as follows:
*    : = weak speckle signal or blind  deconvolution;
*    z = z bandpass used instead of i;
*    r = r bandpass used instead of i;
*    w = LP600 filter used instead of i.

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

C  Declarations for 'table5.dat'	! New pairs resolved with Robo-AO

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

      character*10  WDS_1      (nr__2) ! WDS designation (HHMMm+DDMM; J2000)
      integer*4     HIP_2      (nr__2) ! Hipparcos number of the primary component
*                                  in each system
      character*12  Disc_1     (nr__2) ! Discoverer designation
      integer*4     N_1        (nr__2) ! [1/5] Number of observations
      real*4        PA_1       (nr__2) ! (deg) [0/360] Position angle ({theta})
      real*8        rho_2      (nr__2) ! (arcsec) [0.09/39] Separation
      real*4        Dmag_1     (nr__2) ! (mag) [0/7] Magnitude difference between components
      character*1   u_Dmag     (nr__2) ! Uncertainty flag on Dmag
      character*50  Notes      (nr__2) ! Status and remarks (1)
*Note (1): Status of the measured binary pairs
*   (the reasons for this classification are between parentheses): 
*   P = true physical binaries,
*   O = chance optical alignments of unrelated stars

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

C  Declarations for 'refs.dat'	! References

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

      integer*4     Ref_1      (nr__3) ! Reference code
      character*19  BibCode    (nr__3) ! Bibcode
      character*21  Aut        (nr__3) ! Author's name(s)
      character*46  Comm       (nr__3) ! Comment

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

C  Loading file 'table3.dat'	! List of observed components belonging to
*                             595 systems and detection limits

C  Format for file interpretation

    1 format(
     +  I6,1X,A1,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F5.2,
     +  1X,F6.1,1X,F9.4,1X,F3.1,1X,F3.1,1X,F3.1,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,695
        read(1,'(A72)')ar__
        read(ar__,1)
     +  HIP(i__),m_HIP(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Vmag(i__),Sep(i__),Epoch(i__),
     +  Sep0_15(i__),Sep0_8(i__),Sep2_1(i__),rho(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,1)
     +  HIP(i__),m_HIP(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Vmag(i__),Sep(i__),Epoch(i__),
     +  Sep0_15(i__),Sep0_8(i__),Sep2_1(i__),rho(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Measurements of binary stars with Robo-AO

C  Format for file interpretation

    2 format(
     +  A10,1X,A8,1X,A5,1X,I6,A1,1X,F9.4,1X,I2,1X,F5.1,1X,F3.1,1X,
     +  F6.3,1X,F5.1,1X,F4.2,1X,A2,1X,F5.1,1X,F6.3,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,425
        read(1,'(A93)')ar__1
        read(ar__1,2)
     +  WDS(i__),Disc(i__),m_Disc(i__),HIP_1(i__),m_HIP_1(i__),
     +  Epoch_1(i__),N(i__),PA(i__),e_PA(i__),rho_1(i__),e_rho(i__),
     +  Dmag(i__),f_Dmag(i__),v_O_C_t(i__),v_O_C_r(i__),Ref(i__)
        if(ar__1(79:83) .EQ. '') v_O_C_t(i__) = rNULL__
        if(ar__1(85:90) .EQ. '') v_O_C_r(i__) = rNULL__
        if(ar__1(92:93) .EQ. '') Ref(i__) = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  WDS(i__),Disc(i__),m_Disc(i__),HIP_1(i__),m_HIP_1(i__),
     +  Epoch_1(i__),N(i__),PA(i__),e_PA(i__),rho_1(i__),e_rho(i__),
     +  Dmag(i__),f_Dmag(i__),v_O_C_t(i__),v_O_C_r(i__),Ref(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! New pairs resolved with Robo-AO

C  Format for file interpretation

    3 format(A10,1X,I6,1X,A12,1X,I1,1X,F5.1,1X,F7.4,1X,F4.2,A1,1X,A50)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,96
        read(1,'(A103)')ar__2
        read(ar__2,3)
     +  WDS_1(i__),HIP_2(i__),Disc_1(i__),N_1(i__),PA_1(i__),
     +  rho_2(i__),Dmag_1(i__),u_Dmag(i__),Notes(i__)
c    ..............Just test output...........
        write(6,3)
     +  WDS_1(i__),HIP_2(i__),Disc_1(i__),N_1(i__),PA_1(i__),
     +  rho_2(i__),Dmag_1(i__),u_Dmag(i__),Notes(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'refs.dat'	! References

C  Format for file interpretation

    4 format(I2,1X,A19,1X,A21,1X,A46)

C  Effective file loading

      open(unit=1,status='old',file=
     +'refs.dat')
      write(6,*) '....Loading file: refs.dat'
      do i__=1,77
        read(1,'(A91)')ar__3
        read(ar__3,4)Ref_1(i__),BibCode(i__),Aut(i__),Comm(i__)
c    ..............Just test output...........
        write(6,4)Ref_1(i__),BibCode(i__),Aut(i__),Comm(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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