FORTRAN Generation
(/./ftp/cats/J/ApJ/733/46)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/733/46 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 2024-Mar-29
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/733/46           Velocity measurements in Segue 1           (Simon+, 2011)
*================================================================================
*A complete spectroscopic survey of the Milky Way satellite Segue 1: the darkest
*galaxy.
*    Simon J.D., Geha M., Minor Q.E., Martinez G.D., Kirby E.N., Bullock J.S.,
*    Kaplinghat M., Strigari L.E., Willman B., Choi P.I., Tollerud E.J., Wolf J.
*   <Astrophys. J., 733, 46 (2011)>
*   =2011ApJ...733...46S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! Velocity measurements in Segue 1

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

      character*19  SDSS       (nr__) ! SDSS-DR5 identification (JHHMMSS.ss+DDMMSS.s)
      real*4        Vel        (nr__) ! (km/s) [-180.2/394.9] Heliocentric velocity
      real*4        e_Vel      (nr__) ! (km/s) [2.2/37.8] Uncertainty in Vel
      real*4        EW         (nr__) ! (0.1nm) Weighted sum of CaT line equivalent widths (1)
      real*4        e_EW       (nr__) ! (0.1nm) ?=-9.9 Uncertainty in EW (1)
      real*4        Rad        (nr__) ! (arcmin) [0/17.8] Radial distance from  Segue 1
      real*8        MJD        (nr__) ! (d) [54416.5/55240.5] Modified Julian Date of
*                                 observation
      real*4        gmag       (nr__) ! (mag) ? SDSS-DR5 g band magnitude
      real*4        rmag       (nr__) ! (mag) ? SDSS-DR5 r band magnitude
      real*4        imag       (nr__) ! (mag) [13.22/22]? SDSS-DR5 i band magnitude
      integer*4     Mm         (nr__) ! [0/1]? Member status (0=no, 1=member) (2)
      real*4        EMpr       (nr__) ! [0/1]? Member probability from the
*                                 EM (Expectation Maximization) algorithm (3)
      real*4        Bpr        (nr__) ! [0/1]? Bayesian member probability (4)
*Note (1): Where EW=0.5*EW_8498_+1.0*EW_8542_+0.6*EW_8662_. For a few stars
*     our spectra did not cover any of the CaT lines, so we did not measure
*     the EW (their velocities were determined with other features). These
*     objects are listed with equivalent widths of -9.9.
*Note (2): According to the criteria established at the beginning of Section 3.1.
*    1 = member;
*    0 = non-member.
*Note (3): The algorithm is run on the subset of stars whose colors and
*     magnitudes are consistent with membership, so photometric non-members
*     are indicated by probability -9.999.
*Note (4): From the Bayesian approach. As with the EM algorithm, these
*     calculations are run on the subset of stars whose colors and
*     magnitudes are consistent with membership, so photometric non-members
*     are indicated by probability -9.999.

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

C  Loading file 'table3.dat'	! Velocity measurements in Segue 1

C  Format for file interpretation

    1 format(
     +  4X,A19,1X,F6.1,1X,F4.1,1X,F4.1,1X,F4.1,1X,F4.1,1X,F9.3,1X,
     +  F5.2,1X,F5.2,1X,F5.2,1X,I1,1X,F6.3,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,522
        read(1,'(A94)')ar__
        read(ar__,1)
     +  SDSS(i__),Vel(i__),e_Vel(i__),EW(i__),e_EW(i__),Rad(i__),
     +  MJD(i__),gmag(i__),rmag(i__),imag(i__),Mm(i__),EMpr(i__),
     +  Bpr(i__)
        if(ar__(62:66) .EQ. '') gmag(i__) = rNULL__
        if(ar__(68:72) .EQ. '') rmag(i__) = rNULL__
        if(ar__(74:78) .EQ. '') imag(i__) = rNULL__
        if(ar__(80:80) .EQ. '') Mm(i__) = iNULL__
        if(ar__(82:87) .EQ. '') EMpr(i__) = rNULL__
        if(ar__(89:94) .EQ. '') Bpr(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  SDSS(i__),Vel(i__),e_Vel(i__),EW(i__),e_EW(i__),Rad(i__),
     +  MJD(i__),gmag(i__),rmag(i__),imag(i__),Mm(i__),EMpr(i__),
     +  Bpr(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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