FORTRAN Generation
(/./ftp/cats/I/382)

Conversion of standardized ReadMe file for file /./ftp/cats/I/382 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-Sep-15
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. I/382               Speckle observations with PISCO            (Scardia+, 2004-)
*================================================================================
*Speckle observations with PISCO in Merate.
*I-XVI. Measurements of visual binaries with EMCCD cameras and the Nice 76-cm
*refractor in 2009-2017.
*   Scardia M., Prieur J.-L., Sala M., Ghigo M., Koechlin L., Aristidi, E.,
*   Mazzoleni F., Pansecchi L., Argyle R.W., Ghigo M., Koechlin L., Basso S.,
*   Spano, P., Riva, M., Landoni, M., Zanutta, A., Rivet J.-P., Ling J.F.,
*   Vernet D., Abe L., Bendjoya P., Dimur C., Suarez O., Bonneau D.,
*   Maccarini L., Vakili F., Scardia M., Piccotti L., Serot J., Vakili F.,
*   Serot J., Gili R.
*   <Mon. Not. R. Astron. Soc., 357, 1255-1266 (2005); 367, 1170-1180 (2006);
*    374, 965-978 (2007); 387, 772-782 (2008); 395, 907-917 (2009);
*    407, 1913-1925 (2010); 422, 1057-1070 (2012); 434, 2803-2813 (2013);
*    Astron. Nachrichten., 329, 54 (2008); 330, 55 (2009); 331, 286 (2010);
*    332, 508 (2011); 335, 817 (2014); 336, 388 (2016); 338, 74 (2017);
*    339, 571 (2018); 341, 441-452 (2020), 342, 865 (2021); 343, 24008 (2022);
*    344, 30112 (2023); 346, 70000 (2025)>
*   =2024yCat.1382....0S
*   =2005MNRAS.357.1255S
*   +2006MNRAS.367.1170S
*   +2007MNRAS.374..965S
*   +2008AN....329...54S
*   +2008MNRAS.387..772P
*   +2009AN....330...55S
*   +2009MNRAS.395..907P
*   +2010AN....331..286S
*   +2010MNRAS.407.1913P
*   +2011AN....332..508S
*   +2012MNRAS.422.1057P
*   +2013MNRAS.434.2803S
*   +2014AN....335..817P
*   +2015AN....336..388S
*   +2017AN....338...74P
*   +2018AN....339..571S
*   +2020AN....341..441G
*   +2021AN....342..865G
*   +2022AN....34324008G
*   +2023AN....34430112P
*   +2025AN....34670000S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'calern.dat'	! Table of speckle measurements and O-C residuals
                                 with PISCO in Calerne, in 2015-2016

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

      character*7   Ref         ! Paper reference code (G1)
      character*10  WDS         ! WDS name (HHMMm+DDMM)
      character*14  Name        ! Other name
      character*8   ADS         ! ADS number
      real*8        Epoch       ! (yr) Epoch
      character*2   Filter      ! [BIRVW RL -] Filter
      integer*4     f           ! (mm) Focal length of the eyepiece used for
*                                       magnifying the image
      real*4        rho         ! (arcsec) ?=- Angular separation
      real*4        e_rho       ! (arcsec) ?=- Angular separation error
      real*4        theta       ! (deg) ?=- Position angle (1)
      character*1   n_theta     ! [*] Note on theta (2)
      real*4        e_theta     ! (deg) ?=- Position angle error
      character*22  Notes       ! Notes
      character*30  Orbit       ! Orbit reference, see reference paper
      real*4        Drho_O_C    ! (arcsec) ? O-C residual in rho
      character*1   f_Drho_O_C  ! [)] ) when Drho(O-C) is an ephemerid value
      real*4        Dtheta_O_C  ! (deg) ? O-C residual in theta
      character*1   n_Dtheta_O_C ! [Q] Note on Dtheta(O-C) (3)
      character*1   f_Dtheta_O_C ! [)] ) when Dtheta(O-C) is an ephemerid
*                                       value
*Note (1): North corresponding to theta=0{deg} and the East to theta=90{deg}.
*Note (2): * indicates that the position angle could be determined without
*     the 180{deg} ambiguity.
*Note (3): Q when quadrants of the measurements were not in agreement with
*     those used for the orbits.

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

