FORTRAN Generation
(/./ftp/cats/J/ApJ/414/279)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/414/279 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-19
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/414/279              Faintest stars                         (Tinney, 1993)
*================================================================================
*The faintest stars: the luminosity and mass functions at the bottom of the main
*sequence.
*       TINNEY C.G.
*      <Astrophys. J. 414, 279 (1993)>
*      =1993ApJ...414..279T   (SIMBAD/NED Reference)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table1'	! Areas and limits surveyed

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

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

      character*1   NField      ! Field identification letter
      character*5   Name        ! Field designation
      integer*4     RAh         ! (h) Field right ascension 1950
      integer*4     RAm         ! (min) Field right ascension 1950
      integer*4     DEd         ! (deg) Field declination 1950
      character*6   Master      ! Master plate
      character*1   n_Master    ! Note on Master (1)
      character*30  Slaves      ! Slave plates
      real*4        Area        ! (deg+2) Area in which IIIaF and IVN plates are
*                                   coincident
      real*4        Imin        ! (mag) Lower limit of I magnitude interval
      real*4        Imax        ! (mag) Upper limit of I magnitude interval
      real*4        R_Imax      ! (mag) Upper limit of R-I color
      character*1   Limits      ! A 'y' means that the sample includes
*                                   upper limits, constructed from pairs
*                                   IVN plates and IIIaF non-detections
*Note (1): Objects were selected from the areas of I11499 which does not overlap
*           with N3601 (the plate used to select the Fld 832-1 sample)

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

C  Declarations for 'table2'	! Survey samples in each POSSII/UKSRC field
                                  selected by photographic color

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

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

      character*1   NField_1    ! Field designation as in table1
      character*10  Name_1      ! Object name
      character*1   n_Name      ! [bd] Note on Name (1)
      integer*4     RAh_1       ! (h) Right ascension 1950.0
      integer*4     RAm_1       ! (min) Right ascension 1950.0
      real*4        RAs         ! (s) Right ascension 1950.0
      character*1   DE_         ! Declination sign
      integer*4     DEd_1       ! (deg) Declination 1950.0
      integer*4     DEm         ! (arcmin) Declination 1950.0
      integer*4     DEs         ! (arcsec) Declination 1950.0
      real*4        Iphot       ! (mag) []? I magnitude from photographic
*                                       observations on the Palomar 60" telescope
      real*4        v_R_I_Phot  ! (mag) []? (R-I) color from photographic
*                                       observations on the Palomar 60" telescope
      character*1   q__R_I_Phot ! A 'l' indicates upper limit object, object
*                                    detected above (IPhot)lim, but not detected
*                                    on a IIIaF plate
      real*4        Iccd        ! (mag) []? I magnitude from CCD camera on the
*                                        Palomar 60" telescope
      real*4        v_R_I_ccd   ! (mag) []? (R-I) color from CCD camera on the
*                                        Palomar 60" telescope
      real*4        Kcam        ! (mag) []? K magnitude measured at Las Campanas
      character*2   q_Kcam      ! [abcen: ] Note on Kcam (2)
      real*4        Kpal        ! (mag) []? K magnitude measured at Palomar
      character*1   q_Kpal      ! [abcn:] Note on Kpal (2)
      real*4        Kirtf       ! (mag) []? K magnitude measured at Nasa Infrared
*                                        Telescope Facility (IRTF)
      character*2   q_Kirtf     ! [abcen: ] Note on Kirtf (2)
      real*4        Kmn         ! (mag) []? Mean K magnitude
      character*1   q_Kmn       ! [abc:] Note on Kmn (2)
      real*4        I_K         ! (mag) []? I-K color (calculated using ICDD when
*                                        available, and otherwise using IPhot)
      character*1   q_I_K       ! [c] When 'c', this object shows possible
*                                        evidence of variability
*Note (1): d: the following pairs of objects lie in the overlap regions between
*             two plates and were assigned duplicate names;
*             - in table2:
*                         213-16596 = 263-68812; 213-19088 = 263-72846;
*                         831-161058 = 832-3494; 831-165166 = 832-7464;
*                         890-4633 = 891-137643.
*             - in table3:
*                         263-78128 = 262-3688
*          b: in table3, 513-42404 was discovered as an infrared companion to
*              the star TVLM 513-4240
*Note (2): a: Photometry good to +/-0.05mag
*          b: Photometry good to +/-0.10mag
*          c: Photometry only good to +/- 0.25mag
*        ':': Object barely detected and the photometry is only good to +/-0.5mag
*          e: Preliminary photometry from an IRTF run on 1992 October 23-26
*          n: not detected

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

