FORTRAN Generation
(/./ftp/cats/J/ApJS/246/15)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJS/246/15 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-Aug-16
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/ApJS/246/15   K2 periodic variables in M35 & NGC2158   (Soares-Furtado+, 2020)
*================================================================================
*A catalog of periodic variables in open clusters M35 and NGC 2158.
*    Soares-Furtado M., Hartman J.D., Bhatti W., Bouma L.G., Barna T., Bakos G.A.
*   <Astrophys. J. Suppl. Ser., 246, 15 (2020)>
*   =2020ApJS..246...15S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table5.dat'	! The periodic variable catalog obtained from
                              sources in the K2 Campaign-0 super stamp

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

C  J2000 position composed of: RAdeg DEdeg
      character*16  ID          ! HAT source identifier (1)
      character*10  UCAC4       ! UCAC catalog identifier
      real*8        RAdeg       ! (deg) [91.48/92.71] Right Ascension (J2000)
      real*8        DEdeg       ! (deg) [23.3/24.7] Declination (J2000)
      real*4        Kpmag       ! (mag) [9.5/18]?=0 Kepler magnitude (2)
      real*8        Per         ! (d) [0.03/23.7] Best determined period
*                                   from periodogram analysis
      real*8        Amp         ! (mag) [0.0002/0.3] Amplitude of the magnitude (3)
      character*9   Class       ! Variable classification (4)
      character*7   sClass      ! Variable subclassification identifier (5)
      integer*4     Blend       ! [0/1] Ambiguous blend boolean flag
*                                    (1=blend; 0=identified primary variable)
      real*8        LSP1        ! (d) [-1.0/24.4] 1st Lomb-Scargle peak period
      character*8   LSFAP1      ! (0/10) 1st peak period formal false alarm
*                                   probability
      real*4        LSSNR1      ! [-1/4549] 1st peak period
*                                   signal-to-noise ratio
      real*8        LSP2        ! (d) [-1/25] 2nd Lomb-Scargle peak period
      character*8   LSFAP2      ! (8.4e-155/10) 2nd peak period formal
*                                   false alarm probability
      real*4        LSSNR2      ! [-1/2107] 2nd peak period
*                                   signal-to-noise ratio
      real*8        LSP3        ! (d) [-1/23] 3rd Lomb-Scargle peak period
      character*7   LSFAP3      ! (2.1e-84/10) 3rd peak period formal
*                                   false alarm probability
      real*4        LSSNR3      ! [-1/0.2] 3rd peak period signal-to-noise ratio
      real*8        PDM1        ! (d) [0.03/32] 1st phase dispersion minimization
*                                   (PDM) peak period
      real*8        PDM2        ! (d) [0.03/32] 2nd PDM peak period
      real*8        PDM3        ! (d) [0.03/32] 3rd PDM peak period
      real*8        BLSP1       ! (d) [0.15/12]? 1st Box-fitting Least Squares
*                                   (BLS) peak period (6)
      real*8        BLS1Dur     ! (d) [0.01/0.8]? 1st BLS peak period
*                                   transit duration
      real*8        BLS1Dpth    ! (mag) [-0.3/0.08]? 1st BLS peak period
*                                   transit depth (7)
      real*8        BLSP2       ! (d) [0.06/15.3]? 2nd BLS peak period (6)
      real*8        BLS2Dur     ! (d) [0.009/1]? 2nd BLS peak period
*                                   transit duration
      real*8        BLS2Dpth    ! (mag) [-0.3/0.006]? 2nd BLS peak period
*                                   transit depth (7)
      real*8        BLSP3       ! (d) [0.05/15.2]? 3rd BLS peak period
      real*8        BLS3Dur     ! (d) [0.009/1]? 3rd BLS peak period
*                                   transit duration
      real*4        BLS3Dpth    ! (mag) [-0.3/0.006]? 3rd BLS peak period
*                                   transit depth (7)
      real*4        Jmag        ! (mag) [7.8/20] 2MASS J band magnitude from UCAC
      real*4        e_Jmag      ! (mag) [0/1] Error in Jmag
      real*4        Hmag        ! (mag) [7.2/20] 2MASS H band magnitude from UCAC
      real*4        e_Hmag      ! (mag) [0/1] Error in Hmag
      real*4        Ksmag       ! (mag) [7/20] 2MASS Ks band magnitude from UCAC
      real*4        e_Ksmag     ! (mag) [0/1] Error in Ksmag
      real*4        Bmag        ! (mag) [9.9/19.7]?=999 B band magnitude (8)
      real*4        Vmag        ! (mag) [9.6/18.7]?=999 V band magnitude (8)
      real*4        Imag        ! (mag) [8.9/17]?=999 I band magnitude (8)
      integer*8     GaiaID      ! ? Designated Gaia DR2 identifier for source
