Conversion of standardized ReadMe file for
file /./ftp/cats/J/ApJ/654/347 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-11
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/654/347 Chandra X-ray observations in Eagle Nebula. I. (Linsky+, 2007)
*================================================================================
*Chandra observations of the Eagle nebula.
*I. Embedded young stellar objects near the pillars of creation.
* Linsky J.L., Gagne M., Mytyk A., Mccaughrean M., Andersen M.
* <Astrophys. J., 654, 347-360 (2007)>
* =2007ApJ...654..347L
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table1.dat' ! Chandra X-Ray Sources in M16: WFPC2 Field
integer*4 nr__
parameter (nr__=40) ! Number of records
character*77 ar__ ! Full-size record
C J2000.0 position composed of: RAh RAm RAs DE- DEd DEm DEs
real*8 RAdeg ! (deg) Right Ascension J2000.0
real*8 DEdeg ! (deg) Declination J2000.0
C ---------------------------------- ! (position vector(s) in degrees)
integer*4 v_LGM2007_ ! Source number
character*16 Name ! X-ray source name (JHHMMSS.s+DDMMSS)
integer*4 RAh ! (h) Right ascension (J2000.0)
integer*4 RAm ! (min) Right ascension (J2000.0)
real*4 RAs ! (s) Right ascension (J2000.0)
character*1 DE_ ! Declination sign (J2000.0)
integer*4 DEd ! (deg) Declination (J2000.0)
integer*4 DEm ! (arcmin) Declination (J2000.0)
real*4 DEs ! (arcsec) Declination (J2000.0)
integer*4 Rct ! (ct) Raw counts
real*4 Nct ! (ct) Net counts
real*4 e_Nct ! (ct) rms uncertainty on Nct
real*4 fX ! (10-19W/m2) 0.5-7.0keV X-ray flux in 10^-16^arg/cm^2^/s
* (not corrected for absorption)
real*4 K_S ! K-S time variability statistic
real*4 Emed ! (keV) Mean photon energy
character*1 T3 ! [*] * indicates Sugitani matches
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table2.dat' ! *Optical and Near-Infrared Counterparts:
WFPC2 Field
integer*4 nr__1
parameter (nr__1=41) ! Number of records
character*148 ar__1 ! Full-size record
C J2000.0 position composed of: RAh RAm RAs DE- DEd DEm DEs
real*8 RAdeg_1 ! (deg) Right Ascension J2000.0
real*8 DEdeg_1 ! (deg) Declination J2000.0
C ---------------------------------- ! (position vector(s) in degrees)
integer*4 v_LGM2007__1 ! Source number
character*16 Name_1 ! X-ray source name (JHHMMSS.s+DDMMSS)
integer*4 RAh_1 ! (h) ? VLT Right ascension (J2000.0)
integer*4 RAm_1 ! (min) ? VLT Right ascension (J2000.0)
real*4 RAs_1 ! (s) ? VLT Right ascension (J2000.0)
character*1 DE__1 ! ? VLT Declination sign (J2000.0)
integer*4 DEd_1 ! (deg) ? VLT Declination (J2000.0)
integer*4 DEm_1 ! (arcmin) ? VLT Declination (J2000.0)
real*4 DEs_1 ! (arcsec) ? VLT Declination (J2000.0)
real*4 OVLT ! (arcsec) ? Offset with VLT source
real*4 Jsmag ! (mag) ? VLT Js magnitude
real*4 Hmag ! (mag) ? VLT H magnitude
real*4 Ksmag ! (mag) ? VLT Ks magnitude
integer*4 RA2h ! (h) ? 2MASS Right ascension (J2000.0)
integer*4 RA2m ! (min) ? 2MASS Right ascension (J2000.0)
real*4 RA2s ! (s) ? 2MASS Right ascension (J2000.0)
character*1 DE2_ ! ? 2MASS Declination sign (J2000.0)
integer*4 DE2d ! (deg) ? 2MASS Declination (J2000.0)
integer*4 DE2m ! (arcmin) ? 2MASS Declination (J2000.0)
real*4 DE2s ! (arcsec) ? 2MASS Declination (J2000.0)
real*4 O2M ! (arcsec) ? Offset with 2MASS source
real*4 J2mag ! (mag) ? 2MASS J magnitude
real*4 H2mag ! (mag) ? 2MASS H magnitude
real*4 Ks2mag ! (mag) ? 2MASS Ks magnitude
integer*4 Walk ! ? Walker number, 1961ApJ...133..438W,
* NGC 6611 NNN
integer*4 BKP ! ? Belikov number, 1999, Cat. <J/A+AS/134/525>,
* Cl* NGC 6611 BKP NNNNN in Simbad
real*4 Bmag ! (mag) ? B magnitude
real*4 Vmag ! (mag) ? V magnitude
character*4 SpT ! MK spectral type
real*4 AV ! (mag) ? Absorption in V band
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'table3.dat' ! Chandra Sources in M16:
Sugitani et al. (2002ApJ...565L..25S) Matches
integer*4 nr__2
parameter (nr__2=40) ! Number of records
character*94 ar__2 ! Full-size record
integer*4 v_LGM2007__2 ! Source number
character*16 Name_2 ! Source name (JHHMMSS.s+DDMMSS)
character*15 Sug ! Sugitani et al. (2002ApJ...565L..25S)
* SN IRS designation (1)
character*1 n_Sug ! [c] Note on Sug (2)
real*4 Offset ! (arcsec) Offset between positions
real*4 CR ! (ct/s) Net counts rate
real*4 K_S_1 ! K-S time variability statistic
real*4 Emed_1 ! (keV) Mean photon energy
real*4 fX_1 ! (10-19W/m2) Absorpbed 0.5-7.0keV X-ray flux
real*4 Jmag ! (mag) ?=- J magnitude
real*4 Hmag_1 ! (mag) H magnitude
real*4 Ksmag_1 ! (mag) Ks magnitude
real*4 AV_1 ! (mag) ?=- Absorption in V band
real*4 logLX ! (10-7W) Unabsorbed 0.5-7keV luminosity assuming d=2kpc
character*1 T1 ! [*] * indicates objects in WFPC2 field
*Note (1): For all sources but 3, the name is HHMMSS.s+DDMMSS.
* * M16 ES-2 (T1) = [TSH2002] M16 ES-2 = [STN2002] T1 in Simbad
* * M16 ES-1 (P1) = [TSH2002] M16 ES-1 = [STN2002] P1 in Simbad
*Note (2): c = For the bright star BD-13 4930 photometry is from 2MASS, and
* astrometry is from Hipparcos
C=============================================================================
C Loading file 'table1.dat' ! Chandra X-Ray Sources in M16: WFPC2 Field
C Format for file interpretation
1 format(
+ I3,1X,A16,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,I3,1X,
+ F5.1,1X,F4.1,1X,F5.1,1X,F4.2,1X,F4.2,1X,A1)
C Effective file loading
open(unit=1,status='old',file=
+'table1.dat')
write(6,*) '....Loading file: table1.dat'
do i__=1,40
read(1,'(A77)')ar__
read(ar__,1)
+ v_LGM2007_,Name,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Rct,Nct,e_Nct,fX,
+ K_S,Emed,T3
RAdeg = rNULL__
DEdeg = rNULL__
c Derive coordinates RAdeg and DEdeg from input data
c (RAdeg and DEdeg are set to rNULL__ when unknown)
if(RAh .GT. -180) RAdeg=RAh*15.
if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
if(DEd .GE. 0) DEdeg=DEd
if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c ..............Just test output...........
write(6,1)
+ v_LGM2007_,Name,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Rct,Nct,e_Nct,fX,
+ K_S,Emed,T3
write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'table2.dat' ! *Optical and Near-Infrared Counterparts:
* WFPC2 Field
C Format for file interpretation
2 format(
+ I3,1X,A16,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F4.2,
+ 1X,F5.2,1X,F5.2,3X,F5.2,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,
+ F4.1,1X,F4.2,1X,F5.2,1X,F5.2,1X,F5.2,1X,I3,1X,I5,1X,F5.2,1X,
+ F5.2,1X,A4,1X,F4.2)
C Effective file loading
open(unit=1,status='old',file=
+'table2.dat')
write(6,*) '....Loading file: table2.dat'
do i__=1,41
read(1,'(A148)')ar__1
read(ar__1,2)
+ v_LGM2007__1,Name_1,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,
+ OVLT,Jsmag,Hmag,Ksmag,RA2h,RA2m,RA2s,DE2_,DE2d,DE2m,DE2s,O2M,
+ J2mag,H2mag,Ks2mag,Walk,BKP,Bmag,Vmag,SpT,AV
if(ar__1(22:23) .EQ. '') RAh_1 = iNULL__
if(ar__1(25:26) .EQ. '') RAm_1 = iNULL__
if(ar__1(28:32) .EQ. '') RAs_1 = rNULL__
if(ar__1(35:36) .EQ. '') DEd_1 = iNULL__
if(ar__1(38:39) .EQ. '') DEm_1 = iNULL__
if(ar__1(41:44) .EQ. '') DEs_1 = rNULL__
if(ar__1(46:49) .EQ. '') OVLT = rNULL__
if(ar__1(51:55) .EQ. '') Jsmag = rNULL__
if(ar__1(57:61) .EQ. '') Hmag = rNULL__
if(ar__1(65:69) .EQ. '') Ksmag = rNULL__
if(ar__1(71:72) .EQ. '') RA2h = iNULL__
if(ar__1(74:75) .EQ. '') RA2m = iNULL__
if(ar__1(77:81) .EQ. '') RA2s = rNULL__
if(ar__1(84:85) .EQ. '') DE2d = iNULL__
if(ar__1(87:88) .EQ. '') DE2m = iNULL__
if(ar__1(90:93) .EQ. '') DE2s = rNULL__
if(ar__1(95:98) .EQ. '') O2M = rNULL__
if(ar__1(100:104) .EQ. '') J2mag = rNULL__
if(ar__1(106:110) .EQ. '') H2mag = rNULL__
if(ar__1(112:116) .EQ. '') Ks2mag = rNULL__
if(ar__1(118:120) .EQ. '') Walk = iNULL__
if(ar__1(122:126) .EQ. '') BKP = iNULL__
if(ar__1(128:132) .EQ. '') Bmag = rNULL__
if(ar__1(134:138) .EQ. '') Vmag = rNULL__
if(ar__1(145:148) .EQ. '') AV = rNULL__
RAdeg_1 = rNULL__
DEdeg_1 = rNULL__
c Derive coordinates RAdeg_1 and DEdeg_1 from input data
c (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
if(DEd_1 .GE. 0) DEdeg_1=DEd_1
if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c ..............Just test output...........
write(6,2)
+ v_LGM2007__1,Name_1,RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,
+ OVLT,Jsmag,Hmag,Ksmag,RA2h,RA2m,RA2s,DE2_,DE2d,DE2m,DE2s,O2M,
+ J2mag,H2mag,Ks2mag,Walk,BKP,Bmag,Vmag,SpT,AV
write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
C Loading file 'table3.dat' ! Chandra Sources in M16:
* Sugitani et al. (2002ApJ...565L..25S) Matches
C Format for file interpretation
3 format(
+ I3,1X,A16,1X,A15,A1,1X,F4.2,1X,F5.1,1X,F4.2,1X,F4.2,1X,F5.1,
+ 1X,F5.2,1X,F5.2,1X,F5.2,1X,F4.1,1X,F4.1,1X,A1)
C Effective file loading
open(unit=1,status='old',file=
+'table3.dat')
write(6,*) '....Loading file: table3.dat'
do i__=1,40
read(1,'(A94)')ar__2
read(ar__2,3)
+ v_LGM2007__2,Name_2,Sug,n_Sug,Offset,CR,K_S_1,Emed_1,fX_1,
+ Jmag,Hmag_1,Ksmag_1,AV_1,logLX,T1
if (idig(ar__2(66:70)).EQ.0) Jmag = rNULL__
if (idig(ar__2(84:87)).EQ.0) AV_1 = rNULL__
c ..............Just test output...........
write(6,3)
+ v_LGM2007__2,Name_2,Sug,n_Sug,Offset,CR,K_S_1,Emed_1,fX_1,
+ Jmag,Hmag_1,Ksmag_1,AV_1,logLX,T1
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