FORTRAN Generation
(/./ftp/cats/J/ApJ/743/64)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/743/64 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-07
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/743/64    Deep infrared photometry of {sigma} Ori cluster   (Bejar+, 2011)
*================================================================================
*The substellar population of {sigma} Orionis: a deep wide survey.
*    Bejar V.J.S., Zapatero Osorio M.R., Rebolo R., Caballero J.A., Barrado D.,
*    Martin E.L., Mundt R., Bailer-Jones C.A.L.
*   <Astrophys. J., 743, 64 (2011)>
*   =2011ApJ...743...64B
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table2.dat'	! Photometry and coordinates of survey candidates

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

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

      character*3   Field       ! Field name (SO1 to SO4)
      character*2   Det         ! Detector number (D1 to D4)
      character*19  Name        ! Position-based name (JHHMMSS.ss+DDMMSS.s)
      character*8   OName       ! Previous name (S Ori NN or MNNNNNNN;
*                                   <[BZR99] S Ori NN> or <Mayrit NNNNNNN> in
*                                   Simbad)
      integer*4     Ref         ! ? Reference (1)
      real*4        Imag        ! (mag) INT/WFC Cousins I system magnitude
      real*4        e_Imag      ! (mag) Imag uncertainty
      real*4        I_Z         ! (mag) INT/WFC I-Z color index
      real*4        e_I_Z       ! (mag) I-Z uncertainty
      character*1   l_Jmag      ! Limit flag on Jmag
      real*4        Jmag        ! (mag) ? CAIN J-band magnitude
      real*4        e_Jmag      ! (mag) ? Jmag uncertainty
      character*1   r_Jmag      ! [abcd] Photometry source (2)
      character*1   l_I_J       ! Limit flag on I-J
      real*4        I_J         ! (mag) ? I-J color index
      real*4        e_I_J       ! (mag) ? I-J uncertainty
      real*4        Jmag2       ! (mag) ? 2MASS J-band magnitude
      real*4        e_Jmag2     ! (mag) ? Jmag2 uncertainty
      real*4        Hmag        ! (mag) ? 2MASS H-band magnitude
      real*4        e_Hmag      ! (mag) ? Hmag uncertainty
      character*1   l_Ksmag     ! Limit flag on Ksmag
      real*4        Ksmag       ! (mag) ? 2MASS Ks-band magnitude
      real*4        e_Ksmag     ! (mag) ? Ksmag uncertainty
      integer*4     RAh         ! (h) Hour of right ascension (J2000)
      integer*4     RAm         ! (min) Minute of right ascension (J2000)
      real*4        RAs         ! (s) Second of right ascension (J2000)
      character*1   DE_         ! Sign of declination (J2000)
      integer*4     DEd         ! (deg) Degree of declination (J2000)
      integer*4     DEm         ! (arcmin) Arcminute of declination (J2000)
      real*4        DEs         ! (arcsec) Arcsecond of declination (J2000)
      character*2   Mm          ! Membership code (3)
*Note (1): Reference as follows:
*   1 = Bejar et al. 1999 (BZOR; 1999ApJ...521..671B;
*       <[BZR99] S Ori NN> in Simbad);
*   2 = Zapatero Osorio et al. 2000Sci...290..103Z;
*   3 = Bejar et al. 2001 (BMZO; 2001ApJ...556..830B;
*       <[BMZ2001] S Ori JHHMMSS.s+DDMMSS> in Simbad);
*   4 = Zapatero Osorio et al. 2002A&A...384..937Z;
*   5 = Bejar et al. 2004, Cat. J/AN/325/705;
*   6 = Kenyon et al. 2005, Cat. J/MNRAS/356/89;
*   7 = Burningham et al. 2005, Cat. J/MNRAS/356/1583;
*   8 = Caballero et al. 2004A&A...424..857C, 2007A&A...470..903C;
*   9 = Caballero 2008, Cat. J/A+A/478/667;
*  10 = Lodieu et al. 2009A&A...505.1115L
*Note (2): Photometry source flag as follows:
*   a = Photometry from Omega-Prime.
*   b = Photometry from CAIN calibrated with 2MASS.
*   c = Photometry from UKIDSS.
*   d = Photometry from MAGIC.
*Note (3): Membership code as follows:
*  MC = Good cluster Member Candidate;
*  NM = Probable Non Member;
*  OB = Possibly belonging to the Orion Background population.

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

C  Declarations for 'table3.dat'	! UKIDSS and IRAC photometry

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

      character*19  Name_1      ! Position-based name (JHHMMSS.ss+DDMMSS.s)
      real*4        ImagU       ! (mag) UKIDSS I-band magnitude
      real*4        e_ImagU     ! (mag) Imag uncertainty
      real*4        ZmagU       ! (mag) ? UKIDSS Z-band magnitude
      real*4        e_ZmagU     ! (mag) ? Zmag uncertainty
      real*4        YmagU       ! (mag) ? UKIDSS Y-band magnitude
      real*4        e_YmagU     ! (mag) ? Ymag uncertainty
      real*4        JmagU       ! (mag) ? UKIDSS J-band magnitude
      real*4        e_JmagU     ! (mag) ? Jmag uncertainty
      real*4        HmagU       ! (mag) ? UKIDSS H-band magnitude
      real*4        e_HmagU     ! (mag) ? Hmag uncertainty
      real*4        KmagU       ! (mag) ? UKIDSS K-band magnitude
      real*4        e_KmagU     ! (mag) ? Kmag uncertainty
      real*4        v_3_6_      ! (mag) ? Spitzer/IRAC 3.6um band magnitude
      real*4        e__3_6_     ! (mag) ? Uncertainty on [3.6]mag
      real*4        v_4_5_      ! (mag) ? Spitzer/IRAC 4.5um band magnitude
      real*4        e__4_5_     ! (mag) ? Uncertainty on [4.5]mag
      real*4        v_5_4_      ! (mag) ? Spitzer/IRAC 5.4um band magnitude
      real*4        e__5_4_     ! (mag) ? Uncertainty on [5.4]mag
      real*4        v_8_0_      ! (mag) ? Spitzer/IRAC 8.0um band magnitude
      real*4        e__8_0_     ! (mag) ? Uncertainty on [8.0]mag
      character*1   E_n         ! [YN] Near infrared excess? (Y or N)
      character*1   E_m         ! [YN] Mid-IR excess? (Y or N)

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