C  Declarations for 'calern-2.dat'	! Table of speckle measurements and O-C residuals
                                 with PISCO in Calerne, in 2017-2018
                                 (added on 18-Sep-2025)

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

      character*8   Ref_1       ! Paper reference code (G1)
      character*10  WDS_1       ! WDS name (HHMMm+DDMM)
      character*12  Name_1      ! Other name
      real*8        Epoch_1     ! (yr) [2017.02/2018.97] Epoch
      character*2   Filter_1    ! [RVW RL] Filter
      integer*4     f_1         ! (mm) Focal length of the eyepiece used for
*                                       magnifying the image
      real*4        rho_1       ! (arcsec) ?=- Angular separation
      real*4        e_rho_1     ! (arcsec) ?=- Angular separation error
      real*4        theta_1     ! (deg) ?=- Position angle (1)
      character*1   n_theta_1   ! [*] Note on theta (2)
      real*4        e_theta_1   ! (deg) ?=- Position angle error
      character*2   Notes_1     ! Notes
      character*8   Orbit_1     ! Orbit reference, see reference paper
      real*4        Drho_O_C_1  ! ?=- O-C residual in rho
      real*4        Dtheta_O_C_1 ! ? O-C residual in theta
      character*1   n_Dtheta_O_C_1 ! [Q] Note on Dtheta(O-C) (3)
      integer*4     Grade       ! [1/5]? Grade
*Note (1): North corresponding to theta=0{deg} and the East to theta=90{deg}.
*Note (2): * indicates that the position angle could be determined without
*     the 180{deg} ambiguity.
*Note (3): Q when quadrants of the measurements were not in agreement with
*     those used for the orbits.

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

C  Declarations for 'merate.dat'	! Table of speckle measurements and O-C residuals
                                 with PISCO in Merate, in 2004-2014

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

      character*7   Ref_2       ! Paper reference code (G1)
      character*10  WDS_2       ! WDS name (HHMMm+DDMM)
      character*14  Name_2      ! Other name
      character*8   ADS_1       ! ADS number
      real*8        Epoch_2     ! (yr) Epoch
      character*2   Filter_2    ! [BIRVW RL -] Filter
      integer*4     f_2         ! (mm) Focal length of the eyepiece used for
*                                       magnifying the image
      real*4        rho_2       ! (arcsec) ?=- Angular separation
      real*4        e_rho_2     ! (arcsec) ?=- Angular separation error
      real*4        theta_2     ! (deg) ?=- Position angle (1)
      character*1   n_theta_2   ! [*] Note on theta (2)
      real*4        e_theta_2   ! (deg) ?=- Position angle error
      character*22  Notes_2     ! Notes
      character*30  Orbit_2     ! Orbit reference, see reference paper
      real*4        Drho_O_C_1  ! (arcsec) ? O-C residual in rho
      character*1   f_Drho_O_C_1 ! [)] ) when Drho(O-C) is an ephemerid value
      real*4        Dtheta_O_C_1 ! (deg) ? O-C residual in theta
      character*1   n_Dtheta_O_C_1 ! [Q] Note on Dtheta(O-C) (3)
      character*1   f_Dtheta_O_C_1 ! [)] ) when Dtheta(O-C) is an ephemerid
*                                       value
*Note (1): North corresponding to theta=0{deg} and the East to theta=90{deg}.
*Note (2): * indicates that the position angle could be determined without
*     the 180{deg} ambiguity.
*Note (3): Q when quadrants of the measurements were not in agreement with
*     those used for the orbits.

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

C  Declarations for 'nice-1.dat'	! Table of speckle measurements and O-C residuals
                                 with published orbits in 2009-2010

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

      character*6   Ref_3       ! Paper reference code (G1)
      character*10  WDS_3       ! WDS name (HHMMm+DDMM)
      character*14  WDSnew      ! New WDS name (HHMMSSs+DDMMSS)
      character*13  Name_3      ! Name
      real*4        mA          ! (mag) Magnitude of A component
      real*4        mB          ! (mag) ? Magnitude of B component
      character*8   BD          ! BD number
      real*8        Epoch_3     ! (yr) Epoch
      real*4        theta_3     ! (deg) ? Position angle
      character*1   u_theta     ! Uncertainty flag on theta
      real*4        rho_3       ! (arcsec) ? Angular separation
      character*1   u_rho       ! Uncertainty flag on rho
      character*1   l_Dmf       ! Limit flag on Dmf
      real*4        Dmf         ! ? Measured difference of magnitudes
