FORTRAN Generation
(/./ftp/cats/J/AJ/123/2223)

Conversion of standardized ReadMe file for file /./ftp/cats/J/AJ/123/2223 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 2024-Mar-28
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/123/2223       SPICES II: CHANDRA observations of Lynx  (Stern+, 2002)
*================================================================================
*SPICES II: optical and near-infrared identifications of faint X-ray sources
*from deep CHANDRA observations of Lynx.
*    Stern D., Tozzi P., Stanford S.A., Rosati P., Holden B., Eisenhardt P.,
*    Elston R., Wu K.L., Connolly A., Spinrad H., Dawson S., Dey A., Chaffee F.H.
*   <Astron. J. 123, 2223 (2002)>
*   =2002AJ....123.2223S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1.dat'	! X-ray source properties

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

C  J2000.0 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg      (nr__) ! (deg) Right Ascension J2000.0
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000.0
C  ---------------------------------- ! (position vector(s) in degrees)

      integer*4     v_STS2002_ (nr__) ! Sequential number
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000.0)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000.0)
      real*4        RAs        (nr__) ! (s) Right ascension (J2000.0)
      character*1   DE_        (nr__) ! Declination sign (J2000.0)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000.0)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000.0)
      real*4        DEs        (nr__) ! (arcsec) Declination (J2000.0)
      real*8        Scounts    (nr__) ! (ct) ? Counts in the soft band (0.5-2keV)
      real*4        e_Scounts  (nr__) ! (ct) ? rms uncertainty on Scounts
      real*4        Hcounts    (nr__) ! (ct) ? Counts in the hard band (2-7keV)
      real*4        e_Hcounts  (nr__) ! (ct) ? rms uncertainty on Hcounts
      real*4        HR         (nr__) ! ? Hardness ratio (H-S)/(H+S)
      real*4        S_N        (nr__) ! Signal-to-noise ratio of the X-ray detection
      real*4        Dist       (nr__) ! (arcmin) Off-axis angle of the X-ray source (1)
      real*4        S0_5_2keV  (nr__) ! (10-18W/m2) ? Flux in the soft band (0.5-2keV)
      real*4        S2_10keV   (nr__) ! (10-18W/m2) ? Flux in the hard band (2-10keV)
*Note (1): Offset from the nominal pointing direction.

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

C  Declarations for 'table2.dat'	! Optical/Near-IR Properties of X-Ray Sources

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

      integer*4     v_STS2002__1(nr__1) ! Source identification number
      character*1   f__STS2002_(nr__1) ! [a] Flag on [STS2002] (1)
      real*4        oRA        (nr__1) ! (arcsec) ? X-ray minus optical right ascension offset
      character*1   f_oRA      (nr__1) ! [u] Indicates undetected source
      real*4        oDE        (nr__1) ! (arcsec) ? X-ray minus optical declination offset
      character*1   f_oDE      (nr__1) ! [u] Indicates undetected source
      real*4        Bmag       (nr__1) ! (mag) ? The Harris B band magnitude (3)
      character*1   f_Bmag     (nr__1) ! [u] Indicates undetected source
      real*4        Rmag       (nr__1) ! (mag) ? The Harris R band magnitude (3)
      character*1   f_Rmag     (nr__1) ! [u] Indicates undetected source
      character*1   u_Rmag     (nr__1) ! [:] Indicates Rmag somewhat affected by nearby
*                                       stellar bleed trail
      real*4        Imag       (nr__1) ! (mag) ? The Harris I band magnitude (3)
      character*1   f_Imag     (nr__1) ! [u] Indicates undetected source
      real*4        zmag       (nr__1) ! (mag) ? The RG850 long-pass z band magnitude
      character*1   f_zmag     (nr__1) ! [u] Indicates undetected source
      real*4        Jmag       (nr__1) ! (mag) ? The J band magnitude (4)
      character*1   f_Jmag     (nr__1) ! [u] Indicates undetected source
      real*4        Ksmag      (nr__1) ! (mag) ? The K_s_ band magnitude (4)
      character*1   f_Ksmag    (nr__1) ! [u] Indicates undetected source
      real*4        z          (nr__1) ! ? Spectroscopic redshift
      character*1   f_z        (nr__1) ! [u] Indicates undetected source
      character*12  SID        (nr__1) ! The SPICES identification
