FORTRAN Generation
(/./ftp/cats/J/ApJ/614/267)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/614/267 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-18
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/614/267     Chandra sources in Cha I North              (Feigelson+, 2004)
*================================================================================
*An X-ray census of young stars in the Chamaeleon I North cloud.
*    Feigelson E.D., Lawson W.A.
*   <Astrophys. J., 614, 267-283 (2004)>
*   =2004ApJ...614..267F
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! Chandra sources and counterparts in Cha I North

      integer*4 nr__
      parameter (nr__=107)	! Number of records
      character*51 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_FL2004_   ! Source designation
      character*1   f__FL2004_  ! [a] Flag on [FL2004] (G1)
      integer*4     RAh         ! (h) Hour of Right Ascension (J2000.0) (1)
      integer*4     RAm         ! (min) Minute of Right Ascension (J2000.0) (1)
      real*4        RAs         ! (s) Second of Right Ascension (J2000.0) (1)
      character*1   DE_         ! Sign of the Declination (J2000.0) (1)
      integer*4     DEd         ! (deg) Degree of Declination (J2000.0) (1)
      integer*4     DEm         ! (arcmin) Arcminute of Declination (J2000.0) (1)
      real*4        DEs         ! (arcsec) Arcsecond of Declination (J2000.0) (1)
      real*4        theta       ! (arcmin) Off-axis angle
      integer*4     counts      ! (ct) Background-subtracted extracted counts (2)
      integer*4     CHRX        ! ? Cross-reference to earlier ROSAT sources
*                                   (Feigelson et al., 1993ApJ...416..623F)
      character*7   Star        ! Stellar counterpart (3)
      real*4        X_IR        ! (arcsec) ? Offset between Chandra and 2MASS positions