C  Declarations for 'table3'	! Miscellaneous interesting objects (I-K>3.0)
                                  not part of survey sample

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

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

      character*1   NField_2    ! Field designation as in table1
      character*10  Name_2      ! Object name
      character*1   n_Name_1    ! [bd] Note on Name (1)
      integer*4     RAh_2       ! (h) Right ascension 1950.0
      integer*4     RAm_2       ! (min) Right ascension 1950.0
      real*4        RAs_1       ! (s) Right ascension 1950.0
      character*1   DE__1       ! Declination sign
      integer*4     DEd_2       ! (deg) Declination 1950.0
      integer*4     DEm_1       ! (arcmin) Declination 1950.0
      integer*4     DEs_1       ! (arcsec) Declination 1950.0
      real*4        Iphot_1     ! (mag) []? I magnitude from photographic
*                                       observations on the Palomar 60" telescope
      real*4        v_R_I_Phot_1 ! (mag) []? (R-I) color from photographic
*                                       observations on the Palomar 60" telescope
      character*1   q__R_I_Phot_1 ! A 'l' indicates upper limit object, object
*                                    detected above (IPhot)lim, but not detected
*                                    on a IIIaF plate
      real*4        Iccd_1      ! (mag) []? I magnitude from CCD camera on the
*                                        Palomar 60" telescope
      real*4        v_R_I_ccd_1 ! (mag) []? (R-I) color from CCD camera on the
*                                        Palomar 60" telescope
      real*4        Kcam_1      ! (mag) []? K magnitude measured at Las Campanas
      character*2   q_Kcam_1    ! [abcen: ] Note on Kcam (2)
      real*4        Kpal_1      ! (mag) []? K magnitude measured at Palomar
      character*1   q_Kpal_1    ! [abcn:] Note on Kpal (2)
      real*4        Kirtf_1     ! (mag) []? K magnitude measured at Nasa Infrared
*                                        Telescope Facility (IRTF)
      character*2   q_Kirtf_1   ! [abcen: ] Note on Kirtf (2)
      real*4        Kmn_1       ! (mag) []? Mean K magnitude
      character*1   q_Kmn_1     ! [abc:] Note on Kmn (2)
      real*4        I_K_1       ! (mag) []? I-K color (calculated using ICDD when
*                                        available, and otherwise using IPhot)
      character*1   q_I_K_1     ! [c] When 'c', this object shows possible
*                                        evidence of variability
*Note (1): d: the following pairs of objects lie in the overlap regions between
*             two plates and were assigned duplicate names;
*             - in table2:
*                         213-16596 = 263-68812; 213-19088 = 263-72846;
*                         831-161058 = 832-3494; 831-165166 = 832-7464;
*                         890-4633 = 891-137643.
*             - in table3:
*                         263-78128 = 262-3688
*          b: in table3, 513-42404 was discovered as an infrared companion to
*              the star TVLM 513-4240
*Note (2): a: Photometry good to +/-0.05mag
*          b: Photometry good to +/-0.10mag
*          c: Photometry only good to +/- 0.25mag
*        ':': Object barely detected and the photometry is only good to +/-0.5mag
*          e: Preliminary photometry from an IRTF run on 1992 October 23-26
*          n: not detected

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

C  Loading file 'table1'	! Areas and limits surveyed

C  Format for file interpretation

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

C  Effective file loading

      open(unit=1,status='old',file=
     +'table1')
      write(6,*) '....Loading file: table1'
      do i__=1,17
        read(1,'(A83)')ar__
        read(ar__,1)
     +  NField,Name,RAh,RAm,DEd,Master,n_Master,Slaves,Area,Imin,Imax,
     +  R_Imax,Limits
        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(DEd .GE. 0) DEdeg=DEd
c    ..............Just test output...........
        write(6,1)
     +  NField,Name,RAh,RAm,DEd,Master,n_Master,Slaves,Area,Imin,Imax,
     +  R_Imax,Limits
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2'	! Survey samples in each POSSII/UKSRC field
*                                  selected by photographic color