*Note (1): Indicates host is more than 1.5" away from faint X-ray source.
*Note (3): Sources with bad photometry, due either to source saturation or
*    contamination from the stellar bleed trail of a nearby, bright source,
*    are listed as 99.00.
*    The Harris passbands are:
*    B-band: {lambda}_c_ = 431.3nm  D{lambda} = 106.9nm
*    R-band: {lambda}_c_ = 645.8nm  D{lambda} = 147.2nm
*    I-band: {lambda}_c_ = 820.4nm  D{lambda} = 182.1nm
*Note (4): Only those sources contained within the near-infrared field are
*    tabulated under the near-infrared photometry columns. Sources with bad
*    photometry, due either to source saturation or contamination from the
*    stellar bleed trail of a nearby, bright source, are listed as 99.00.

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

C  Declarations for 'table3.dat'	! Luminosities of X-ray sources

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

      integer*4     v_STS2002__2(nr__2) ! Sequential number
      real*4        z_1        (nr__2) ! Redshift
      real*4        BMAG_E     (nr__2) ! (mag) ? EdS rest-frame absolute B magnitude (1)
      real*4        log_L0_5_2keV_E(nr__2) ! ([solLum]) ? EdS 0.5-2keV band luminosity (1)
      real*4        log_L2_10keV_E(nr__2) ! ([solLum]) ? EdS 2-10keV band luminosity (1)
      real*4        BMAG_L     (nr__2) ! (mag) ? {Lambda} rest-frame absolute B
*                                          magnitude (1)
      real*4        log_L0_5_2keV_L(nr__2) ! ([solLum]) ? {Lambda} 0.5-2keV band luminosity (1)
      real*4        log_L2_10keV_L(nr__2) ! ([solLum]) ? {Lambda} 2-10keV band luminosity (1)
      character*20  Class      (nr__2) ! Galaxy class or spectral type for stars
*Note (1): We adopt {Gamma}=1.4 for calculation of X-ray k-corrections.
*      EdS: Einstein-de Sitter universe with
*            H_0_=50km/s/Mpc, {Omega}_M_=1, {Omega}_{Lambda}_=0
* {Lambda}: dark energy cosmology with
*            H_0_=65km/s/Mpc, {Omega}_M_=0.35, {Omega}_{Lambda}_=0.65

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

C  Loading file 'table1.dat'	! X-ray source properties