*Note (1): Position (J2000.0) from the ACIS image aligned to 2MASS sources.
*     Generally, positions are accurate to less than 0.3" for off-axis angle
*     {theta}<5'and more than 100 counts. Positional accuracy degrades to
*     ~1" for fainter on-axis sources and to 2"-3" for sources far off-axis
*     ({theta}>10').
*Note (2): The 0.5-8keV events in the 95% enclosed-energy polygon after
*     subtracting background and rounding to the nearest integer obtained
*     from acis_extract.
*Note (3): Name from the cloud membership list by Carpenter et al. (2002,
*     Cat. J/AJ/124/1001). "Field" indicates previously unremarked stellar
*     counterparts. The remainder of the X-ray sources are probably
*     extragalactic.

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

C  Declarations for 'table2.dat'	! X-ray properties of Chandra Cha I North
                              stellar sources

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

      integer*4     v_FL2004__1 ! Source identification
      character*1   f__FL2004__1 ! [a] Flag on [FL2004] (G1)
      character*7   OName       ! Other name
      integer*4     CX          ! (ct) C_X_ events (1)
      integer*4     BX          ! (ct) B_X_ values, background counts scaled to the
*                                     extraction region (1)
      character*1   Var         ! [a-c] Variability indicator (1) (2)
      real*4        logNH       ! ([cm-2]) Hydrogen column density
      character*1   u_logNH     ! Uncertainty flag on logNH
      real*4        kT1         ! (keV) Plasma energy
      character*1   u_kT1       ! Uncertainty flag on kT1
      real*4        e_kT1       ! (keV) ? Error in kT1
      real*4        kT2         ! (keV) ? Plasma energy
      real*4        logLs       ! ([10-7W]) Log of X-ray luminosity L_s_ in the soft
*                                     0.5-2keV band (3)
      real*4        logLt       ! ([10-7W]) Log of X-ray luminosity L_t_ in the total
*                                     0.5-8keV band (3)
      real*4        logLc       ! ([10-7W]) ? Absorption-corrected luminosity L_c_
*Note (1): The analysis used acis_extract, version 1.1, for extraction and
*     variability analysis, see
*     http://www.astro.psu.edu/xray/docs/TARA/ae_users_guide.html
*Note (2): The variability indicator based on the arrival times of the
*     extracted events. It is coded to the probability of the
*     Kolmogorov-Smirnov test P_KS_ that the source has no significant
*     variation during the exposure, as follows:
*      a = P_KS_>0.05 (no evidence for variability),
*      b = 0.005>P_KS_>0.05 (possibly variable),
*      c = P_KS_<0.005 (definitely variable).
*Note (3): The X-ray luminosities assume the star lies at a distance of 160pc.

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

C  Declarations for 'table3.dat'	! Optical-infrared properties of Chandra Cha I North
                              stellar sources

      integer*4 nr__2
      parameter (nr__2=37)	! Number of records
      character*92 ar__2  	! Full-size record

      integer*4     v_FL2004__2 ! Source designation
      character*7   OName_1     ! Star name
      character*6   Prop        ! Property flag (1)
      character*6   Class       ! Classification type (2)
      real*4        Rmag        ! (mag) ? USNO-B1.0 (Cat. I/284) R magnitude
      real*4        Imag        ! (mag) ? i or I magnitude (3)
      real*4        Jmag        ! (mag) 2MASS J magnitude
      character*1   u_Jmag      ! Uncertainty flag on Jmag
      real*4        Hmag        ! (mag) 2MASS H magnitude
      character*1   u_Hmag      ! Uncertainty flag on Hmag
      character*1   l_Kmag      ! Limit flag on Kmag
      real*4        Kmag        ! (mag) 2MASS K magnitude
      character*1   u_Kmag      ! Uncertainty flag on Kmag
      real*4        m6_7        ! (mag) ? 6.7{mu}m band magnitude (4)
      real*4        m14_3       ! (mag) ? 14.3{mu}m band magnitude (4)
      character*5   SpType      ! Spectral type
      real*4        Lbol        ! (solLum) ? Bolometric luminosity
      character*1   u_Lbol      ! [?] Uncertainty flag on Lbol
      real*4        Mass        ! (solMass) ? Mass
      character*1   u_Mass      ! Uncertainty flag on Mass
      character*1   l_Age       ! Limit flag on Age
      integer*4     Age         ! (Myr) ? Age
*Note (1): Six-character flag indicating the properties of that star from
*     Carpenter et al. (2002, Cat. J/AJ/124/1001): variable in optical or
*     K, H{alpha} emission, Li absorption, X-ray source (prior to the
*     present study), infrared excess, and far-infrared source.
*Note (2): The classification type, defined as follows:
*    WTT = weak-lined T Tauri star
*    CTT = classical T Tauri star
*    I   = imbedded
*    BD  = brown dwarf
*    AB  = Herbig AeBe star
*Note (3): i or I magnitudes from the second DENIS data release (Cat.
*     B/denis) or our SAAO I survey (this paper).
*Note (4): 6.7 and 14.3{mu}m magnitudes from the Infrared Space Observatory
*     survey.

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

C  Loading file 'table1.dat'	! Chandra sources and counterparts in Cha I North

C  Format for file interpretation

    1 format(
     +  I3,A1,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,F4.1,1X,F4.1,1X,I4,
     +  1X,I2,1X,A7,1X,F3.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,107
        read(1,'(A51)')ar__
        read(ar__,1)
     +  v_FL2004_,f__FL2004_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,theta,counts,
     +  CHRX,Star,X_IR
        if(ar__(38:39) .EQ. '') CHRX = iNULL__
        if(ar__(49:51) .EQ. '') X_IR = rNULL__
        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_FL2004_,f__FL2004_,RAh,RAm,RAs,DE_,DEd,DEm,DEs,theta,counts,
     +  CHRX,Star,X_IR
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! X-ray properties of Chandra Cha I North
*                              stellar sources

C  Format for file interpretation

    2 format(
     +  I3,A1,A7,1X,I4,1X,I2,1X,A1,1X,F4.1,A1,1X,F4.1,A1,1X,F3.1,1X,
     +  F3.1,1X,F4.1,1X,F4.1,1X,F4.1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,37
        read(1,'(A57)')ar__1
        read(ar__1,2)
     +  v_FL2004__1,f__FL2004__1,OName,CX,BX,Var,logNH,u_logNH,kT1,
     +  u_kT1,e_kT1,kT2,logLs,logLt,logLc
        if(ar__1(35:37) .EQ. '') e_kT1 = rNULL__
        if(ar__1(39:41) .EQ. '') kT2 = rNULL__
        if(ar__1(53:56) .EQ. '') logLc = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  v_FL2004__1,f__FL2004__1,OName,CX,BX,Var,logNH,u_logNH,kT1,
     +  u_kT1,e_kT1,kT2,logLs,logLt,logLc
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Optical-infrared properties of Chandra Cha I North
*                              stellar sources

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,37
        read(1,'(A92)')ar__2
        read(ar__2,3)
     +  v_FL2004__2,OName_1,Prop,Class,Rmag,Imag,Jmag,u_Jmag,Hmag,
     +  u_Hmag,l_Kmag,Kmag,u_Kmag,m6_7,m14_3,SpType,Lbol,u_Lbol,Mass,
     +  u_Mass,l_Age,Age
        if(ar__2(27:30) .EQ. '') Rmag = rNULL__
        if(ar__2(32:36) .EQ. '') Imag = rNULL__
        if(ar__2(60:64) .EQ. '') m6_7 = rNULL__
        if(ar__2(66:69) .EQ. '') m14_3 = rNULL__
        if(ar__2(77:82) .EQ. '') Lbol = rNULL__
        if(ar__2(84:87) .EQ. '') Mass = rNULL__
        if(ar__2(91:92) .EQ. '') Age = iNULL__
c    ..............Just test output...........
        write(6,3)
     +  v_FL2004__2,OName_1,Prop,Class,Rmag,Imag,Jmag,u_Jmag,Hmag,
     +  u_Hmag,l_Kmag,Kmag,u_Kmag,m6_7,m14_3,SpType,Lbol,u_Lbol,Mass,
     +  u_Mass,l_Age,Age
c    .......End.of.Just test output...........
      end do
      close(1)

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