*                                        between the two components
      character*1   u_Dmf       ! Uncertainty flag on Dmf
      character*9   Notes1      ! Notes (1)
      character*47  Notes2      ! More notes
      character*14  Orbit_3     ! Orbit reference, see reference paper
      real*4        Drho_O_C_1  ! (arcsec) ? O-C residual in rho
      real*4        Dtheta_O_C_1 ! (deg) ? O-C residual in theta
      character*1   n_Dtheta_O_C_1 ! [Q] Note on Dtheta(O-C) (2)
*Note (1): Notes as:
*   S = Single star (i.e., not seen as double),
*  NR = Non-Resolved, although seen as double, and in some cases an estimate of
*        the upper limit for the separation in arcseconds
*        (e.g. < 0.16 for 00122+4647).
*  ND = New Double.
*   : = following one measurement indicates that measurement has a large
*        uncertainty.
*   ! = was added to some comments to underline those comments
*        (i.e., the observations clearly showed them).
*  ly = difference of magnitudes obtained from the Lucky Imaging method
* DVA = difference of magnitudes obtained from the DVA method
*Note (2): Q when quadrants of the measurements were not in agreement with
* those used for the orbits.

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

C  Declarations for 'nice-2.dat'	! Table of speckle measurements obtained with
                                 PISCO2 in 2011-2017 and O-C residuals with
                                 published orbits

      integer*4 nr__4
      parameter (nr__4=17688)	! Number of records
      character*131 ar__4  	! Full-size record

      character*6   Ref_4       ! Paper reference code (G1)
      character*12  WDS_4       ! WDS name (HHMMm+DDMM)
      character*22  Name_4      ! Name
      real*8        Epoch_4     ! (yr) Epoch
      integer*4     Bin         ! [0/5]? Binning factor used by the detector
*                                       when acquiring the image
      real*4        rho_4       ! (arcsec) ?=- Angular separation
      real*4        e_rho_3     ! (arcsec) ?=- Angular separation error
      real*8        theta_4     ! (deg) ?=- Position angle, measured from the
*                                       North and positive to the East
      character*1   n_theta_3   ! [*] Note on theta (1)
      real*4        e_theta_3   ! (deg) ?=- Position angle error
      real*4        Dm          ! ? Measured difference of magnitudes
*                                        between the two components
      character*16  Notes_3     ! Notes (2)
      character*10  Orbit_4     ! Orbit reference, see reference paper
      real*4        Drho_O_C_1  ! (arcsec) ? O-C residual in rho
      real*4        Dtheta_O_C_1 ! (deg) ? O-C residual in theta
      character*1   n_Dtheta_O_C_1 ! [Q] Note on Dtheta(O-C) (3)
      integer*4     Grade_1     ! [1/5]? Grade of the orbit
*Note (1): * when we could determine the quadrants of the measurements, i.e.,
*   when our observations allowed us to solve the 180{deg} ambiguity of the
*   autocorrelation frames.
*Note (2): Notes as:
*   ND = new double
*   NR = not resolved
*   LY = LuckY imaging,
*   NDg = new double, found by R. Gili
*   NDp = new double, found by us
*Note (3): Q when quadrants of the measurements were not in agreement with those
*   used for the orbits.

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

C  Loading file 'calern.dat'	! Table of speckle measurements and O-C residuals
*                                 with PISCO in Calerne, in 2015-2016

