FORTRAN Generation
(/./ftp/cats/J/ApJ/788/105)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/788/105 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-20
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/788/105     XSTPS RR Lyrae in the north Galactic cap     (Faccioli+, 2014)
*================================================================================
*RR Lyrae in XSTPS: the halo density profile in the north Galactic cap.
*    Faccioli L., Smith M.C., Yuan H.-B., Zhang H.-H., Liu X.-W., Zhao H.-B.,
*    Yao J.-S.
*   <Astrophys. J., 788, 105 (2014)>
*   =2014ApJ...788..105F    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Basic data for the RRL candidates

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

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

      integer*4     ID          ! [1/318] RRL candidate identifier
      integer*4     RAh         ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm         ! (min) Minute of Right Ascension (J2000)
      real*4        RAs         ! (s) Second of Right Ascension (J2000)
      integer*4     DEd         ! (deg) Degree of Declination (J2000)
      integer*4     DEm         ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs         ! (arcsec) Arcsecond of Declination (J2000)
      integer*4     o__imag_    ! Number of epochs used in <imag>
      real*4        v_imag_     ! (mag) Mean i band magnitude across epochs (1)
      real*4        e__imag_    ! (mag) Uncertainty in <imag> (2)
      real*4        sd_imag_    ! (mag) ?=-99 Standard deviation in <imag> (3)
      integer*4     o__rmag_    ! ?=-99 Number of epochs used in <rmag> (4)
      real*4        v_rmag_     ! (mag) ?=-99 Mean r band magnitude across epochs (1)
      real*4        e__rmag_    ! (mag) ?=-99 Uncertainty in <rmag> (2)
      real*4        sd_rmag_    ! (mag) ?=-99 Standard deviation in <rmag> (3)
      integer*4     o__gmag_    ! ?=-99 Number of epochs used in <gmag> (4)
      real*4        v_gmag_     ! (mag) ?=-99 Mean g band magnitude across epochs (1)
      real*4        e__gmag_    ! (mag) ?=-99 Uncertainty in <gmag> (2)
      real*4        sd_gmag_    ! (mag) ?=-99 Standard deviation in <gmag> (3)
*Note (1): All magnitudes are corrected for extincion using the
*          Schlegel,Finkbeiner,Davis maps (Schlegel,Finkbeiner,Davis,
*          1998ApJ...500..525S)
*Note (2): Quadrature sum of single uncertainties.
*Note (3): A value of -99 means 1 epoch.
*Note (4): A value of -99 means no (g|r) data.

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

C  Declarations for 'table5.dat'	! SDSS matching information for the 318 RRL
                                in the sample

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

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

      integer*4     ID_1        ! [1/318] RRL candidate identifier
      integer*4     RAh_1       ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm_1       ! (min) Minute of Right Ascension (J2000)
      real*4        RAs_1       ! (s) Second of Right Ascension (J2000)
      integer*4     DEd_1       ! (deg) Degree of Declination (J2000)
      integer*4     DEm_1       ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs_1       ! (arcsec) Arcsecond of Declination (J2000)
      real*4        umag        ! (mag) SDSS u band PSF magnitude (1)
      real*4        e_umag      ! (mag) Uncertainty in umag
      real*4        gmag        ! (mag) SDSS g band PSF magnitude (1)
      real*4        e_gmag      ! (mag) Uncertainty in gmag
      real*4        rmag        ! (mag) SDSS r band PSF magnitude (1)
      real*4        e_rmag      ! (mag) Uncertainty in rmag
      real*4        imag        ! (mag) SDSS i band PSF magnitude (1)
      real*4        e_imag      ! (mag) Uncertainty in imag
      real*4        zmag        ! (mag) SDSS z band PSF magnitude (1)
      real*4        e_zmag      ! (mag) Uncertainty in zmag
*Note (1): All data in the table come from SDSS "Star" table, Data Release 7
*          (Cat. II/294)

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

C  Declarations for 'table6.dat'	! VSX catalog matches

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

      integer*4     ID_2        ! [2/318] RRL candidate identifier
      character*22  VSX         ! VSX catalog identifier (Cat. B/vsx)
      character*4   Type        ! VSX catalog type (RRAB, EW, RRC)
      real*8        Period      ! (d) VSX catalog period

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

