FORTRAN Generation
(/./ftp/cats/II/316)

Conversion of standardized ReadMe file for file /./ftp/cats/II/316 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. II/316              UKIDSS-DR6 Galactic Plane Survey      (Lucas+ 2012)
*================================================================================
*UKIRT Infrared Deep Sky Survey (UKIDSS) Galactic Plane Survey (GPS) Release 6
*    UKIDSS Consortium
*   <Mon. Not. R. Astron. Soc. 391, 136 (2008)>
*   =2008MNRAS.391..136L
*   =2012yCat.2316....0U
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'gps6.sam'	! Sample of the UKIDSS-DR6 Galactic Plane Survey
                             among 604,327,143 sources (557,877,373 unique)

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

C  Position composed of: RAdeg DEdeg
      character*19  UGPS        ! Name of source in survey (G5)
      real*8        RAdeg       ! (deg) Right ascension (ICRS, at Ep=Epoch)
      real*8        DEdeg       ! (deg) Declination (ICRS, at Ep=Epoch)
      real*4        Jmag        ! (mag) ? UKIDSS J magnitude (jAperMag3) (G1)
      real*4        Hmag        ! (mag) ? UKIDSS H magnitude (hAperMag3) (G1)
      real*4        Kmag1       ! (mag) ? UKIDSS K magnitude epoch1 (k_1AperMag3) (G1)
      real*4        Kmag2       ! (mag) ? UKIDSS K magnitude epoch2 (k_2AperMag3) (G1)
      real*4        H2mag       ! (mag) ? UKIDSS H2 magnitude (h2AperMag3) (G1)
      real*4        e_Jmag      ! (mag) ? Mean error on Jmag (jAperMag3Err)
      real*4        e_Hmag      ! (mag) ? Mean error on Hmag (hAperMag3Err)
      real*4        e_Kmag1     ! (mag) ? Mean error on Kmag1 (k_1AperMag3Err)
      real*4        e_Kmag2     ! (mag) ? Mean error on Kmag2 (k_2AperMag3Err)
      real*4        e_H2mag     ! (mag) ? Mean error on H2mag (h2AperMag3Err)
*--------------------------------------------------------------------------------
      character*12  ID          ! Unique ID of this merged detection (sourceID)
      integer*4     m           ! [1/2] "2" indicates a duplicated source (G6)
      real*8        Epoch       ! (yr) [2005/2009] Epoch of position measurement (epoch)
      integer*4     nf          ! [0] Number of frames (nFrames)
      real*4        mStat       ! Merged profile class statistic (mergedClassStat)
      integer*4     cl          ! [-3,1] Merged source class (mergedClass) (G2)
      real*4        p_          ! [0,1] Probability of being a star (pStar)
      real*4        pG          ! [0,1] Probability of being a galaxy (pGalaxy)
      real*4        pN          ! [0,1] Probability of being noise (pNoise)
*--------------------------------------------------------------------------------
      real*8        Jdiam       ! (pix) ? J-band RMS of axes of ellipse fit (jGausig)
      real*4        Jell        ! [0/1]? J-band ellipticity (1-b/a) (jEll)
      real*4        Jpa         ! (deg) [0,180]? J-band position angle (jPA)
      integer*4     Jbad        ! J-band zero confidence pixels (jErrBits) (G3)
      integer*4     Jcl         ! [-3,1]? J-band source class (jClass) (G2)
      integer*4     Jflags      ! [0,8388607] J-band flags (jppErrBits) (G4)
*--------------------------------------------------------------------------------
      real*8        Hdiam       ! (pix) ? H-band RMS of axes of ellipse fit (hGausig)
      real*4        Hell        ! ? Ellipticity in H-band (hEll)
      real*4        Hpa         ! (deg) [0,180]? H-band position angle (hPA)
      integer*4     Hbad        ! H-band zero confidence pixels (hErrBits) (G3)
      integer*4     Hcl         ! [-3,1] H-band source class (hClass) (G2)
      integer*4     Hflags      ! [0,8388607] H-band flags (hppErrBits) (G4)
      real*4        Hdx         ! (arcsec) [-1,1]? {xi} offset from master position (hXi)
      real*4        Hdy         ! (arcsec) [-1,1]? {eta} offset from master position (hEta)
