FORTRAN Generation
(/./ftp/cats/J/ApJ/857/145)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/857/145 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-Oct-07
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/857/145     MagLiteS Carina II and Carina III spectroscopy     (Li+, 2018)
*================================================================================
*Ships passing in the night: spectroscopic analysis of two ultra-faint satellites
*in the constellation Carina.
*    Li T.S., Simon J.D., Pace A.B., Torrealba G., Kuehn K., Drlica-Wagner A.,
*    Bechtol K., Vivas A.K., van der Marel R.P., Wood M., Yanny B., Belokurov V.,
*    Jethwa P., Zucker D.B., Lewis G., Kron R., Nidever D.L., Sanchez-Conde M.A.,
*    Ji A.P., Conn B.C., James D.J., Martin N.F., Martinez-Delgado D.,
*    Noel N.E.D.
*   <Astrophys. J., 857, 145 (2018)>
*   =2018ApJ...857..145L
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! *Summary of properties of Carina II and Carina III

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

C  J2000 position composed of: RAdeg DEdeg
      character*10  Name        ! Dwarf galaxy name
      real*8        RAdeg       ! (deg) [114.1/114.7] Right ascension (J2000) (1)
      real*4        e_RAdeg     ! (deg) [0.006/0.007] RAdeg uncertainty (1)
      real*8        DEdeg       ! (deg) [-58/-57.8] Declination (J2000) (1)
      real*4        e_DEdeg     ! (deg) [0.008/0.01] DEdeg uncertainty (1)
      real*4        m_M         ! (mag) [17.2/17.9] Distance modulus (1)
      real*4        e_m_M       ! (mag) [0.02/0.1] m-M uncertainty (1)
      character*1   f_m_M       ! Flag on m-M (2)
      real*4        Dist        ! (kpc) [27.8/37.4] Heliocentric distance (1)
      real*4        e_Dist      ! (kpc) [0.4/0.6] Dist uncertainty (1)
      character*1   f_Dist      ! Flag on Dist (2)
      real*4        VMag        ! (mag) [-4.5/-2.4] V-band absolute magnitude (1)
      real*4        e_VMag      ! (mag) [0.1/0.2] Vmag uncertainty (1)
      real*4        LV          ! (Lsun) [780/5400] V-band luminosity (1)
      real*4        e_LV        ! (Lsun) [130/500] Negative uncertainty in LV (1)
      real*4        E_LV_1      ! (Lsun) [160/500] Positive uncertainty in LV (1)
      real*4        r1_2        ! (arcmin) [3.7/8.7] Half-light radius (1)
      real*4        e_r1_2      ! (arcmin) [0.7/1] r1/2 uncertainty (1)
      integer*4     r1_2pc      ! (pc) [30/91] Half-light radius in parsecs (1)
      integer*4     e_r1_2pc    ! (pc) [8/9] r1/2pc uncertainty (1)
      real*4        ell         ! [0.34/0.55] Ellipticity, 1-b/a (1)
      real*4        e_ell       ! [0.07/0.18] ell uncertainty (1)
      integer*4     PA          ! (deg) [150/170] Position angle, N to E (1)
      integer*4     e_PA        ! (deg) [9/14] PA uncertainty (1)
      integer*4     Nm          ! [4/14] Number of members
      character*1   f_Nm        ! Flag on Nm (2)
      real*4        HRV         ! (km/s) [284.6/477.2] Heliocentric velocity
      real*4        e_HRV       ! (km/s) [1.2/3.1] Negative uncertainty in HRV
      real*4        E_HRV_1     ! (km/s) [1.2/3.4] Positive uncertainty in HRV
      integer*4     VGSR        ! (km/s) [42/235] Galactic standard of rest