C  Format for file interpretation

    1 format(
     +  I3,1X,I2,1X,I2,1X,F5.2,1X,A1,I2,1X,I2,1X,F4.1,1X,F7.2,1X,F5.2,
     +  1X,F6.2,1X,F5.2,1X,F5.2,1X,F4.1,1X,F5.2,1X,F6.2,1X,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1.dat')
      write(6,*) '....Loading file: table1.dat'
      do i__=1,153
        read(1,'(A85)')ar__
        read(ar__,1)
     +  v_STS2002_(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Scounts(i__),e_Scounts(i__),Hcounts(i__),
     +  e_Hcounts(i__),HR(i__),S_N(i__),Dist(i__),S0_5_2keV(i__),
     +  S2_10keV(i__)
        if(ar__(29:35) .EQ. '') Scounts(i__) = rNULL__
        if(ar__(37:41) .EQ. '') e_Scounts(i__) = rNULL__
        if(ar__(43:48) .EQ. '') Hcounts(i__) = rNULL__
        if(ar__(50:54) .EQ. '') e_Hcounts(i__) = rNULL__
        if(ar__(56:60) .EQ. '') HR(i__) = rNULL__
        if(ar__(73:78) .EQ. '') S0_5_2keV(i__) = rNULL__
        if(ar__(80:85) .EQ. '') S2_10keV(i__) = rNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  v_STS2002_(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__),Scounts(i__),e_Scounts(i__),Hcounts(i__),
     +  e_Hcounts(i__),HR(i__),S_N(i__),Dist(i__),S0_5_2keV(i__),
     +  S2_10keV(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! Optical/Near-IR Properties of X-Ray Sources

C  Format for file interpretation

    2 format(
     +  I3,1X,A1,2X,F5.2,1X,A1,1X,F5.2,1X,A1,1X,F5.2,1X,A1,1X,F5.2,1X,
     +  A1,1X,A1,1X,F5.2,1X,A1,1X,F5.2,1X,A1,1X,F5.2,1X,A1,1X,F5.2,1X,
     +  A1,1X,F5.3,1X,A1,1X,A12)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,106
        read(1,'(A93)')ar__1
        read(ar__1,2)
     +  v_STS2002__1(i__),f__STS2002_(i__),oRA(i__),f_oRA(i__),
     +  oDE(i__),f_oDE(i__),Bmag(i__),f_Bmag(i__),Rmag(i__),
     +  f_Rmag(i__),u_Rmag(i__),Imag(i__),f_Imag(i__),zmag(i__),
     +  f_zmag(i__),Jmag(i__),f_Jmag(i__),Ksmag(i__),f_Ksmag(i__),
     +  z(i__),f_z(i__),SID(i__)
        if(ar__1(8:12) .EQ. '') oRA(i__) = rNULL__
        if(ar__1(16:20) .EQ. '') oDE(i__) = rNULL__
        if(ar__1(24:28) .EQ. '') Bmag(i__) = rNULL__
        if(ar__1(32:36) .EQ. '') Rmag(i__) = rNULL__
        if(ar__1(42:46) .EQ. '') Imag(i__) = rNULL__
        if(ar__1(50:54) .EQ. '') zmag(i__) = rNULL__
        if(ar__1(58:62) .EQ. '') Jmag(i__) = rNULL__
        if(ar__1(66:70) .EQ. '') Ksmag(i__) = rNULL__
        if(ar__1(74:78) .EQ. '') z(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  v_STS2002__1(i__),f__STS2002_(i__),oRA(i__),f_oRA(i__),
     +  oDE(i__),f_oDE(i__),Bmag(i__),f_Bmag(i__),Rmag(i__),
     +  f_Rmag(i__),u_Rmag(i__),Imag(i__),f_Imag(i__),zmag(i__),
     +  f_zmag(i__),Jmag(i__),f_Jmag(i__),Ksmag(i__),f_Ksmag(i__),
     +  z(i__),f_z(i__),SID(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! Luminosities of X-ray sources

C  Format for file interpretation

    3 format(
     +  I3,1X,F5.3,2X,F5.1,1X,F5.2,1X,F5.2,1X,F5.1,1X,F5.2,1X,F5.2,1X,
     +  A20)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,18
        read(1,'(A67)')ar__2
        read(ar__2,3)
     +  v_STS2002__2(i__),z_1(i__),BMAG_E(i__),log_L0_5_2keV_E(i__),
     +  log_L2_10keV_E(i__),BMAG_L(i__),log_L0_5_2keV_L(i__),
     +  log_L2_10keV_L(i__),Class(i__)
        if(ar__2(12:16) .EQ. '') BMAG_E(i__) = rNULL__
        if(ar__2(18:22) .EQ. '') log_L0_5_2keV_E(i__) = rNULL__
        if(ar__2(24:28) .EQ. '') log_L2_10keV_E(i__) = rNULL__
        if(ar__2(30:34) .EQ. '') BMAG_L(i__) = rNULL__
        if(ar__2(36:40) .EQ. '') log_L0_5_2keV_L(i__) = rNULL__
        if(ar__2(42:46) .EQ. '') log_L2_10keV_L(i__) = rNULL__
c    ..............Just test output...........
        write(6,3)
     +  v_STS2002__2(i__),z_1(i__),BMAG_E(i__),log_L0_5_2keV_E(i__),
     +  log_L2_10keV_E(i__),BMAG_L(i__),log_L0_5_2keV_L(i__),
     +  log_L2_10keV_L(i__),Class(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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