Conversion of standardized ReadMe file for
file /./ftp/cats/J/AJ/139/120 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 2026-Oct-05
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 (nr__) ! SN name
real*4 zh (nr__) ! Heliocentric redshift from the NASA/IPAC
* Extragalactic Database (NED)
real*4 zCMB (nr__) ! Redshift in the frame of the 3K CMB (NED)
character*1 n_zCMB (nr__) ! [a] Note on zCMB (1)
real*4 E_B_V (nr__) ! (mag) Galactic reddening (NED)
real*4 Dm15_B (nr__) ! (mag) Observed decline rate {Delta}m_15_(B)
real*4 e_Dm15_B (nr__) ! (mag) rms uncertainty on Dm15(B)
real*4 v_mu_ (nr__) ! (mag) ?=- Average distance modulus from fits of
* Section 4.2
real*4 e__mu_ (nr__) ! (mag) ? rms uncertainty on <mu>
character*3 Best (nr__) ! [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 (nr__1) ! SN name
character*1 f_SN (nr__1) ! [B] Indicates part of "best-observed" group
character*1 Band (nr__1) ! Filter name
real*8 Tmax (nr__1) ! (d) Julian Date of maximum; minus 2453000
real*4 e_Tmax (nr__1) ! (d) Uncertainty in Tmax
real*4 mmax (nr__1) ! (mag) Apparent peak magnitude; K-corrected
real*4 e_mmax (nr__1) ! (mag) Uncertainty in mmax
real*4 Dm (nr__1) ! (mag) ? Decline rate (1)
real*4 e_Dm (nr__1) ! (mag) ? Uncertainty Dm
real*4 Epmin (nr__1) ! (d) First epoch covered by data (2)
real*4 Epmax (nr__1) ! (d) Last epoch covered by data (2)
integer*4 Np (nr__1) ! [2/62] Number of data points
character*6 Fit (nr__1) ! 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(i__),zh(i__),zCMB(i__),n_zCMB(i__),E_B_V(i__),Dm15_B(i__),
+ e_Dm15_B(i__),v_mu_(i__),e__mu_(i__),Best(i__)
if (idig(ar__(41:45)).EQ.0) v_mu_(i__) = rNULL__
if(ar__(47:49) .EQ. '') e__mu_(i__) = rNULL__
c ..............Just test output...........
write(6,1)
+ SN(i__),zh(i__),zCMB(i__),n_zCMB(i__),E_B_V(i__),Dm15_B(i__),
+ e_Dm15_B(i__),v_mu_(i__),e__mu_(i__),Best(i__)
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(i__),f_SN(i__),Band(i__),Tmax(i__),e_Tmax(i__),mmax(i__),
+ e_mmax(i__),Dm(i__),e_Dm(i__),Epmin(i__),Epmax(i__),Np(i__),
+ Fit(i__)
if(ar__1(41:45) .EQ. '') Dm(i__) = rNULL__
if(ar__1(47:51) .EQ. '') e_Dm(i__) = rNULL__
c ..............Just test output...........
write(6,2)
+ SN_1(i__),f_SN(i__),Band(i__),Tmax(i__),e_Tmax(i__),mmax(i__),
+ e_mmax(i__),Dm(i__),e_Dm(i__),Epmin(i__),Epmax(i__),Np(i__),
+ Fit(i__)
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