*                                   match
      real*8        Dist1       ! (pc) [146.9/48310]? Minimum source distance d1 (9)
      real*8        Dist2       ! (pc) [177.7/222223]? Maximum source distance d2 (9)
      real*4        Teff        ! (K) [3642/9159]? Gaia DR2 effective
*                                   temperature estimate
      real*4        e_Teff      ! (K) [3498/8907]? Lower uncertainty in Teff (10)
      real*4        E_Teff_1    ! (K) [3890/9283]? Upper uncertainty in Teff (10)
      real*4        Rad         ! (Rsun) [0.5/135.1]? Gaia DR2 radius estimate
      real*4        e_Rad       ! (Rsun) [0.4/118.4]? Lower uncertainty in Rad (10)
      real*4        E_Rad_1     ! (Rsun) [0.6/143.8]? Upper uncertainty in Rad (10)
      real*4        Lum         ! (Lsun) [0.1/2894.2]? Gaia DR2 luminosity estimate
      real*4        e_Lum       ! (Lsun) [0.1/2736]? Lower uncertainty in Lum (10)
      real*4        E_Lum_1     ! (Lsun) [0.1/3052.5]? Upper uncertainty in Lum (10)
      real*4        E_B_V       ! (mag) [0.4/0.9] Schlafly & Finkbeiner
*                                   2011ApJ...737..103S E(B-V) value
      real*8        pmRA        ! (mas/yr) [-24/83]? Gaia DR2 proper motion along RA
      real*8        pmDE        ! (mas/yr) [-57/3.3]? Gaia DR2 proper motion along DE
      real*4        P1M35       ! [10/100]? M35 membership probability from Gaia
*                                   (Cantat-Gaudin+ 2018, J/A+A/618/A93)
      real*4        P2M35       ! [0/98]? M35 membership probability from
*                                   Bouy+ 2015, J/A+A/575/A120 (11)
      real*4        P3M35       ! [0/100]? M35 membership probability from PM in
*                                   Kharchenko+, 2013, J/A+A/558/A53 (11)
      real*4        P4M35       ! [0/100]? M35 membership probability from CMD
*                                   in Kharchenko+, 2013, J/A+A/558/A53
      real*4        P1N2158     ! [10/100]? NGC2158 membership probability from
*                                   Gaia (Cantat-Gaudin+ 2018, J/A+A/618/A93)
      real*4        P2N2158     ! [0/99]? NGC2158 membership probability from
*                                   Dias+  2006, J/A+A/446/949 (11)
      real*4        P3N2158     ! [0/100]? NGC2158 membership probability from
*                                   PM in Kharchenko+, 2013, J/A+A/558/A53 (11)
      real*4        P4N2158     ! [0/100]? NGC2158 membership probability from
*                                   CMD in Kharchenko+, 2013, J/A+A/558/A53
      real*4        PM35        ! [0/100]? Overall designated M35 membership
*                                   probability (12)
      real*4        PN2158      ! [0/95.5] Overall designated NGC 2158
*                                   membership probability (12)
      integer*4     Match1      ! [495/61104]? Libralato+ 2016MNRAS.456.1137L
*                                   source catalog match
      integer*4     Match2      ! [3/519]? Nardiello+ 2015, J/MNRAS/447/3536
*                                   source catalog match
*                                   (<[NBN2015] NNN> in Simbad)
      integer*4     Match3      ! [1/438]? Meibom+ 2009, J/ApJ/695/679
*                                   source catalog match
*                                   (<Cl* NGC 2168 MMS NNN> in Simbad)
      character*3   Match4      ! Mochejska+ 2004AJ....128..312M
*                                   source catalog match
*                                   (<Cl* NGC 2158 MSS VNN> in Simbad)
      character*9   Match5      ! VSX catalog (see B/vsx) source match