*                                        velocity
      real*4        sigma       ! (km/s) [3.4/5.6] Dispersion velocity
      real*4        e_sigma     ! (km/s) [0.8/2.1] Negative uncertainty on sigma
      real*4        E_sigma_1   ! (km/s) [1.2/4.3] Positive uncertainty on sigma
      character*1   f_sigma     ! Flag on sigma (2)
      real*4        Mhalf       ! (Msun) [1e+06]? Dynamical mass
      real*4        e_Mhalf     ! (Msun) [400000]? Negative uncertainty on Mhalf
      real*4        E_Mhalf_1   ! (Msun) [800000]? Positive uncertainty on Mhalf
      integer*4     M_LV        ! (Msun/Lsun) [369]? Mass-to-light ratio
      integer*4     e_M_LV      ! (Msun/Lsun) [161]? Negative uncertainty on M/LV
      integer*4     E_M_LV_1    ! (Msun/Lsun) [309]? Positive uncertainty on M/LV
      real*4        dv_dx       ! (km/s/arcmin) [0]? d{nu}/d{xi} value
      real*4        e_dv_dx     ! (km/s/arcmin) [0.3]? dv/dx uncertainty
      real*4        Metal       ! [-2.5/-1.9] Mean metallicity
      character*1   f_Metal     ! Flag on Metal (2)
      real*4        e_Metal     ! [0.09]? Metal uncertainty
      real*4        dMet        ! [0.22]? Metallicity dispersion (dex)
      real*4        e_dMet      ! [0.07]? Negative uncertainty on dMet
      real*4        E_dMet_1    ! [0.1]? Positive uncertainty on dMet
      real*4        logJ0_1     ! (GeV2/cm5) [17.9/19.9] 0.1{deg} J-factor (3)
      real*4        e_logJ0_1   ! (GeV2/cm5) [0.5/0.9] Negative uncertainty in logJ0.1
      real*4        E_logJ0_1_1 ! (GeV2/cm5) [0.6/1] Positive uncertainty in logJ0.1
      character*1   f_logJ0_1   ! Flag on logJ0.1 (2)
      real*4        logJ0_5     ! (GeV2/cm5) [18.2/20.2] 0.5{deg} J-factor (3)
      real*4        e_logJ0_5   ! (GeV2/cm5) [0.5/0.9] Negative uncertainty in logJ0.5
      real*4        E_logJ0_5_1 ! (GeV2/cm5) [0.5/1] Positive uncertainty in logJ0.5
      character*1   f_logJ0_5   ! Flag on logJ0.5 (2)
      real*4        logD0_1     ! (GeV2/cm5) [16.9/17.8] 0.1{deg} D-factor (3)
      real*4        e_logD0_1   ! (GeV2/cm5) [0.3/0.5] Negative uncertainty in logD0.1
      real*4        E_logD0_1_1 ! (GeV2/cm5) [0.3/0.5] Positive uncertainty in logD0.1
      character*1   f_logD0_1   ! Flag on logD0.1 (2)
      real*4        logD0_5     ! (GeV2/cm5) [18/18.8] 0.5{deg} D-factor (3)
      real*4        e_logD0_5   ! (GeV2/cm5) [0.4/0.7] Negative uncertainty in logD0.5
      real*4        E_logD0_5_1 ! (GeV2/cm5) [0.4/0.6] Positive uncertainty in logD0.5
      character*1   f_logD0_5   ! Flag on logD0.5 (2)
*Note (1): Data taken or derived from Paper I (Torrealba+ 2018MNRAS.475.5085T).
*          Other values are derived using the measurements in this paper.
*Note (2): Flag as follows:
*   b = The distance derived from RR Lyrae in Paper I
*       (Torrealba+ 2018MNRAS.475.5085T) is listed here as the heliocentric
*       distance of Car II and is used throughout the paper. For other
*       quantities, parameters derived from the CMD fit are used instead.
*   c = There are 18 spectroscopic members but only the 14 non-variable stars
*       are used for kinematic analysis.
*   d = Note that the velocity dispersion and the J-factor for Car III is
*       calculated based on only four spectroscopic members. We caution against
*       the use of this calculation as the classification of Car III is remain
*       unclear.
*   e = Note that this is the metallicity of the brightest member in Car III and
*       not the mean metallicity of the system.
*Note (3): The J-factor is the line-of-sight integral of the dark matter density
*          squared: J({theta})={int}({rho}_DM_^2^d{Omega}dl). The D-factor is
*          the linear analog: D({theta})={int}({rho}_DM_d{Omega}dl). Here,
*          {rho}_DM_ is the dark matter density and the integral is performed
*          over a solid angle {Delta}{Omega} with radius {theta}.
*          See section 4.3.

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