*--------------------------------------------------------------------------------
      real*8        Kdiam1      ! (pix) ? K-band RMS of ellipse fit, epoch 1 (k_1Gausig)
      real*4        Kell1       ! ? K-band ellipticity (k_1Ell)
      real*4        Kpa1        ! (deg) [0,180]? K-band position angle (k_1PA)
      integer*4     Kbad1       ! K-band zero confidence pixels (k_1ErrBits) (G3)
      integer*4     Kcl1        ! [-3,1] K-band source class (k_1Class) (G2)
      integer*4     Kflag1      ! [0,8388607] K-band flags (k_1ppErrBits) (G4)
      real*4        Kdx1        ! (arcsec) [-1,1]? {xi} offset from master position (k_1Xi)
      real*4        Kdy1        ! (arcsec) [-1,1]? {eta} offset from master position(k_1Eta)
*--------------------------------------------------------------------------------
      real*8        Kdiam2      ! (pix) ? K-band RMS of ellipse fit, epoch 2 (k_2Gausig)
      real*4        Kell2       ! ? K-band ellipticity (k_2Ell)
      real*4        Kpa2        ! (deg) [0,180]? K-band position angle (k_2PA)
      integer*4     Kbad2       ! ? K-band source class (k_2ErrBits)
      integer*4     Kcl2        ! [-3,1]? K-band source class (k_2Class)
      integer*4     Kflag2      ! [0,8388607]? K-band flags (k_2ppErrBits)
      real*4        Kdx2        ! (arcsec) [-1,1]? {xi} offset from master position (k_2Xi)
      real*4        Kdy2        ! (arcsec) [-1,1]? {eta} offset from master position(k_2Eta)
*--------------------------------------------------------------------------------
      real*8        H2diam      ! (pix) ? H2-band RMS of ellipse fit (h2Gausig)
      real*4        H2ell       ! ? H2-band ellipticity (h2Ell)
      real*4        H2pa        ! (deg) ? H2-band position angle (h2PA)
      integer*4     H2bad       ! ? H2-band zero confidence pixels(h2ErrBits) (G3)
      integer*4     H2cl        ! [-3,1]? H2-band source class (h2Class) (G2)
      integer*4     H2flag      ! [0,8388607]? H2-band flags (h2ppErrBits)
      real*4        H2dx        ! (arcsec) [-1,1]? {xi} offset from master position (h2Xi)
      real*4        H2dy        ! (arcsec) [-1,1]? {eta} offset from master position (h2Eta)
*--------------------------------------------------------------------------------
      real*4        Jmap1       ! (mag) ? J-band UKIDSS J 1"aperture mag. (jAperMag1)
      real*4        e_Jmap1     ! (mag) ? Mean error on Jmap1 (jAperMag1Err)
      real*4        Jmap4       ! (mag) ? J-band UKIDSS J 4"aperture mag. (jAperMag4)
      real*4        e_Jmap4     ! (mag) ? Mean error on Jmap4 (jAperMag4Err)
*--------------------------------------------------------------------------------
      real*4        Hmap1       ! (mag) ? H-band UKIDSS H 1"aperture mag. (hAperMag1)
      real*4        e_Hmap1     ! (mag) ? Mean error on Hmap1 (hAperMag1Err)
      real*4        Hmap4       ! (mag) ? H-band UKIDSS H 4"aperture mag. (hAperMag4)
      real*4        e_Hmap4     ! (mag) ? Mean error on Hmap4 (hAperMag4Err)
*--------------------------------------------------------------------------------
      real*4        Kmap1_1     ! (mag) ? K-band UKIDSS K 1"aperture 1st ep.(k_1AperMag1)
      real*4        e_Kmap1_1   ! (mag) ? Mean error on Kmap1.1 (k_1AperMag1Err)
      real*4        Kmap4_1     ! (mag) ? K-band UKIDSS K 4"aperture mag. (k_1AperMag4)
      real*4        e_Kmap4_1   ! (mag) ? Mean error on Kmap4.1 (k_1AperMag4Err)
*--------------------------------------------------------------------------------
      real*4        Kmap1_2     ! (mag) ? K-band UKIDSS K 1"aperture mag. (k_2AperMag1)
      real*4        e_Kmap1_2   ! (mag) ? Mean error on Kmap1.2 (k_2AperMag1Err)
      real*4        Kmap4_2     ! (mag) ? K-band UKIDSS K 4"aperture mag. (k_2AperMag4)
      real*4        e_Kmap4_2   ! (mag) ? Mean error on Kmap4.2 (k_2AperMag4Err)
