FORTRAN Generation
(/./ftp/cats/J/AJ/139/120)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/139/120 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-06
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/AJ/139/120        Low-redshift Type-Ia supernovae          (Folatelli+, 2010)
*================================================================================
*The Carnegie Supernova Project: analysis of the first sample of low-redshift
*Type-Ia supernovae.
*    Folatelli G., Phillips M.M., Burns C.R., Contreras C., Hamuy M.,
*    Freedman W.L., Persson S.E., Stritzinger M., Suntzeff N.B., Krisciunas K.,
*    Boldt L., Gonzalez S., Krzeminski W., Morrell N., Roth M., Salgado F.,
*    Madore B.F., Murphy D., Wyatt P., Li W., Filippenko A.V., Miller N.
*   <Astron. J., 139, 120-144 (2010)>
*   =2010AJ....139..120F
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Observational properties of the SNe Ia used in
                              the analysis

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

      character*6   SN          ! SN name
      real*4        zh          ! Heliocentric redshift from the NASA/IPAC
*                                   Extragalactic Database (NED)
      real*4        zCMB        ! Redshift in the frame of the 3K CMB (NED)
      character*1   n_zCMB      ! [a] Note on zCMB (1)
      real*4        E_B_V       ! (mag) Galactic reddening (NED)
      real*4        Dm15_B      ! (mag) Observed decline rate {Delta}m_15_(B)
      real*4        e_Dm15_B    ! (mag) rms uncertainty on Dm15(B)
      real*4        v_mu_       ! (mag) ?=- Average distance modulus from fits of
*                                      Section 4.2
      real*4        e__mu_      ! (mag) ? rms uncertainty on <mu>
      character*3   Best        ! [Yes/No ] Does the SN belong to the
*                                            "best-observed" sample?
*Note (1): a: Value of zCMB corresponding to the systemic recession velocity
*     of the group ARP 327.

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

C  Declarations for 'table2.dat'	! Light-curve parameters

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

      character*6   SN_1        ! SN name
      character*1   f_SN        ! [B] Indicates part of "best-observed" group
      character*1   Band        ! Filter name
      real*8        Tmax        ! (d) Julian Date of maximum; minus 2453000
      real*4        e_Tmax      ! (d) Uncertainty in Tmax
      real*4        mmax        ! (mag) Apparent peak magnitude; K-corrected
      real*4        e_mmax      ! (mag) Uncertainty in mmax
      real*4        Dm          ! (mag) ? Decline rate (1)
      real*4        e_Dm        ! (mag) ? Uncertainty Dm
      real*4        Epmin       ! (d) First epoch covered by data (2)
      real*4        Epmax       ! (d) Last epoch covered by data (2)
      integer*4     Np          ! [2/62] Number of data points
      character*6   Fit         ! Fit method; "Spline" or "Templ." (template fit)
*                                see section 2.2 for details.
*Note (1): Measured as the difference in magnitudes at an epoch "t" and
*     maximum light in each band (t=10d for B; t=15d for ug; t=20d for V;
*     t=30d for r; t=35d for iY ; t=40d for JH).
*Note (2): In rest-frame days with respect to the time of maximum.

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

C  Loading file 'table1.dat'	! Observational properties of the SNe Ia used in
*                              the analysis

C  Format for file interpretation

    1 format(
     +  3X,A6,1X,F6.4,1X,F6.4,A1,1X,F5.3,1X,F4.2,1X,F3.2,1X,F5.2,1X,
     +  F3.2,1X,A3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,34
        read(1,'(A53)')ar__
        read(ar__,1)
     +  SN,zh,zCMB,n_zCMB,E_B_V,Dm15_B,e_Dm15_B,v_mu_,e__mu_,Best
        if (idig(ar__(41:45)).EQ.0) v_mu_ =  rNULL__
        if(ar__(47:49) .EQ. '') e__mu_ = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  SN,zh,zCMB,n_zCMB,E_B_V,Dm15_B,e_Dm15_B,v_mu_,e__mu_,Best
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Light-curve parameters

C  Format for file interpretation

    2 format(
     +  3X,A6,1X,A1,1X,A1,1X,F7.2,1X,F4.2,1X,F6.3,1X,F5.3,1X,F5.3,1X,
     +  F5.3,1X,F5.1,1X,F6.1,1X,I2,1X,A6)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,281
        read(1,'(A74)')ar__1
        read(ar__1,2)
     +  SN_1,f_SN,Band,Tmax,e_Tmax,mmax,e_mmax,Dm,e_Dm,Epmin,Epmax,Np,
     +  Fit
        if(ar__1(41:45) .EQ. '') Dm = rNULL__
        if(ar__1(47:51) .EQ. '') e_Dm = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  SN_1,f_SN,Band,Tmax,e_Tmax,mmax,e_mmax,Dm,e_Dm,Epmin,Epmax,Np,
     +  Fit
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