C  Format for file interpretation

    1 format(
     +  A7,1X,A10,1X,A14,1X,A8,1X,F8.3,1X,A2,1X,I2,1X,F5.3,1X,F5.3,1X,
     +  F5.1,1X,A1,1X,F3.1,1X,A22,A30,3X,F5.2,A1,2X,F5.1,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'calern.dat')
      write(6,*) '....Loading file: calern.dat'
      do i__=1,1235
        read(1,'(A152)')ar__
        read(ar__,1)
     +  Ref,WDS,Name,ADS,Epoch,Filter,f,rho,e_rho,theta,n_theta,
     +  e_theta,Notes,Orbit,Drho_O_C,f_Drho_O_C,Dtheta_O_C,
     +  n_Dtheta_O_C,f_Dtheta_O_C
        if (idig(ar__(59:63)).EQ.0) rho =  rNULL__
        if (idig(ar__(65:69)).EQ.0) e_rho =  rNULL__
        if (idig(ar__(71:75)).EQ.0) theta =  rNULL__
        if (idig(ar__(79:81)).EQ.0) e_theta =  rNULL__
        if(ar__(138:142) .EQ. '') Drho_O_C = rNULL__
        if(ar__(146:150) .EQ. '') Dtheta_O_C = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Ref,WDS,Name,ADS,Epoch,Filter,f,rho,e_rho,theta,n_theta,
     +  e_theta,Notes,Orbit,Drho_O_C,f_Drho_O_C,Dtheta_O_C,
     +  n_Dtheta_O_C,f_Dtheta_O_C
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'calern-2.dat'	! Table of speckle measurements and O-C residuals
*                                 with PISCO in Calerne, in 2017-2018
*                                 (added on 18-Sep-2025)

C  Format for file interpretation

    2 format(
     +  A8,1X,A10,1X,A12,1X,F8.3,1X,A2,1X,I2,1X,F5.3,1X,F5.3,1X,F5.1,
     +  1X,A1,1X,F3.1,1X,A2,1X,A8,1X,F5.2,1X,F5.1,A1,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'calern-2.dat')
      write(6,*) '....Loading file: calern-2.dat'
      do i__=1,1470
        read(1,'(A98)')ar__1
        read(ar__1,2)
     +  Ref_1,WDS_1,Name_1,Epoch_1,Filter_1,f_1,rho_1,e_rho_1,theta_1,
     +  n_theta_1,e_theta_1,Notes_1,Orbit_1,Drho_O_C_1,Dtheta_O_C_1,
     +  n_Dtheta_O_C_1,Grade
        if (idig(ar__1(49:53)).EQ.0) rho_1 =  rNULL__
        if (idig(ar__1(55:59)).EQ.0) e_rho_1 =  rNULL__
        if (idig(ar__1(61:65)).EQ.0) theta_1 =  rNULL__
        if (idig(ar__1(69:71)).EQ.0) e_theta_1 =  rNULL__
        if (idig(ar__1(85:89)).EQ.0) Drho_O_C_1 =  rNULL__
        if(ar__1(91:95) .EQ. '') Dtheta_O_C_1 = rNULL__
        if(ar__1(98:98) .EQ. '') Grade = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  Ref_1,WDS_1,Name_1,Epoch_1,Filter_1,f_1,rho_1,e_rho_1,theta_1,
     +  n_theta_1,e_theta_1,Notes_1,Orbit_1,Drho_O_C_1,Dtheta_O_C_1,
     +  n_Dtheta_O_C_1,Grade
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'merate.dat'	! Table of speckle measurements and O-C residuals
*                                 with PISCO in Merate, in 2004-2014

C  Format for file interpretation

    3 format(
     +  A7,1X,A10,1X,A14,1X,A8,1X,F8.3,1X,A2,1X,I2,1X,F5.3,1X,F5.3,1X,
     +  F5.1,1X,A1,1X,F3.1,1X,A22,A30,3X,F5.2,A1,2X,F5.1,A1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'merate.dat')
      write(6,*) '....Loading file: merate.dat'
      do i__=1,3502
        read(1,'(A152)')ar__2
        read(ar__2,3)
     +  Ref_2,WDS_2,Name_2,ADS_1,Epoch_2,Filter_2,f_2,rho_2,e_rho_2,
     +  theta_2,n_theta_2,e_theta_2,Notes_2,Orbit_2,Drho_O_C_1,
     +  f_Drho_O_C_1,Dtheta_O_C_1,n_Dtheta_O_C_1,f_Dtheta_O_C_1
        if (idig(ar__2(59:63)).EQ.0) rho_2 =  rNULL__
        if (idig(ar__2(65:69)).EQ.0) e_rho_2 =  rNULL__
        if (idig(ar__2(71:75)).EQ.0) theta_2 =  rNULL__
        if (idig(ar__2(79:81)).EQ.0) e_theta_2 =  rNULL__
        if(ar__2(138:142) .EQ. '') Drho_O_C_1 = rNULL__
        if(ar__2(146:150) .EQ. '') Dtheta_O_C_1 = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  Ref_2,WDS_2,Name_2,ADS_1,Epoch_2,Filter_2,f_2,rho_2,e_rho_2,
     +  theta_2,n_theta_2,e_theta_2,Notes_2,Orbit_2,Drho_O_C_1,
     +  f_Drho_O_C_1,Dtheta_O_C_1,n_Dtheta_O_C_1,f_Dtheta_O_C_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'nice-1.dat'	! Table of speckle measurements and O-C residuals