C  Declarations for 'table7.dat'	! Efficiencies of the 318 RRLs in the sample

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

      integer*4     ID_3        ! [1/318] RRL candidate identifier
      real*4        Eff         ! Detection efficiency

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

C  Declarations for 'table8.dat'	! Periods for the 265 RRL candidates in
                                the sample with at least 12 observations

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

      integer*4     ID_4        ! [13/318] RRL candidate identifier (1)
      real*8        Period_1    ! (d) Period
      real*4        Lambda      ! Lambda; see text (2)
      character*31  Epochs      ! Epoch excluded plus comments (3)
*Note (1): The list includes objects classified as "Interlopers" upon visual
*          inspection or "Delta Scuti" if they have a period in the 0.05-0.2d
*          range more significant than the one quoted here (unless reported as
*          RRL by either VSX or CDS), or "Double Period" if the folded light
*          curves shows that the period quoted here is double the true one.
*Note (2): Objects with Lambda<4 are not considered truly periodic and
*          the quoted period is meaningless, unless reported as RRL by VSX/CDS.
*Note (3): Epochs are labelled from 0 to N-1 for an object with N observations.

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

C  Declarations for 'table9.dat'	! Light curves for the 318 RRLs in the sample

      integer*4 nr__5
      parameter (nr__5=8528)	! Number of records
      character*48 ar__5  	! Full-size record

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

      integer*4     ID_5        ! [1/318] RRL candidate identifier
      character*1   Band        ! [gri] Observational band
      real*8        MJD         ! (d) Modfied Julian Date
      real*4        mag         ! (mag) Observed XSTPS magnitude in Band
      real*4        e_mag       ! (mag) Uncertainty in mag
      integer*4     RAh_2       ! (h) Hour of Right Ascension (J2000)
      integer*4     RAm_2       ! (min) Minute of Right Ascension (J2000)
      real*4        RAs_2       ! (s) Second of Right Ascension (J2000)
      integer*4     DEd_2       ! (deg) Degree of Declination (J2000)
      integer*4     DEm_2       ! (arcmin) Arcminute of Declination (J2000)
      real*4        DEs_2       ! (arcsec) Arcsecond of Declination (J2000)

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

C  Declarations for 'table10.dat'	! Heliocentric and galactocentric distances for
                                the 318 RRLs in the sample

      integer*4 nr__6
      parameter (nr__6=318)	! Number of records
      character*48 ar__6  	! Full-size record

      integer*4     ID_6        ! [1/318] RRL candidate identifier
      real*8        HDist       ! (kpc) Heliocentric Distance
      real*8        e_HDist     ! (kpc) Uncertainty in HDist
      real*8        GDist       ! (kpc) Galactocentric Distance
      real*8        e_GDist     ! (kpc) Uncertainty in GDist

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

C  Loading file 'table1.dat'	! Basic data for the RRL candidates