C  Loading file 'table2.dat'	! Photometry and coordinates of survey candidates

C  Format for file interpretation

    1 format(
     +  A3,1X,A2,7X,A19,1X,A8,1X,I2,1X,F6.3,1X,F5.3,1X,F5.3,1X,F5.3,
     +  1X,A1,F6.3,1X,F5.3,1X,A1,1X,A1,F5.3,1X,F5.3,1X,F6.3,1X,F5.3,
     +  1X,F6.3,1X,F5.3,1X,A1,F6.3,1X,F5.3,1X,I2,1X,I2,1X,F5.2,1X,A1,
     +  I2,1X,I2,1X,F4.1,1X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,158
        read(1,'(A165)')ar__
        read(ar__,1)
     +  Field,Det,Name,OName,Ref,Imag,e_Imag,I_Z,e_I_Z,l_Jmag,Jmag,
     +  e_Jmag,r_Jmag,l_I_J,I_J,e_I_J,Jmag2,e_Jmag2,Hmag,e_Hmag,
     +  l_Ksmag,Ksmag,e_Ksmag,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Mm
        if(ar__(43:44) .EQ. '') Ref = iNULL__
        if(ar__(72:77) .EQ. '') Jmag = rNULL__
        if(ar__(79:83) .EQ. '') e_Jmag = rNULL__
        if(ar__(88:92) .EQ. '') I_J = rNULL__
        if(ar__(94:98) .EQ. '') e_I_J = rNULL__
        if(ar__(100:105) .EQ. '') Jmag2 = rNULL__
        if(ar__(107:111) .EQ. '') e_Jmag2 = rNULL__
        if(ar__(113:118) .EQ. '') Hmag = rNULL__
        if(ar__(120:124) .EQ. '') e_Hmag = rNULL__
        if(ar__(127:132) .EQ. '') Ksmag = rNULL__
        if(ar__(134:138) .EQ. '') e_Ksmag = 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)
     +  Field,Det,Name,OName,Ref,Imag,e_Imag,I_Z,e_I_Z,l_Jmag,Jmag,
     +  e_Jmag,r_Jmag,l_I_J,I_J,e_I_J,Jmag2,e_Jmag2,Hmag,e_Hmag,
     +  l_Ksmag,Ksmag,e_Ksmag,RAh,RAm,RAs,DE_,DEd,DEm,DEs,Mm
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table3.dat'	! UKIDSS and IRAC photometry

C  Format for file interpretation

    2 format(
     +  6X,A19,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,
     +  F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,
     +  1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,F6.3,1X,F5.3,1X,A1,1X,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,158
        read(1,'(A159)')ar__1
        read(ar__1,2)
     +  Name_1,ImagU,e_ImagU,ZmagU,e_ZmagU,YmagU,e_YmagU,JmagU,
     +  e_JmagU,HmagU,e_HmagU,KmagU,e_KmagU,v_3_6_,e__3_6_,v_4_5_,
     +  e__4_5_,v_5_4_,e__5_4_,v_8_0_,e__8_0_,E_n,E_m
        if(ar__1(40:45) .EQ. '') ZmagU = rNULL__
        if(ar__1(47:51) .EQ. '') e_ZmagU = rNULL__
        if(ar__1(53:58) .EQ. '') YmagU = rNULL__
        if(ar__1(60:64) .EQ. '') e_YmagU = rNULL__
        if(ar__1(66:71) .EQ. '') JmagU = rNULL__
        if(ar__1(73:77) .EQ. '') e_JmagU = rNULL__
        if(ar__1(79:84) .EQ. '') HmagU = rNULL__
        if(ar__1(86:90) .EQ. '') e_HmagU = rNULL__
        if(ar__1(92:97) .EQ. '') KmagU = rNULL__
        if(ar__1(99:103) .EQ. '') e_KmagU = rNULL__
        if(ar__1(105:110) .EQ. '') v_3_6_ = rNULL__
        if(ar__1(112:116) .EQ. '') e__3_6_ = rNULL__
        if(ar__1(118:123) .EQ. '') v_4_5_ = rNULL__
        if(ar__1(125:129) .EQ. '') e__4_5_ = rNULL__
        if(ar__1(131:136) .EQ. '') v_5_4_ = rNULL__
        if(ar__1(138:142) .EQ. '') e__5_4_ = rNULL__
        if(ar__1(144:149) .EQ. '') v_8_0_ = rNULL__
        if(ar__1(151:155) .EQ. '') e__8_0_ = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1,ImagU,e_ImagU,ZmagU,e_ZmagU,YmagU,e_YmagU,JmagU,
     +  e_JmagU,HmagU,e_HmagU,KmagU,e_KmagU,v_3_6_,e__3_6_,v_4_5_,
     +  e__4_5_,v_5_4_,e__5_4_,v_8_0_,e__8_0_,E_n,E_m
c    .......End.of.Just test output...........
      end do
      close(1)

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