*Note (1): Source identifier as provided by the Hungarian-made Automated
*          Telescope Network, also known as the kepid in the K2CO LC dataset.
*          If the HATID was unavailable, the source was identified solely using
*          the UCAC source ID.
*Note (2): As computed using 2MASS catalog values for sdssg and sdssr.
*          Calculation follows the hierarchical scheme outlined in the Barbara
*          A. Mikulski Archive for Space Telescopes (MAST).
*Note (3): (maximum peak value - minimum peak value) calculated after fitting an
*          order-3 Fourier series to the differential magnitude time series.
*Note (4): Classification as follows:
*    Transit   = candidate transiting exoplanet (2 occurrences);
*    EB        = eclipsing binary (44 occurrences);
*    Pulsating = 251 occurrences;
*    Rotating  = 561 occurrences;
*    Misc      = a distinct class cannot be identified (285 occurrences).
*Note (5): This identifier can provide additional information for rotating and
*          pulsating variables. Possible subclassification labels include
*          Transit, EB, Cepheid, DScuti ({delta} Scuti pulsator), GDor
*          ({gamma} Doradus pulsator), SPB (slowly pulsating B-star), RotVar
*          (rotational variable of indeterminate type), and Misc
*          (indeterminate variable).
*Note (6): Values are only listed for candidate EB and transit sources.
*Note (7): For HAT-264-0105302 these blanks indicate infinite values.
*Note (8): From the UCAC4 catalog which is supplemented with data from 2MASS.
*Note (9): Derived from the Gaia DR2 absolute stellar parallax at the
*           reference epoch and the standard error of parallax.
*Note (10): This is the (16th|84th) percentile of the probability
*           distribution function.
*Note (11): Determined with proper motion measurement.
*Note (12): Employing the method described in Section 3.4. For NGC 2158 this
*           includes a King model fit to weight cluster membership according
*           to the radial distance from the cluster core.

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

C  Declarations for 'notes.dat'	! Comment on sources

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

      character*10  UCAC4_1     ! UCAC catalog identifier
      character*427 Note        ! Text of the note

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

C  Loading file 'table5.dat'	! The periodic variable catalog obtained from
*                              sources in the K2 Campaign-0 super stamp