C  Format for file interpretation

    1 format(
     +  I3,1X,I2,1X,I2,1X,F6.3,1X,I2,1X,I2,1X,F5.2,1X,I2,1X,F5.2,1X,
     +  F4.2,1X,F4.2,1X,I3,1X,F6.2,1X,F6.2,1X,F6.2,1X,I3,1X,F6.2,1X,
     +  F6.2,1X,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,318
        read(1,'(A97)')ar__
        read(ar__,1)
     +  ID,RAh,RAm,RAs,DEd,DEm,DEs,o__imag_,v_imag_,e__imag_,sd_imag_,
     +  o__rmag_,v_rmag_,e__rmag_,sd_rmag_,o__gmag_,v_gmag_,e__gmag_,
     +  sd_gmag_
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
c    ..............Just test output...........
        write(6,1)
     +  ID,RAh,RAm,RAs,DEd,DEm,DEs,o__imag_,v_imag_,e__imag_,sd_imag_,
     +  o__rmag_,v_rmag_,e__rmag_,sd_rmag_,o__gmag_,v_gmag_,e__gmag_,
     +  sd_gmag_
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table5.dat'	! SDSS matching information for the 318 RRL
*                                in the sample

C  Format for file interpretation

    2 format(
     +  I3,1X,I2,1X,I2,1X,F6.3,1X,I2,1X,I2,1X,F5.2,1X,F5.2,1X,F4.2,1X,
     +  F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table5.dat')
      write(6,*) '....Loading file: table5.dat'
      do i__=1,318
        read(1,'(A83)')ar__1
        read(ar__1,2)
     +  ID_1,RAh_1,RAm_1,RAs_1,DEd_1,DEm_1,DEs_1,umag,e_umag,gmag,
     +  e_gmag,rmag,e_rmag,imag,e_imag,zmag,e_zmag
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
c    ..............Just test output...........
        write(6,2)
     +  ID_1,RAh_1,RAm_1,RAs_1,DEd_1,DEm_1,DEs_1,umag,e_umag,gmag,
     +  e_gmag,rmag,e_rmag,imag,e_imag,zmag,e_zmag
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table6.dat'	! VSX catalog matches

C  Format for file interpretation

    3 format(I3,1X,A22,1X,A4,1X,F8.6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table6.dat')
      write(6,*) '....Loading file: table6.dat'
      do i__=1,114
        read(1,'(A40)')ar__2
        read(ar__2,3)ID_2,VSX,Type,Period
c    ..............Just test output...........
        write(6,3)ID_2,VSX,Type,Period
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table7.dat'	! Efficiencies of the 318 RRLs in the sample

C  Format for file interpretation

    4 format(I3,1X,F5.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table7.dat')
      write(6,*) '....Loading file: table7.dat'
      do i__=1,318
        read(1,'(A9)')ar__3
        read(ar__3,4)ID_3,Eff
c    ..............Just test output...........
        write(6,4)ID_3,Eff
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table8.dat'	! Periods for the 265 RRL candidates in
*                                the sample with at least 12 observations

C  Format for file interpretation

    5 format(I3,1X,F8.6,1X,F6.2,1X,A31)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table8.dat')
      write(6,*) '....Loading file: table8.dat'
      do i__=1,265
        read(1,'(A51)')ar__4
        read(ar__4,5)ID_4,Period_1,Lambda,Epochs
c    ..............Just test output...........
        write(6,5)ID_4,Period_1,Lambda,Epochs
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table9.dat'	! Light curves for the 318 RRLs in the sample

C  Format for file interpretation

    6 format(
     +  I3,1X,A1,1X,F9.3,1X,F5.2,1X,F4.2,1X,I2,1X,I2,1X,F4.1,1X,I2,1X,
     +  I2,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table9.dat')
      write(6,*) '....Loading file: table9.dat'
      do i__=1,8528
        read(1,'(A48)')ar__5
        read(ar__5,6)
     +  ID_5,Band,MJD,mag,e_mag,RAh_2,RAm_2,RAs_2,DEd_2,DEm_2,DEs_2
        RAdeg_2 = rNULL__
        DEdeg_2 = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_2 .GT. -180) RAdeg_2=RAh_2*15.
        if(RAm_2 .GT. -180) RAdeg_2=RAdeg_2+RAm_2/4.
        if(RAs_2 .GT. -180) RAdeg_2=RAdeg_2+RAs_2/240.
        if(DEd_2 .GE. 0) DEdeg_2=DEd_2
        if(DEm_2 .GE. 0) DEdeg_2=DEdeg_2+DEm_2/60.
        if(DEs_2 .GE. 0) DEdeg_2=DEdeg_2+DEs_2/3600.
c    ..............Just test output...........
        write(6,6)
     +  ID_5,Band,MJD,mag,e_mag,RAh_2,RAm_2,RAs_2,DEd_2,DEm_2,DEs_2
        write(6,'(6H Pos: 2F8.4)') RAdeg_2,DEdeg_2
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table10.dat'	! Heliocentric and galactocentric distances for
*                                the 318 RRLs in the sample

C  Format for file interpretation

    7 format(I3,1X,F10.7,1X,F10.8,1X,F10.7,1X,F11.9)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table10.dat')
      write(6,*) '....Loading file: table10.dat'
      do i__=1,318
        read(1,'(A48)')ar__6
        read(ar__6,7)ID_6,HDist,e_HDist,GDist,e_GDist
c    ..............Just test output...........
        write(6,7)ID_6,HDist,e_HDist,GDist,e_GDist
c    .......End.of.Just test output...........
      end do
      close(1)

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