*--------------------------------------------------------------------------------
      real*4        H2map1      ! (mag) ? H2-band UKIDSS H2 1"aperture mag. (h2AperMag1)
      real*4        e_H2map1    ! (mag) ? Mean error on H2map1 (h2AperMag1Err)
      real*4        H2map4      ! (mag) ? H2-band UKIDSS H2 4"aperture mag. (h2AperMag4)
      real*4        e_H2map4    ! (mag) ? Mean error on H2map4 (h2AperMag4Err)

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

C  Loading file 'gps6.sam'	! Sample of the UKIDSS-DR6 Galactic Plane Survey
*                             among 604,327,143 sources (557,877,373 unique)

C  Format for file interpretation

    1 format(
     +  A19,1X,F10.6,1X,F10.6,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,A12,1X,I1,1X,F9.4,
     +  1X,I1,1X,F6.2,1X,I2,1X,F4.2,1X,F4.2,1X,F4.2,1X,F7.3,1X,F4.2,
     +  1X,F5.1,1X,I2,1X,I2,1X,I7,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,
     +  1X,I7,1X,F6.3,1X,F6.3,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,1X,
     +  I7,1X,F6.3,1X,F6.3,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,1X,I7,
     +  1X,F6.3,1X,F6.3,1X,F7.3,1X,F4.2,1X,F5.1,1X,I2,1X,I2,1X,I7,1X,
     +  F6.3,1X,F6.3,2X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,2X,F6.3,1X,F6.3,
     +  1X,F6.3,1X,F6.3,2X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,2X,F6.3,1X,
     +  F6.3,1X,F6.3,1X,F6.3,2X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'gps6.sam')
      write(6,*) '....Loading file: gps6.sam'
      do i__=1,1000
        read(1,'(A529)')ar__
        read(ar__,1)
     +  UGPS,RAdeg,DEdeg,Jmag,Hmag,Kmag1,Kmag2,H2mag,e_Jmag,e_Hmag,
     +  e_Kmag1,e_Kmag2,e_H2mag,ID,m,Epoch,nf,mStat,cl,p_,pG,pN,Jdiam,
     +  Jell,Jpa,Jbad,Jcl,Jflags,Hdiam,Hell,Hpa,Hbad,Hcl,Hflags,Hdx,
     +  Hdy,Kdiam1,Kell1,Kpa1,Kbad1,Kcl1,Kflag1,Kdx1,Kdy1,Kdiam2,
     +  Kell2,Kpa2,Kbad2,Kcl2,Kflag2,Kdx2,Kdy2,H2diam,H2ell,H2pa,
     +  H2bad,H2cl,H2flag,H2dx,H2dy,Jmap1,e_Jmap1,Jmap4,e_Jmap4,Hmap1,
     +  e_Hmap1,Hmap4,e_Hmap4,Kmap1_1,e_Kmap1_1,Kmap4_1,e_Kmap4_1,
     +  Kmap1_2,e_Kmap1_2,Kmap4_2,e_Kmap4_2,H2map1,e_H2map1,H2map4,
     +  e_H2map4
        if(ar__(43:48) .EQ. '') Jmag = rNULL__
        if(ar__(50:55) .EQ. '') Hmag = rNULL__
        if(ar__(57:62) .EQ. '') Kmag1 = rNULL__
        if(ar__(64:69) .EQ. '') Kmag2 = rNULL__
        if(ar__(71:76) .EQ. '') H2mag = rNULL__
        if(ar__(78:83) .EQ. '') e_Jmag = rNULL__
        if(ar__(85:90) .EQ. '') e_Hmag = rNULL__
        if(ar__(92:97) .EQ. '') e_Kmag1 = rNULL__
        if(ar__(99:104) .EQ. '') e_Kmag2 = rNULL__
        if(ar__(106:111) .EQ. '') e_H2mag = rNULL__
        if(ar__(165:171) .EQ. '') Jdiam = rNULL__
        if(ar__(173:176) .EQ. '') Jell = rNULL__
        if(ar__(178:182) .EQ. '') Jpa = rNULL__
        if(ar__(187:188) .EQ. '') Jcl = iNULL__
        if(ar__(198:204) .EQ. '') Hdiam = rNULL__
        if(ar__(206:209) .EQ. '') Hell = rNULL__
        if(ar__(211:215) .EQ. '') Hpa = rNULL__
        if(ar__(231:236) .EQ. '') Hdx = rNULL__
        if(ar__(238:243) .EQ. '') Hdy = rNULL__
        if(ar__(245:251) .EQ. '') Kdiam1 = rNULL__
        if(ar__(253:256) .EQ. '') Kell1 = rNULL__
        if(ar__(258:262) .EQ. '') Kpa1 = rNULL__
        if(ar__(278:283) .EQ. '') Kdx1 = rNULL__
        if(ar__(285:290) .EQ. '') Kdy1 = rNULL__
        if(ar__(292:298) .EQ. '') Kdiam2 = rNULL__
        if(ar__(300:303) .EQ. '') Kell2 = rNULL__
        if(ar__(305:309) .EQ. '') Kpa2 = rNULL__
        if(ar__(311:312) .EQ. '') Kbad2 = iNULL__
        if(ar__(314:315) .EQ. '') Kcl2 = iNULL__
        if(ar__(317:323) .EQ. '') Kflag2 = iNULL__
        if(ar__(325:330) .EQ. '') Kdx2 = rNULL__
        if(ar__(332:337) .EQ. '') Kdy2 = rNULL__
        if(ar__(339:345) .EQ. '') H2diam = rNULL__
        if(ar__(347:350) .EQ. '') H2ell = rNULL__
        if(ar__(352:356) .EQ. '') H2pa = rNULL__
        if(ar__(358:359) .EQ. '') H2bad = iNULL__
        if(ar__(361:362) .EQ. '') H2cl = iNULL__
        if(ar__(364:370) .EQ. '') H2flag = iNULL__
        if(ar__(372:377) .EQ. '') H2dx = rNULL__
        if(ar__(379:384) .EQ. '') H2dy = rNULL__
        if(ar__(387:392) .EQ. '') Jmap1 = rNULL__
        if(ar__(394:399) .EQ. '') e_Jmap1 = rNULL__
        if(ar__(401:406) .EQ. '') Jmap4 = rNULL__
        if(ar__(408:413) .EQ. '') e_Jmap4 = rNULL__
        if(ar__(416:421) .EQ. '') Hmap1 = rNULL__
        if(ar__(423:428) .EQ. '') e_Hmap1 = rNULL__
        if(ar__(430:435) .EQ. '') Hmap4 = rNULL__
        if(ar__(437:442) .EQ. '') e_Hmap4 = rNULL__
        if(ar__(445:450) .EQ. '') Kmap1_1 = rNULL__
        if(ar__(452:457) .EQ. '') e_Kmap1_1 = rNULL__
        if(ar__(459:464) .EQ. '') Kmap4_1 = rNULL__
        if(ar__(466:471) .EQ. '') e_Kmap4_1 = rNULL__
        if(ar__(474:479) .EQ. '') Kmap1_2 = rNULL__
        if(ar__(481:486) .EQ. '') e_Kmap1_2 = rNULL__
        if(ar__(488:493) .EQ. '') Kmap4_2 = rNULL__
        if(ar__(495:500) .EQ. '') e_Kmap4_2 = rNULL__
        if(ar__(503:508) .EQ. '') H2map1 = rNULL__
        if(ar__(510:515) .EQ. '') e_H2map1 = rNULL__
        if(ar__(517:522) .EQ. '') H2map4 = rNULL__
        if(ar__(524:529) .EQ. '') e_H2map4 = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  UGPS,RAdeg,DEdeg,Jmag,Hmag,Kmag1,Kmag2,H2mag,e_Jmag,e_Hmag,
     +  e_Kmag1,e_Kmag2,e_H2mag,ID,m,Epoch,nf,mStat,cl,p_,pG,pN,Jdiam,
     +  Jell,Jpa,Jbad,Jcl,Jflags,Hdiam,Hell,Hpa,Hbad,Hcl,Hflags,Hdx,
     +  Hdy,Kdiam1,Kell1,Kpa1,Kbad1,Kcl1,Kflag1,Kdx1,Kdy1,Kdiam2,
     +  Kell2,Kpa2,Kbad2,Kcl2,Kflag2,Kdx2,Kdy2,H2diam,H2ell,H2pa,
     +  H2bad,H2cl,H2flag,H2dx,H2dy,Jmap1,e_Jmap1,Jmap4,e_Jmap4,Hmap1,
     +  e_Hmap1,Hmap4,e_Hmap4,Kmap1_1,e_Kmap1_1,Kmap4_1,e_Kmap4_1,
     +  Kmap1_2,e_Kmap1_2,Kmap4_2,e_Kmap4_2,H2map1,e_H2map1,H2map4,
     +  e_H2map4
c    .......End.of.Just test output...........
      end do
      close(1)

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