C  Declarations for 'table4.dat'	! Velocity and metallicity measurements

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  MagLiteS    ! Original MAGLITES identifier
*                                  (JHHMMSS.ss+DDMMSS.s)
      real*8        RAdeg_1     ! (deg) [113.2/115] Right Ascension (J2000)
      real*8        DEdeg_1     ! (deg) [-58.4/-57.3] Declination (J2000)
      real*4        g0mag       ! (mag) [14.6/20.3] Dereddened DECam g band
*                                  magnitude (1)
      real*4        r0mag       ! (mag) [13.9/20] Dereddened DECam r band magnitude (1)
      character*18  Inst        ! Instrument/Masks used
      real*8        MJD         ! (d) [57777.7/57902.4] Modified Julian Date;
*                                  JD-2400000.5
      real*4        S_N         ! [3.2/110.8] Spectra signal-to-noise
      real*4        HRV_1       ! (km/s) [-21.5/499] Heliocentric radial velocity
      real*4        e_HRV_2     ! (km/s) [0.5/15] Uncertainty in HRV
      real*8        EW          ! (0.1nm) [1.7/5.2]?=9999 Equivalent width,
*                                  calcium triplet, in Angstrom units
      real*8        e_EW        ! (0.1nm) [0.2/0.9]?=9999 Uncertainty in EW
      real*8        v_Fe_H_     ! ([Sun]) [-2.8/-1.9]?=99999 Metallicity
      real*8        e__Fe_H_    ! ([Sun]) [0.1/0.5]?=9999 Uncertainty in [Fe/H]
      integer*4     Mm          ! [0/3]? Membership (2)
*Note (1): Quoted magnitudes represent the weighted-average PSF magnitude derived
*    from the original MagLiteS survey rather than the photometry from
*    time-series follow-up observations that were used to search for RR
*    Lyrae stars. The photometry provided here is the dereddened photometry
*    using the extinction map from Schlegel et al. (1998ApJ...500..525S).
*Note (2): Membership code as follows:
*    2 = Carina II members;
*    3 = Carina III members;
*    0 = Non-members.

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

C  Loading file 'table2.dat'	! *Summary of properties of Carina II and Carina III