C  Format for file interpretation

    1 format(
     +  A16,7X,A10,1X,F8.5,1X,F8.5,1X,F6.2,1X,F7.4,1X,F7.5,1X,A9,1X,
     +  A7,1X,I1,1X,F7.4,1X,A8,1X,F6.1,1X,F7.4,1X,A8,1X,F6.1,1X,F7.4,
     +  1X,A7,1X,F4.1,1X,F7.4,1X,F7.4,1X,F7.4,1X,F7.4,1X,F7.5,1X,F8.5,
     +  1X,F7.4,1X,F7.5,1X,F8.5,1X,F7.4,1X,F7.5,1X,E8.1,1X,F5.2,1X,
     +  F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F6.2,1X,F6.2,1X,F6.2,
     +  1X,I19,1X,F7.1,1X,F8.1,1X,F6.1,1X,F6.1,1X,F6.1,1X,F5.1,1X,
     +  F5.1,1X,F5.1,1X,F6.1,1X,F6.1,1X,F6.1,1X,F5.3,1X,F9.5,1X,F9.5,
     +  1X,F5.1,1X,F4.1,1X,F5.1,1X,F5.1,1X,F5.1,1X,F4.1,1X,F5.1,1X,
     +  F5.1,1X,F5.1,1X,F4.1,1X,I5,1X,I3,1X,I3,1X,A3,1X,A9)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,1143
        read(1,'(A524)')ar__
        read(ar__,1)
     +  ID,UCAC4,RAdeg,DEdeg,Kpmag,Per,Amp,Class,sClass,Blend,LSP1,
     +  LSFAP1,LSSNR1,LSP2,LSFAP2,LSSNR2,LSP3,LSFAP3,LSSNR3,PDM1,PDM2,
     +  PDM3,BLSP1,BLS1Dur,BLS1Dpth,BLSP2,BLS2Dur,BLS2Dpth,BLSP3,
     +  BLS3Dur,BLS3Dpth,Jmag,e_Jmag,Hmag,e_Hmag,Ksmag,e_Ksmag,Bmag,
     +  Vmag,Imag,GaiaID,Dist1,Dist2,Teff,e_Teff,E_Teff_1,Rad,e_Rad,
     +  E_Rad_1,Lum,e_Lum,E_Lum_1,E_B_V,pmRA,pmDE,P1M35,P2M35,P3M35,
     +  P4M35,P1N2158,P2N2158,P3N2158,P4N2158,PM35,PN2158,Match1,
     +  Match2,Match3,Match4,Match5
        if(ar__(189:195) .EQ. '') BLSP1 = rNULL__
        if(ar__(197:203) .EQ. '') BLS1Dur = rNULL__
        if(ar__(205:212) .EQ. '') BLS1Dpth = rNULL__
        if(ar__(214:220) .EQ. '') BLSP2 = rNULL__
        if(ar__(222:228) .EQ. '') BLS2Dur = rNULL__
        if(ar__(230:237) .EQ. '') BLS2Dpth = rNULL__
        if(ar__(239:245) .EQ. '') BLSP3 = rNULL__
        if(ar__(247:253) .EQ. '') BLS3Dur = rNULL__
        if(ar__(255:262) .EQ. '') BLS3Dpth = rNULL__
        if(ar__(318:336) .EQ. '') GaiaID = iNULL__
        if(ar__(338:344) .EQ. '') Dist1 = rNULL__
        if(ar__(346:353) .EQ. '') Dist2 = rNULL__
        if(ar__(355:360) .EQ. '') Teff = rNULL__
        if(ar__(362:367) .EQ. '') e_Teff = rNULL__
        if(ar__(369:374) .EQ. '') E_Teff_1 = rNULL__
        if(ar__(376:380) .EQ. '') Rad = rNULL__
        if(ar__(382:386) .EQ. '') e_Rad = rNULL__
        if(ar__(388:392) .EQ. '') E_Rad_1 = rNULL__
        if(ar__(394:399) .EQ. '') Lum = rNULL__
        if(ar__(401:406) .EQ. '') e_Lum = rNULL__
        if(ar__(408:413) .EQ. '') E_Lum_1 = rNULL__
        if(ar__(421:429) .EQ. '') pmRA = rNULL__
        if(ar__(431:439) .EQ. '') pmDE = rNULL__
        if(ar__(441:445) .EQ. '') P1M35 = rNULL__
        if(ar__(447:450) .EQ. '') P2M35 = rNULL__
        if(ar__(452:456) .EQ. '') P3M35 = rNULL__
        if(ar__(458:462) .EQ. '') P4M35 = rNULL__
        if(ar__(464:468) .EQ. '') P1N2158 = rNULL__
        if(ar__(470:473) .EQ. '') P2N2158 = rNULL__
        if(ar__(475:479) .EQ. '') P3N2158 = rNULL__
        if(ar__(481:485) .EQ. '') P4N2158 = rNULL__
        if(ar__(487:491) .EQ. '') PM35 = rNULL__
        if(ar__(498:502) .EQ. '') Match1 = iNULL__
        if(ar__(504:506) .EQ. '') Match2 = iNULL__
        if(ar__(508:510) .EQ. '') Match3 = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  ID,UCAC4,RAdeg,DEdeg,Kpmag,Per,Amp,Class,sClass,Blend,LSP1,
     +  LSFAP1,LSSNR1,LSP2,LSFAP2,LSSNR2,LSP3,LSFAP3,LSSNR3,PDM1,PDM2,
     +  PDM3,BLSP1,BLS1Dur,BLS1Dpth,BLSP2,BLS2Dur,BLS2Dpth,BLSP3,
     +  BLS3Dur,BLS3Dpth,Jmag,e_Jmag,Hmag,e_Hmag,Ksmag,e_Ksmag,Bmag,
     +  Vmag,Imag,GaiaID,Dist1,Dist2,Teff,e_Teff,E_Teff_1,Rad,e_Rad,
     +  E_Rad_1,Lum,e_Lum,E_Lum_1,E_B_V,pmRA,pmDE,P1M35,P2M35,P3M35,
     +  P4M35,P1N2158,P2N2158,P3N2158,P4N2158,PM35,PN2158,Match1,
     +  Match2,Match3,Match4,Match5
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'notes.dat'	! Comment on sources

C  Format for file interpretation

    2 format(A10,1X,A427)

C  Effective file loading

      open(unit=1,status='old',file=
     +'notes.dat')
      write(6,*) '....Loading file: notes.dat'
      do i__=1,201
        read(1,'(A438)')ar__1
        read(ar__1,2)UCAC4_1,Note
c    ..............Just test output...........
        write(6,2)UCAC4_1,Note
c    .......End.of.Just test output...........
      end do
      close(1)

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