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 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 2026-Oct-15
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      (nr__) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*3   Field      (nr__) ! Field name (SO1 to SO4)
      character*2   Det        (nr__) ! Detector number (D1 to D4)
      character*19  Name       (nr__) ! Position-based name (JHHMMSS.ss+DDMMSS.s)
      character*8   OName      (nr__) ! Previous name (S Ori NN or MNNNNNNN;
*                                   <[BZR99] S Ori NN> or <Mayrit NNNNNNN> in
*                                   Simbad)
      integer*4     Ref        (nr__) ! ? Reference (1)
      real*4        Imag       (nr__) ! (mag) INT/WFC Cousins I system magnitude
      real*4        e_Imag     (nr__) ! (mag) Imag uncertainty
      real*4        I_Z        (nr__) ! (mag) INT/WFC I-Z color index
      real*4        e_I_Z      (nr__) ! (mag) I-Z uncertainty
      character*1   l_Jmag     (nr__) ! Limit flag on Jmag
      real*4        Jmag       (nr__) ! (mag) ? CAIN J-band magnitude
      real*4        e_Jmag     (nr__) ! (mag) ? Jmag uncertainty
      character*1   r_Jmag     (nr__) ! [abcd] Photometry source (2)
      character*1   l_I_J      (nr__) ! Limit flag on I-J
      real*4        I_J        (nr__) ! (mag) ? I-J color index
      real*4        e_I_J      (nr__) ! (mag) ? I-J uncertainty
      real*4        Jmag2      (nr__) ! (mag) ? 2MASS J-band magnitude
      real*4        e_Jmag2    (nr__) ! (mag) ? Jmag2 uncertainty
      real*4        Hmag       (nr__) ! (mag) ? 2MASS H-band magnitude
      real*4        e_Hmag     (nr__) ! (mag) ? Hmag uncertainty
      character*1   l_Ksmag    (nr__) ! Limit flag on Ksmag
      real*4        Ksmag      (nr__) ! (mag) ? 2MASS Ks-band magnitude
      real*4        e_Ksmag    (nr__) ! (mag) ? Ksmag uncertainty
      integer*4     RAh        (nr__) ! (h) Hour of right ascension (J2000)
      integer*4     RAm        (nr__) ! (min) Minute of right ascension (J2000)
      real*4        RAs        (nr__) ! (s) Second of right ascension (J2000)
      character*1   DE_        (nr__) ! Sign of declination (J2000)
      integer*4     DEd        (nr__) ! (deg) Degree of declination (J2000)
      integer*4     DEm        (nr__) ! (arcmin) Arcminute of declination (J2000)
      real*4        DEs        (nr__) ! (arcsec) Arcsecond of declination (J2000)
      character*2   Mm         (nr__) ! 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     (nr__1) ! Position-based name (JHHMMSS.ss+DDMMSS.s)
      real*4        ImagU      (nr__1) ! (mag) UKIDSS I-band magnitude
      real*4        e_ImagU    (nr__1) ! (mag) Imag uncertainty
      real*4        ZmagU      (nr__1) ! (mag) ? UKIDSS Z-band magnitude
      real*4        e_ZmagU    (nr__1) ! (mag) ? Zmag uncertainty
      real*4        YmagU      (nr__1) ! (mag) ? UKIDSS Y-band magnitude
      real*4        e_YmagU    (nr__1) ! (mag) ? Ymag uncertainty
      real*4        JmagU      (nr__1) ! (mag) ? UKIDSS J-band magnitude
      real*4        e_JmagU    (nr__1) ! (mag) ? Jmag uncertainty
      real*4        HmagU      (nr__1) ! (mag) ? UKIDSS H-band magnitude
      real*4        e_HmagU    (nr__1) ! (mag) ? Hmag uncertainty
      real*4        KmagU      (nr__1) ! (mag) ? UKIDSS K-band magnitude
      real*4        e_KmagU    (nr__1) ! (mag) ? Kmag uncertainty
      real*4        v_3_6_     (nr__1) ! (mag) ? Spitzer/IRAC 3.6um band magnitude
      real*4        e__3_6_    (nr__1) ! (mag) ? Uncertainty on [3.6]mag
      real*4        v_4_5_     (nr__1) ! (mag) ? Spitzer/IRAC 4.5um band magnitude
      real*4        e__4_5_    (nr__1) ! (mag) ? Uncertainty on [4.5]mag
      real*4        v_5_4_     (nr__1) ! (mag) ? Spitzer/IRAC 5.4um band magnitude
      real*4        e__5_4_    (nr__1) ! (mag) ? Uncertainty on [5.4]mag
      real*4        v_8_0_     (nr__1) ! (mag) ? Spitzer/IRAC 8.0um band magnitude
      real*4        e__8_0_    (nr__1) ! (mag) ? Uncertainty on [8.0]mag
      character*1   E_n        (nr__1) ! [YN] Near infrared excess? (Y or N)
      character*1   E_m        (nr__1) ! [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(i__),Det(i__),Name(i__),OName(i__),Ref(i__),Imag(i__),
     +  e_Imag(i__),I_Z(i__),e_I_Z(i__),l_Jmag(i__),Jmag(i__),
     +  e_Jmag(i__),r_Jmag(i__),l_I_J(i__),I_J(i__),e_I_J(i__),
     +  Jmag2(i__),e_Jmag2(i__),Hmag(i__),e_Hmag(i__),l_Ksmag(i__),
     +  Ksmag(i__),e_Ksmag(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Mm(i__)
        if(ar__(43:44) .EQ. '') Ref(i__) = iNULL__
        if(ar__(72:77) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(79:83) .EQ. '') e_Jmag(i__) = rNULL__
        if(ar__(88:92) .EQ. '') I_J(i__) = rNULL__
        if(ar__(94:98) .EQ. '') e_I_J(i__) = rNULL__
        if(ar__(100:105) .EQ. '') Jmag2(i__) = rNULL__
        if(ar__(107:111) .EQ. '') e_Jmag2(i__) = rNULL__
        if(ar__(113:118) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(120:124) .EQ. '') e_Hmag(i__) = rNULL__
        if(ar__(127:132) .EQ. '') Ksmag(i__) = rNULL__
        if(ar__(134:138) .EQ. '') e_Ksmag(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)
     +  Field(i__),Det(i__),Name(i__),OName(i__),Ref(i__),Imag(i__),
     +  e_Imag(i__),I_Z(i__),e_I_Z(i__),l_Jmag(i__),Jmag(i__),
     +  e_Jmag(i__),r_Jmag(i__),l_I_J(i__),I_J(i__),e_I_J(i__),
     +  Jmag2(i__),e_Jmag2(i__),Hmag(i__),e_Hmag(i__),l_Ksmag(i__),
     +  Ksmag(i__),e_Ksmag(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),
     +  DEd(i__),DEm(i__),DEs(i__),Mm(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 '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(i__),ImagU(i__),e_ImagU(i__),ZmagU(i__),e_ZmagU(i__),
     +  YmagU(i__),e_YmagU(i__),JmagU(i__),e_JmagU(i__),HmagU(i__),
     +  e_HmagU(i__),KmagU(i__),e_KmagU(i__),v_3_6_(i__),e__3_6_(i__),
     +  v_4_5_(i__),e__4_5_(i__),v_5_4_(i__),e__5_4_(i__),v_8_0_(i__),
     +  e__8_0_(i__),E_n(i__),E_m(i__)
        if(ar__1(40:45) .EQ. '') ZmagU(i__) = rNULL__
        if(ar__1(47:51) .EQ. '') e_ZmagU(i__) = rNULL__
        if(ar__1(53:58) .EQ. '') YmagU(i__) = rNULL__
        if(ar__1(60:64) .EQ. '') e_YmagU(i__) = rNULL__
        if(ar__1(66:71) .EQ. '') JmagU(i__) = rNULL__
        if(ar__1(73:77) .EQ. '') e_JmagU(i__) = rNULL__
        if(ar__1(79:84) .EQ. '') HmagU(i__) = rNULL__
        if(ar__1(86:90) .EQ. '') e_HmagU(i__) = rNULL__
        if(ar__1(92:97) .EQ. '') KmagU(i__) = rNULL__
        if(ar__1(99:103) .EQ. '') e_KmagU(i__) = rNULL__
        if(ar__1(105:110) .EQ. '') v_3_6_(i__) = rNULL__
        if(ar__1(112:116) .EQ. '') e__3_6_(i__) = rNULL__
        if(ar__1(118:123) .EQ. '') v_4_5_(i__) = rNULL__
        if(ar__1(125:129) .EQ. '') e__4_5_(i__) = rNULL__
        if(ar__1(131:136) .EQ. '') v_5_4_(i__) = rNULL__
        if(ar__1(138:142) .EQ. '') e__5_4_(i__) = rNULL__
        if(ar__1(144:149) .EQ. '') v_8_0_(i__) = rNULL__
        if(ar__1(151:155) .EQ. '') e__8_0_(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  Name_1(i__),ImagU(i__),e_ImagU(i__),ZmagU(i__),e_ZmagU(i__),
     +  YmagU(i__),e_YmagU(i__),JmagU(i__),e_JmagU(i__),HmagU(i__),
     +  e_HmagU(i__),KmagU(i__),e_KmagU(i__),v_3_6_(i__),e__3_6_(i__),
     +  v_4_5_(i__),e__4_5_(i__),v_5_4_(i__),e__5_4_(i__),v_8_0_(i__),
     +  e__8_0_(i__),E_n(i__),E_m(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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