Conversion of standardized ReadMe file for
file /./ftp/cats/J/ApJS/179/1 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-12
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/ApJS/179/1 The OPTX project: CLANS, CLASXS and CDF-N (Trouille+, 2008)
*================================================================================
*The OPTX project.
*I. The flux and redshift catalogs for the CLANS, CLASXS, and CDF-N fields.
* Trouille L., Barger A.J., Cowie L.L., Yang Y., Mushotzky R.F.
* <Astrophys. J. Suppl. Ser., 179, 1-18 (2008)>
* =2008ApJS..179....1T
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table4.dat' ! CLANS X-ray catalog: basic source properties
integer*4 nr__
parameter (nr__=761) ! Number of records
character*146 ar__ ! Full-size record
C J2000 position composed of: RAdeg DEdeg
integer*4 CLANS ! Identification number (in RA order)
real*8 RAdeg ! (deg) X-ray right ascension (J2000)
real*8 DEdeg ! (deg) X-ray declination (J2000)
real*4 e_RAdeg ! (arcsec) Wavdetect 95% confidence error in RAdeg
real*4 e_DEdeg ! (arcsec) Wavdetect 95% confidence error in DEdeg
character*1 l_F0_5_2 ! Limit flag on F0.5-2 (2)
real*4 F0_5_2 ! (aW/m2) The 0.5-2keV flux (3)
real*4 e_F0_5_2 ! (aW/m2) ?=-99 1{sigma} Poisson lower error (F0.5-2) (4)
real*4 E_F0_5_2_1 ! (aW/m2) ?=-99 1{sigma} Poisson upper error (F0.5-2) (4)
character*1 l_F2_8 ! Limit flag on F2-8 (2)
real*8 F2_8 ! (aW/m2) The 2-8 keV flux (3)
real*4 e_F2_8 ! (aW/m2) ?=-99 1{sigma} Poisson lower error (F2-8) (4)
real*4 E_F2_8_1 ! (aW/m2) ?=-99 1{sigma} Poisson upper error (F2-8) (4)
real*4 F0_5_8 ! (aW/m2) The 0.5-8 keV flux (3)
real*4 e_F0_5_8 ! (aW/m2) ?=-99 1{sigma} Poisson lower error (F0.5-8) (4)
real*4 E_F0_5_8_1 ! (aW/m2) ?=-99 1{sigma} Poisson upper error (F0.5-8) (4)
character*1 l_HR ! Limit Flag on HR (5)
real*8 HR ! Hardness ratio (6)
real*8 e_HR ! ?=-99 1{sigma} lower error in HR
real*8 E_HR_1 ! ?=-99 1{sigma} upper error in HR
real*4 Gamma ! ?=-99 Power law photon index
real*4 e_Gamma ! ?=-99 1{sigma} lower error in Gamma
real*4 E_Gamma_1 ! ?=-99 1{sigma} upper error in Gamma
*Note (2): For sources detected in one band but with a very weak signal in the
* other, we flag the flux value with a < symbol.
*Note (3): For any source detected in one band but with a very weak signal in
* the other, the background-subtracted flux could be negative. In this
* case, only the upper Poisson error is quoted.
*Note (4): Using the approximations from Gehrels (1986). They do not include the
* uncertainty in the flux conversion factor; however, the errors are
* generally dominated by the Poisson errors.
*Note (5): For sources with a very weak signal in the 0.5-2keV (2-8keV) band,
* we flag the HR value with a > (<) symbol.
*Note (6): HR=C(2-8keV)/C(0.5-2keV) where C(2-8keV) and C(0.5-2keV) are
* the count rates in the given bands. For sources with a very weak
* signal in the 0.5-2keV (2-8keV) band, we list the lower
* (upper) limit.
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table5.dat' ! CLANS X-ray catalog: additional source properties
integer*4 nr__1
parameter (nr__1=761) ! Number of records
character*81 ar__1 ! Full-size record
integer*4 CLANS_1 ! Identification number (in RA order)
real*4 n0_5_2 ! (ct) Net 0.5-2 keV counts (2)
real*4 e_n0_5_2 ! (ct) 1{sigma} Poisson lower error in n0.5-2 (3)
real*4 E_n0_5_2_1 ! (ct) 1{sigma} Poisson upper error in n0.5-2 (3)
real*4 n2_8 ! (ct) Net 2-8 keV counts (2)
real*4 e_n2_8 ! (ct) 1{sigma} Poisson lower error in n2-8 (3)
real*4 E_n2_8_1 ! (ct) 1{sigma} Poisson upper error in n2-8 (3)
real*8 n0_5_8 ! (ct) Net 5-8 counts (2)
real*4 e_n0_5_8 ! (ct) 1{sigma} Poisson lower error in n0.5-8 (3)
real*4 E_n0_5_8_1 ! (ct) 1{sigma} Poisson upper error in n0.5-8 (3)
real*4 t0_5_2 ! (10+4s) Effective 0.5-2 exposure time
real*4 t2_8 ! (10+4s) Effective 2-8 exposure time
real*4 t0_5_8 ! (10+4s) Effective 0.5-8 exposure time
real*4 R ! (arcmin) Source distance from pointing center
*Note (2): The eight-piece segmented annulus region we use to estimate the
* background for each source is four times as large as the source cell
* area. Therefore, the net counts for the majority of the sources are
* multiples of 0.25. For a few sources we exclude background segments
* containing more counts than the 3{sigma} Poisson upper limit in order
* to avoid nearby sources. Therefore the net counts for these sources
* are not multiples of 0.25.
*Note (3): Using the approximations from Gehrels (1986).
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table11.dat' ! CLANS Optical/IR counterparts catalog
integer*4 nr__2
parameter (nr__2=761) ! Number of records
character*99 ar__2 ! Full-size record
C J2000 position composed of: RAodeg DEodeg
integer*4 CLANS_2 ! Identification number (in RA order)
real*8 RAodeg ! (deg) ?=-99 Opt/NIR Right Ascension in decimal degrees
* (J2000)
real*8 DEodeg ! (deg) ?=-99 Opt/NIR Declination in decimal degrees
* (J2000)
real*4 g_mag ! (mag) ?=-99 g' band AB magnitude (2)
real*4 r_mag ! (mag) ?=-99 r' band AB magnitude (2)
real*4 i_mag ! (mag) ?=-99 i' band AB magnitude (2)
real*4 z_mag ! (mag) ?=-99 z' band AB magnitude (2)
real*4 Jmag ! (mag) ?=-99 J band AB magnitude (2)
real*4 Hmag ! (mag) ?=-99 H band AB magnitude (2)
real*4 Kmag ! (mag) ?=-99 K band AB magnitude (2)
real*4 v3_6mag ! (mag) ?=-99 Spitzer 3.6{mu}m band AB magnitude (2)
real*4 v24mag ! (mag) ?=-99 Spitzer 24{mu}m band AB magnitude (2)
real*4 zsp ! ?=- Spectroscopic redshift (G3)
real*4 zph ! ?=- Photometric redshift (G2)
integer*4 Cl ! ?=- Optical spectral classification (G1)
*Note (2): Typical photometric uncertainties are given in Section 3.6.
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table12.dat' ! CLASXS Optical/IR counterparts catalog
integer*4 nr__3
parameter (nr__3=525) ! Number of records
character*134 ar__3 ! Full-size record
C J2000 position composed of: RAdeg DEdeg
integer*4 Seq ! Identification number (1)
real*8 RAdeg_1 ! (deg) ?=-99 Opt/NIR Right Ascension in decimal
* degrees (J2000)
real*8 DEdeg_1 ! (deg) ?=-99 Opt/NIR Declination in decimal degrees
* (J2000)
real*4 Umag ! (mag) ? U band AB magnitude, for table 13 (2)
real*4 umag_1 ! (mag) ? u band AB magnitude, for table 12 (2)
real*4 Bmag ! (mag) ? B band AB magnitude (2)
real*4 g_mag_1 ! (mag) ? g' band AB magnitude, for table 12 (2)
real*4 Vmag ! (mag) ? V band AB magnitude (2)
real*4 Rmag ! (mag) ? R band AB magnitude (2)
real*4 i_mag_1 ! (mag) ? i' band AB magnitude, for table 12 (2)
real*4 Imag ! (mag) ? I band AB magnitude, for table 13 (2)
real*4 z_mag_1 ! (mag) ? z' band AB magnitude (2)
real*4 Jmag_1 ! (mag) ? J band AB magnitude (2)
real*4 Hmag_1 ! (mag) ? H band AB magnitude (2)
real*4 Kmag_1 ! (mag) ? K band AB magnitude (2), (3)
real*4 v3_6mag_1 ! (mag) ? Spitzer 3.6{mu}m band AB magnitude (2)
real*4 v24mag_1 ! (mag) ? Spitzer 24{mu}m band AB magnitude (2)
real*4 zsp_1 ! Spectroscopic redshift (G3)
character*1 r_zsp ! [a-s] Reference for zsp (5)
real*4 zph_1 ! Photometric redshift (G2)
integer*4 Cl_1 ! Optical spectral classification (G1)
*Note (1): Nomenclature note:
* * in Table12: CLASXS NNN, corresponds to objects in
* Tables 2 and 3 of Yang et al. (2004, Cat. J/AJ/128/1501)
* * in Table13: CDFN NNN, corresponds to objects in Table A1 of
* Barger et al. (2003, Cat. J/AJ/126/632), [ABB2003] CDFN NNN in Simbad
*Note (2): Typical photometric uncertainties are given in Section 3.6.
* -99.000 = Not detected (2{sigma} significance).
*Note (3): K band magnitude for table 12 but K_s_ band magnitude for table 13.
*Note (5): References as follows:
* a = Barger et al., 2003AJ....126..632B, Cat. J/AJ/126/632
* b = Swinbank et al., 2004ApJ...617...64S
* c = Chapman et al., 2005ApJ...622..772C, Cat. J/ApJ/622/772
* d = Reddy et al., 2006ApJ...653.1004R, Cat. J/ApJ/653/1004
* s = Steffen et al., 2004AJ....128.1483S, Cat. J/AJ/128/1483
* All other spectroscopic redshifts presented here for the first time.
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table13.dat' ! CDF-N Optical/IR counterparts catalog
integer*4 nr__4
parameter (nr__4=503) ! Number of records
character*134 ar__4 ! Full-size record
C J2000 position composed of: RAdeg DEdeg
integer*4 Seq_1 ! Identification number (1)
real*8 RAdeg_2 ! (deg) ?=-99 Opt/NIR Right Ascension in decimal
* degrees (J2000)
real*8 DEdeg_2 ! (deg) ?=-99 Opt/NIR Declination in decimal degrees
* (J2000)
real*4 Umag_2 ! (mag) ? U band AB magnitude, for table 13 (2)
real*4 umag_3 ! (mag) ? u band AB magnitude, for table 12 (2)
real*4 Bmag_1 ! (mag) ? B band AB magnitude (2)
real*4 g_mag_2 ! (mag) ? g' band AB magnitude, for table 12 (2)
real*4 Vmag_1 ! (mag) ? V band AB magnitude (2)
real*4 Rmag_1 ! (mag) ? R band AB magnitude (2)
real*4 i_mag_2 ! (mag) ? i' band AB magnitude, for table 12 (2)
real*4 Imag_1 ! (mag) ? I band AB magnitude, for table 13 (2)
real*4 z_mag_2 ! (mag) ? z' band AB magnitude (2)
real*4 Jmag_2 ! (mag) ? J band AB magnitude (2)
real*4 Hmag_2 ! (mag) ? H band AB magnitude (2)
real*4 Kmag_2 ! (mag) ? K band AB magnitude (2), (3)
real*4 v3_6mag_2 ! (mag) ? Spitzer 3.6{mu}m band AB magnitude (2)
real*4 v24mag_2 ! (mag) ? Spitzer 24{mu}m band AB magnitude (2)
real*4 zsp_2 ! Spectroscopic redshift (G3)
character*1 r_zsp_1 ! [a-s] Reference for zsp (5)
real*4 zph_2 ! Photometric redshift (G2)
integer*4 Cl_2 ! Optical spectral classification (G1)
*Note (1): Nomenclature note:
* * in Table12: CLASXS NNN, corresponds to objects in
* Tables 2 and 3 of Yang et al. (2004, Cat. J/AJ/128/1501)
* * in Table13: CDFN NNN, corresponds to objects in Table A1 of
* Barger et al. (2003, Cat. J/AJ/126/632), [ABB2003] CDFN NNN in Simbad
*Note (2): Typical photometric uncertainties are given in Section 3.6.
* -99.000 = Not detected (2{sigma} significance).
*Note (3): K band magnitude for table 12 but K_s_ band magnitude for table 13.
*Note (5): References as follows:
* a = Barger et al., 2003AJ....126..632B, Cat. J/AJ/126/632
* b = Swinbank et al., 2004ApJ...617...64S
* c = Chapman et al., 2005ApJ...622..772C, Cat. J/ApJ/622/772
* d = Reddy et al., 2006ApJ...653.1004R, Cat. J/ApJ/653/1004
* s = Steffen et al., 2004AJ....128.1483S, Cat. J/AJ/128/1483
* All other spectroscopic redshifts presented here for the first time.
C=============================================================================
C Loading file 'table4.dat' ! CLANS X-ray catalog: basic source properties
C Format for file interpretation
1 format(
+ I3,1X,F9.5,1X,F8.5,1X,F5.3,1X,F5.3,1X,A1,F6.2,1X,F6.2,1X,F6.2,
+ 1X,A1,F7.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,A1,F7.2,
+ 1X,F7.2,1X,F7.2,1X,F6.2,1X,F6.2,1X,F6.2)
C Effective file loading
open(unit=1,status='old',file=
+'table4.dat')
write(6,*) '....Loading file: table4.dat'
do i__=1,761
read(1,'(A146)')ar__
read(ar__,1)
+ CLANS,RAdeg,DEdeg,e_RAdeg,e_DEdeg,l_F0_5_2,F0_5_2,e_F0_5_2,
+ E_F0_5_2_1,l_F2_8,F2_8,e_F2_8,E_F2_8_1,F0_5_8,e_F0_5_8,
+ E_F0_5_8_1,l_HR,HR,e_HR,E_HR_1,Gamma,e_Gamma,E_Gamma_1
c ..............Just test output...........
write(6,1)
+ CLANS,RAdeg,DEdeg,e_RAdeg,e_DEdeg,l_F0_5_2,F0_5_2,e_F0_5_2,
+ E_F0_5_2_1,l_F2_8,F2_8,e_F2_8,E_F2_8_1,F0_5_8,e_F0_5_8,
+ E_F0_5_8_1,l_HR,HR,e_HR,E_HR_1,Gamma,e_Gamma,E_Gamma_1
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'table5.dat' ! CLANS X-ray catalog: additional source properties
C Format for file interpretation
2 format(
+ I3,1X,F6.2,1X,F5.2,1X,F5.2,1X,F6.2,1X,F5.2,1X,F5.2,1X,F7.2,1X,
+ F5.2,1X,F5.2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F4.1)
C Effective file loading
open(unit=1,status='old',file=
+'table5.dat')
write(6,*) '....Loading file: table5.dat'
do i__=1,761
read(1,'(A81)')ar__1
read(ar__1,2)
+ CLANS_1,n0_5_2,e_n0_5_2,E_n0_5_2_1,n2_8,e_n2_8,E_n2_8_1,
+ n0_5_8,e_n0_5_8,E_n0_5_8_1,t0_5_2,t2_8,t0_5_8,R
c ..............Just test output...........
write(6,2)
+ CLANS_1,n0_5_2,e_n0_5_2,E_n0_5_2_1,n2_8,e_n2_8,E_n2_8_1,
+ n0_5_8,e_n0_5_8,E_n0_5_8_1,t0_5_2,t2_8,t0_5_8,R
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'table11.dat' ! CLANS Optical/IR counterparts catalog
C Format for file interpretation
3 format(
+ I3,1X,F7.3,1X,F7.3,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,
+ F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F5.2,1X,F6.2,1X,I3)
C Effective file loading
open(unit=1,status='old',file=
+'table11.dat')
write(6,*) '....Loading file: table11.dat'
do i__=1,761
read(1,'(A99)')ar__2
read(ar__2,3)
+ CLANS_2,RAodeg,DEodeg,g_mag,r_mag,i_mag,z_mag,Jmag,Hmag,Kmag,
+ v3_6mag,v24mag,zsp,zph,Cl
if (idig(ar__2(84:88)).EQ.0) zsp = rNULL__
if (idig(ar__2(90:95)).EQ.0) zph = rNULL__
if (Cl .EQ. 45) Cl = iNULL__
c ..............Just test output...........
write(6,3)
+ CLANS_2,RAodeg,DEodeg,g_mag,r_mag,i_mag,z_mag,Jmag,Hmag,Kmag,
+ v3_6mag,v24mag,zsp,zph,Cl
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'table12.dat' ! CLASXS Optical/IR counterparts catalog
C Format for file interpretation
4 format(
+ I3,1X,F7.3,1X,F7.3,1X,F5.1,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,
+ F6.2,1X,F6.2,1X,F5.1,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,
+ 1X,F6.2,1X,F5.2,1X,A1,1X,F6.2,1X,I3)
C Effective file loading
open(unit=1,status='old',file=
+'table12.dat')
write(6,*) '....Loading file: table12.dat'
do i__=1,525
read(1,'(A134)')ar__3
read(ar__3,4)
+ Seq,RAdeg_1,DEdeg_1,Umag,umag_1,Bmag,g_mag_1,Vmag,Rmag,
+ i_mag_1,Imag,z_mag_1,Jmag_1,Hmag_1,Kmag_1,v3_6mag_1,v24mag_1,
+ zsp_1,r_zsp,zph_1,Cl_1
if(ar__3(21:25) .EQ. '') Umag = rNULL__
if(ar__3(27:32) .EQ. '') umag_1 = rNULL__
if(ar__3(34:39) .EQ. '') Bmag = rNULL__
if(ar__3(41:46) .EQ. '') g_mag_1 = rNULL__
if(ar__3(48:53) .EQ. '') Vmag = rNULL__
if(ar__3(55:60) .EQ. '') Rmag = rNULL__
if(ar__3(62:67) .EQ. '') i_mag_1 = rNULL__
if(ar__3(69:73) .EQ. '') Imag = rNULL__
if(ar__3(75:80) .EQ. '') z_mag_1 = rNULL__
if(ar__3(82:87) .EQ. '') Jmag_1 = rNULL__
if(ar__3(89:94) .EQ. '') Hmag_1 = rNULL__
if(ar__3(96:101) .EQ. '') Kmag_1 = rNULL__
if(ar__3(103:108) .EQ. '') v3_6mag_1 = rNULL__
if(ar__3(110:115) .EQ. '') v24mag_1 = rNULL__
c ..............Just test output...........
write(6,4)
+ Seq,RAdeg_1,DEdeg_1,Umag,umag_1,Bmag,g_mag_1,Vmag,Rmag,
+ i_mag_1,Imag,z_mag_1,Jmag_1,Hmag_1,Kmag_1,v3_6mag_1,v24mag_1,
+ zsp_1,r_zsp,zph_1,Cl_1
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'table13.dat' ! CDF-N Optical/IR counterparts catalog
C Format for file interpretation
5 format(
+ I3,1X,F7.3,1X,F7.3,1X,F5.1,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,
+ F6.2,1X,F6.2,1X,F5.1,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,F6.2,
+ 1X,F6.2,1X,F5.2,1X,A1,1X,F6.2,1X,I3)
C Effective file loading
open(unit=1,status='old',file=
+'table13.dat')
write(6,*) '....Loading file: table13.dat'
do i__=1,503
read(1,'(A134)')ar__4
read(ar__4,5)
+ Seq_1,RAdeg_2,DEdeg_2,Umag_2,umag_3,Bmag_1,g_mag_2,Vmag_1,
+ Rmag_1,i_mag_2,Imag_1,z_mag_2,Jmag_2,Hmag_2,Kmag_2,v3_6mag_2,
+ v24mag_2,zsp_2,r_zsp_1,zph_2,Cl_2
if(ar__4(21:25) .EQ. '') Umag_2 = rNULL__
if(ar__4(27:32) .EQ. '') umag_3 = rNULL__
if(ar__4(34:39) .EQ. '') Bmag_1 = rNULL__
if(ar__4(41:46) .EQ. '') g_mag_2 = rNULL__
if(ar__4(48:53) .EQ. '') Vmag_1 = rNULL__
if(ar__4(55:60) .EQ. '') Rmag_1 = rNULL__
if(ar__4(62:67) .EQ. '') i_mag_2 = rNULL__
if(ar__4(69:73) .EQ. '') Imag_1 = rNULL__
if(ar__4(75:80) .EQ. '') z_mag_2 = rNULL__
if(ar__4(82:87) .EQ. '') Jmag_2 = rNULL__
if(ar__4(89:94) .EQ. '') Hmag_2 = rNULL__
if(ar__4(96:101) .EQ. '') Kmag_2 = rNULL__
if(ar__4(103:108) .EQ. '') v3_6mag_2 = rNULL__
if(ar__4(110:115) .EQ. '') v24mag_2 = rNULL__
c ..............Just test output...........
write(6,5)
+ Seq_1,RAdeg_2,DEdeg_2,Umag_2,umag_3,Bmag_1,g_mag_2,Vmag_1,
+ Rmag_1,i_mag_2,Imag_1,z_mag_2,Jmag_2,Hmag_2,Kmag_2,v3_6mag_2,
+ v24mag_2,zsp_2,r_zsp_1,zph_2,Cl_2
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