C  Format for file interpretation

    1 format(
     +  A10,1X,F8.4,1X,F6.4,1X,F8.4,1X,F6.4,1X,F5.2,1X,F4.2,A1,1X,
     +  F4.1,1X,F3.1,A1,1X,F4.1,1X,F3.1,1X,E6.2,1X,E6.2,1X,E6.2,1X,
     +  F4.2,1X,F4.2,1X,I2,1X,I1,1X,F4.2,1X,F4.2,1X,I3,1X,I2,1X,I2,A1,
     +  1X,F5.1,1X,F3.1,1X,F3.1,1X,I3,1X,F3.1,1X,F3.1,1X,F3.1,A1,1X,
     +  E6.2,1X,E6.2,1X,E6.2,1X,I3,1X,I3,1X,I3,1X,F3.1,1X,F3.1,1X,
     +  F5.2,A1,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.1,1X,F3.1,1X,
     +  F3.1,A1,1X,F4.1,1X,F3.1,1X,F3.1,A1,1X,F4.1,1X,F3.1,1X,F3.1,A1,
     +  1X,F4.1,1X,F3.1,1X,F3.1,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,2
        read(1,'(A285)')ar__
        read(ar__,1)
     +  Name,RAdeg,e_RAdeg,DEdeg,e_DEdeg,m_M,e_m_M,f_m_M,Dist,e_Dist,
     +  f_Dist,VMag,e_VMag,LV,e_LV,E_LV_1,r1_2,e_r1_2,r1_2pc,e_r1_2pc,
     +  ell,e_ell,PA,e_PA,Nm,f_Nm,HRV,e_HRV,E_HRV_1,VGSR,sigma,
     +  e_sigma,E_sigma_1,f_sigma,Mhalf,e_Mhalf,E_Mhalf_1,M_LV,e_M_LV,
     +  E_M_LV_1,dv_dx,e_dv_dx,Metal,f_Metal,e_Metal,dMet,e_dMet,
     +  E_dMet_1,logJ0_1,e_logJ0_1,E_logJ0_1_1,f_logJ0_1,logJ0_5,
     +  e_logJ0_5,E_logJ0_5_1,f_logJ0_5,logD0_1,e_logD0_1,E_logD0_1_1,
     +  f_logD0_1,logD0_5,e_logD0_5,E_logD0_5_1,f_logD0_5
        if(ar__(163:168) .EQ. '') Mhalf = rNULL__
        if(ar__(170:175) .EQ. '') e_Mhalf = rNULL__
        if(ar__(177:182) .EQ. '') E_Mhalf_1 = rNULL__
        if(ar__(184:186) .EQ. '') M_LV = iNULL__
        if(ar__(188:190) .EQ. '') e_M_LV = iNULL__
        if(ar__(192:194) .EQ. '') E_M_LV_1 = iNULL__
        if(ar__(196:198) .EQ. '') dv_dx = rNULL__
        if(ar__(200:202) .EQ. '') e_dv_dx = rNULL__
        if(ar__(211:214) .EQ. '') e_Metal = rNULL__
        if(ar__(216:219) .EQ. '') dMet = rNULL__
        if(ar__(221:224) .EQ. '') e_dMet = rNULL__
        if(ar__(226:229) .EQ. '') E_dMet_1 = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name,RAdeg,e_RAdeg,DEdeg,e_DEdeg,m_M,e_m_M,f_m_M,Dist,e_Dist,
     +  f_Dist,VMag,e_VMag,LV,e_LV,E_LV_1,r1_2,e_r1_2,r1_2pc,e_r1_2pc,
     +  ell,e_ell,PA,e_PA,Nm,f_Nm,HRV,e_HRV,E_HRV_1,VGSR,sigma,
     +  e_sigma,E_sigma_1,f_sigma,Mhalf,e_Mhalf,E_Mhalf_1,M_LV,e_M_LV,
     +  E_M_LV_1,dv_dx,e_dv_dx,Metal,f_Metal,e_Metal,dMet,e_dMet,
     +  E_dMet_1,logJ0_1,e_logJ0_1,E_logJ0_1_1,f_logJ0_1,logJ0_5,
     +  e_logJ0_5,E_logJ0_5_1,f_logJ0_5,logD0_1,e_logD0_1,E_logD0_1_1,
     +  f_logD0_1,logD0_5,e_logD0_5,E_logD0_5_1,f_logD0_5
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Velocity and metallicity measurements

C  Format for file interpretation

    2 format(
     +  8X,A19,1X,F9.5,1X,F9.5,1X,F5.2,1X,F5.2,1X,A18,1X,F7.1,1X,F5.1,
     +  1X,F6.2,1X,F5.2,1X,F7.2,1X,F7.2,1X,F8.2,1X,F7.2,1X,I1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,407
        read(1,'(A140)')ar__1
        read(ar__1,2)
     +  MagLiteS,RAdeg_1,DEdeg_1,g0mag,r0mag,Inst,MJD,S_N,HRV_1,
     +  e_HRV_2,EW,e_EW,v_Fe_H_,e__Fe_H_,Mm
        if(ar__1(140:140) .EQ. '') Mm = iNULL__
c    ..............Just test output...........
        write(6,2)
     +  MagLiteS,RAdeg_1,DEdeg_1,g0mag,r0mag,Inst,MJD,S_N,HRV_1,
     +  e_HRV_2,EW,e_EW,v_Fe_H_,e__Fe_H_,Mm
c    .......End.of.Just test output...........
      end do
      close(1)

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