FORTRAN Generation
(/./ftp/cats/J/ApJ/835/166)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/835/166 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/835/166    SNe type II from CSP-I, SDSS-II, and SNLS    (de Jaeger+, 2017)
*================================================================================
*A Type II supernova Hubble diagram from the CSP-I, SDSS-II, and SNLS surveys.
*    de Jaeger T., Gonzalez-Gaitan S., Hamuy M., Galbany L., Anderson J.P.,
*    Phillips M.M., Stritzinger M.D., Carlberg R.G., Sullivan M.,
*    Gutierrez C.P., Hook I.M., Howell D.A., Hsiao E.Y., Kuncarayakti H.,
*    Ruhlmann-Kleider V., Folatelli G., Pritchet C., Basa S.
*   <Astrophys. J., 835, 166-166 (2017)>
*   =2017ApJ...835..166D    (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Supernova sample

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

      character*6   Name        ! Supernova identifier
      character*1   f_Name      ! [c] Flag on Name (1)
      real*4        AvG         ! (mag) [0.02/1.9] Reddening (2)
      real*4        z           ! [0.0008/0.6] Host-galaxy heliocentric
*                               recession velocity from NED
      real*8        zCMB        ! [-0.0001/0.6] Host-galaxy velocity in the CMB
*                               frame (3)
      real*8        e_zCMB      ! [0.00001/0.005] zCMB uncertainty
      real*8        Epoch       ! (d) The explosion epoch (MJD)
      real*4        e_Epoch     ! (d) [1/25] Epoch uncertainty
      real*4        s2          ! [-2/3]? s2 value (the slope of the plateau)
*                               in the i band (defined in Section 4)
      real*4        e_s2        ! [0.01/1.5]? s2 uncertainty
      integer*4     VHb         ! (km/s) [2420/8640]? H{beta} velocity (4)
      integer*4     e_VHb       ! (km/s) [160/700]? VHb uncertainty
      real*4        muPCM       ! (mag) [33/42.2]? Distance modulus measured using
*                               the Photometric Color Method (PCM); see section 4
      real*4        e_muPCM     ! (mag) [0.05/0.7]? muPCM uncertainty
      real*4        muSCM       ! (mag) [33/40]? Distance modulus measured using the
*                               Standard Candle Method (SCM); see section 5
      real*4        e_muSCM     ! (mag) [0.06/0.5]? muSCM uncertainty
      character*7   Camp        ! Survey from which the SN II originates (5)
      character*7   Meth        ! Methods (whether a spectrum is available or not)
*Note (1):
*  c = SNe II used in de Jaeger+ (2015ApJ...815..121D).
*Note (2): Reddening due to dust in our Galaxy
*          (Schlafly & Finkbeiner 2011ApJ...737..103S).
*Note (3): The host-galaxy velocity in the CMB frame using the CMB dipole model
*          presented by Fixsen+ (1996ApJ...473..576F).
*Note (4): H{beta} velocity at an epoch of 45 days after the explosion
*          (see Section 5).
*Note (5): Campaign as follows:
*  CSP-I   = Carnegie Supernova Project-I (Hamuy+ 2006PASP..118....2H -
*            http://csp.obs.carnegiescience.edu/),
*  SDSS-II = Sloan Digital Sky Survey II SN (Frieman+ 2008AJ....135..338F -
*            http://classic.sdss.org/supernova/aboutsupernova.html),
*  SNLS    = Supernova Legacy Survey  (Astier+ 2006A&A...447...31A ;
*            Perrett+ 2010AJ....140..518P).

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

C  Loading file 'table1.dat'	! Supernova sample

C  Format for file interpretation

    1 format(
     +  A6,1X,A1,1X,F5.3,1X,F6.4,1X,F7.4,1X,F7.5,1X,F7.1,1X,F4.1,1X,
     +  F5.2,1X,F4.2,1X,I4,1X,I3,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,
     +  A7,1X,A7)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,105
        read(1,'(A108)')ar__
        read(ar__,1)
     +  Name,f_Name,AvG,z,zCMB,e_zCMB,Epoch,e_Epoch,s2,e_s2,VHb,e_VHb,
     +  muPCM,e_muPCM,muSCM,e_muSCM,Camp,Meth
        if(ar__(52:56) .EQ. '') s2 = rNULL__
        if(ar__(58:61) .EQ. '') e_s2 = rNULL__
        if(ar__(63:66) .EQ. '') VHb = iNULL__
        if(ar__(68:70) .EQ. '') e_VHb = iNULL__
        if(ar__(72:76) .EQ. '') muPCM = rNULL__
        if(ar__(78:81) .EQ. '') e_muPCM = rNULL__
        if(ar__(83:87) .EQ. '') muSCM = rNULL__
        if(ar__(89:92) .EQ. '') e_muSCM = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name,f_Name,AvG,z,zCMB,e_zCMB,Epoch,e_Epoch,s2,e_s2,VHb,e_VHb,
     +  muPCM,e_muPCM,muSCM,e_muSCM,Camp,Meth
c    .......End.of.Just test output...........
      end do
      close(1)

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