C  Format for file interpretation

    2 format(
     +  A1,1X,A10,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,2X,F5.2,
     +  2X,F4.2,A1,1X,F5.2,2X,F4.2,2X,F5.2,A2,1X,F5.2,A1,2X,F5.2,A2,
     +  1X,F5.2,A1,1X,F5.2,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2')
      write(6,*) '....Loading file: table2'
      do i__=1,406
        read(1,'(A99)')ar__1
        read(ar__1,2)
     +  NField_1,Name_1,n_Name,RAh_1,RAm_1,RAs,DE_,DEd_1,DEm,DEs,
     +  Iphot,v_R_I_Phot,q__R_I_Phot,Iccd,v_R_I_ccd,Kcam,q_Kcam,Kpal,
     +  q_Kpal,Kirtf,q_Kirtf,Kmn,q_Kmn,I_K,q_I_K
        if(ar__1(37:41) .EQ. '') Iphot = rNULL__
        if(ar__1(44:47) .EQ. '') v_R_I_Phot = rNULL__
        if(ar__1(50:54) .EQ. '') Iccd = rNULL__
        if(ar__1(57:60) .EQ. '') v_R_I_ccd = rNULL__
        if(ar__1(63:67) .EQ. '') Kcam = rNULL__
        if(ar__1(71:75) .EQ. '') Kpal = rNULL__
        if(ar__1(79:83) .EQ. '') Kirtf = rNULL__
        if(ar__1(87:91) .EQ. '') Kmn = rNULL__
        if(ar__1(94:98) .EQ. '') I_K = 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 .GT. -180) RAdeg_1=RAdeg_1+RAs/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm .GE. 0) DEdeg_1=DEdeg_1+DEm/60.
        if(DEs .GE. 0) DEdeg_1=DEdeg_1+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  NField_1,Name_1,n_Name,RAh_1,RAm_1,RAs,DE_,DEd_1,DEm,DEs,
     +  Iphot,v_R_I_Phot,q__R_I_Phot,Iccd,v_R_I_ccd,Kcam,q_Kcam,Kpal,
     +  q_Kpal,Kirtf,q_Kirtf,Kmn,q_Kmn,I_K,q_I_K
        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'	! Miscellaneous interesting objects (I-K>3.0)
*                                  not part of survey sample

C  Format for file interpretation

    3 format(
     +  A1,1X,A10,A1,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2,2X,F5.2,
     +  2X,F4.2,A1,1X,F5.2,2X,F4.2,2X,F5.2,A2,1X,F5.2,A1,2X,F5.2,A2,
     +  1X,F5.2,A1,1X,F5.2,A1)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3')
      write(6,*) '....Loading file: table3'
      do i__=1,34
        read(1,'(A99)')ar__2
        read(ar__2,3)
     +  NField_2,Name_2,n_Name_1,RAh_2,RAm_2,RAs_1,DE__1,DEd_2,DEm_1,
     +  DEs_1,Iphot_1,v_R_I_Phot_1,q__R_I_Phot_1,Iccd_1,v_R_I_ccd_1,
     +  Kcam_1,q_Kcam_1,Kpal_1,q_Kpal_1,Kirtf_1,q_Kirtf_1,Kmn_1,
     +  q_Kmn_1,I_K_1,q_I_K_1
        if(ar__2(37:41) .EQ. '') Iphot_1 = rNULL__
        if(ar__2(44:47) .EQ. '') v_R_I_Phot_1 = rNULL__
        if(ar__2(50:54) .EQ. '') Iccd_1 = rNULL__
        if(ar__2(57:60) .EQ. '') v_R_I_ccd_1 = rNULL__
        if(ar__2(63:67) .EQ. '') Kcam_1 = rNULL__
        if(ar__2(71:75) .EQ. '') Kpal_1 = rNULL__
        if(ar__2(79:83) .EQ. '') Kirtf_1 = rNULL__
        if(ar__2(87:91) .EQ. '') Kmn_1 = rNULL__
        if(ar__2(94:98) .EQ. '') I_K_1 = rNULL__
        RAdeg_2 = rNULL__
        DEdeg_2 = rNULL__
c  Derive coordinates RAdeg_2 and DEdeg_2 from input data
c  (RAdeg_2 and DEdeg_2 are set to rNULL__ when unknown)
        if(RAh_2 .GT. -180) RAdeg_2=RAh_2*15.
        if(RAm_2 .GT. -180) RAdeg_2=RAdeg_2+RAm_2/4.
        if(RAs_1 .GT. -180) RAdeg_2=RAdeg_2+RAs_1/240.
        if(DEd_2 .GE. 0) DEdeg_2=DEd_2
        if(DEm_1 .GE. 0) DEdeg_2=DEdeg_2+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_2=DEdeg_2+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_2.GE.0) DEdeg_2=-DEdeg_2
c    ..............Just test output...........
        write(6,3)
     +  NField_2,Name_2,n_Name_1,RAh_2,RAm_2,RAs_1,DE__1,DEd_2,DEm_1,
     +  DEs_1,Iphot_1,v_R_I_Phot_1,q__R_I_Phot_1,Iccd_1,v_R_I_ccd_1,
     +  Kcam_1,q_Kcam_1,Kpal_1,q_Kpal_1,Kirtf_1,q_Kirtf_1,Kmn_1,
     +  q_Kmn_1,I_K_1,q_I_K_1
        write(6,'(6H Pos: 2F8.4)') RAdeg_2,DEdeg_2
c    .......End.of.Just test output...........
      end do
      close(1)

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