*                                 with published orbits in 2009-2010

C  Format for file interpretation

    4 format(
     +  A6,1X,A10,1X,A14,1X,A13,1X,F5.2,1X,F5.2,1X,A8,1X,F8.3,1X,F5.1,
     +  A1,F6.3,A1,A1,F3.1,A1,4X,A9,1X,A47,1X,A14,F6.3,1X,F5.1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'nice-1.dat')
      write(6,*) '....Loading file: nice-1.dat'
      do i__=1,1873
        read(1,'(A184)')ar__3
        read(ar__3,4)
     +  Ref_3,WDS_3,WDSnew,Name_3,mA,mB,BD,Epoch_3,theta_3,u_theta,
     +  rho_3,u_rho,l_Dmf,Dmf,u_Dmf,Notes1,Notes2,Orbit_3,Drho_O_C_1,
     +  Dtheta_O_C_1,n_Dtheta_O_C_1
        if(ar__3(54:58) .EQ. '') mB = rNULL__
        if(ar__3(78:82) .EQ. '') theta_3 = rNULL__
        if(ar__3(84:89) .EQ. '') rho_3 = rNULL__
        if(ar__3(92:94) .EQ. '') Dmf = rNULL__
        if(ar__3(172:177) .EQ. '') Drho_O_C_1 = rNULL__
        if(ar__3(179:183) .EQ. '') Dtheta_O_C_1 = rNULL__
c    ..............Just test output...........
        write(6,4)
     +  Ref_3,WDS_3,WDSnew,Name_3,mA,mB,BD,Epoch_3,theta_3,u_theta,
     +  rho_3,u_rho,l_Dmf,Dmf,u_Dmf,Notes1,Notes2,Orbit_3,Drho_O_C_1,
     +  Dtheta_O_C_1,n_Dtheta_O_C_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'nice-2.dat'	! Table of speckle measurements obtained with
*                                 PISCO2 in 2011-2017 and O-C residuals with
*                                 published orbits

C  Format for file interpretation

    5 format(
     +  A6,1X,A12,1X,A22,1X,F8.3,1X,I1,1X,F6.3,1X,F5.3,1X,F7.2,A1,1X,
     +  F4.1,3X,F4.2,1X,A16,1X,A10,1X,F6.3,1X,F5.1,A1,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'nice-2.dat')
      write(6,*) '....Loading file: nice-2.dat'
      do i__=1,17688
        read(1,'(A131)')ar__4
        read(ar__4,5)
     +  Ref_4,WDS_4,Name_4,Epoch_4,Bin,rho_4,e_rho_3,theta_4,
     +  n_theta_3,e_theta_3,Dm,Notes_3,Orbit_4,Drho_O_C_1,
     +  Dtheta_O_C_1,n_Dtheta_O_C_1,Grade_1
        if(ar__4(53:53) .EQ. '') Bin = iNULL__
        if (idig(ar__4(55:60)).EQ.0) rho_4 =  rNULL__
        if (idig(ar__4(62:66)).EQ.0) e_rho_3 =  rNULL__
        if (idig(ar__4(68:74)).EQ.0) theta_4 =  rNULL__
        if (idig(ar__4(77:80)).EQ.0) e_theta_3 =  rNULL__
        if(ar__4(84:87) .EQ. '') Dm = rNULL__
        if(ar__4(117:122) .EQ. '') Drho_O_C_1 = rNULL__
        if(ar__4(124:128) .EQ. '') Dtheta_O_C_1 = rNULL__
        if(ar__4(131:131) .EQ. '') Grade_1 = iNULL__
c    ..............Just test output...........
        write(6,5)
     +  Ref_4,WDS_4,Name_4,Epoch_4,Bin,rho_4,e_rho_3,theta_4,
     +  n_theta_3,e_theta_3,Dm,Notes_3,Orbit_4,Drho_O_C_1,
     +  Dtheta_O_C_1,n_Dtheta_O_C_1,Grade_1
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