FORTRAN Generation
(/./ftp/cats/J/A_A/616/A55)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/616/A55 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-Apr-23
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/A+A/616/A55           CFHQSIR survey                           (Pipien+, 2018)
*================================================================================
*The CFHQSIR survey: a Y-band extension of the CFHTLS-Wide survey.
*    Pipien S., Basa S., Cuby J.-G., Cuillandre J.-C.,
*    Willott C., Moutard T., Chatron J., Arnouts S., Hudelot P.
*    <Astron. Astrophys. 616, A55 (2018)>
*    =2018A&A...616A..55P        (SIMBAD/NED BibCode)
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'cfhqsir.dat'	! CFHQSIR catalogue (W1, W2, W3 and W4 fields)

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

C  J2000.0 position composed of: RAdeg DEdeg
      character*16  Tile        ! CFHTLS T0007 tile (tile) (5)
      real*4        RAdeg       ! (deg) Right ascension (J2000.0) (RAJ2000)
      real*4        DEdeg       ! (deg) Declination (J2000.0) (DECJ2000)
      real*8        umag        ! (mag) ?=-99 CFHTLS u total magnitude (AB)
*                                        (TOTAL= ISO + delta_mag) (umag) (1)
      real*4        e_umag      ! (mag) ?=-99 rms uncertainty on umag (err_umag)
      real*8        gmag        ! (mag) ?=-99 CFHTLS g total magnitude (AB)
*                                        (TOTAL= ISO + delta_mag) (gmag) (1)
      real*8        e_gmag      ! (mag) ?=-99 rms uncertainty on gmag (err_gmag)
      real*8        rmag        ! (mag) ?=-99 CFHTLS r total magnitude (AB)
*                                        (TOTAL= ISO + delta_mag) (rmag) (1)
      real*8        e_rmag      ! (mag) ?=-99 rms uncertainty on rmag (err_rmag)
      real*8        imag        ! (mag) ?=-99 CFHTLS i total magnitude (AB)
*                                        (TOTAL= ISO + delta_mag) (imag) (1)
      real*8        e_imag      ! (mag) ?=-99 rms uncertainty on imag (err_imag)
      real*8        ymag        ! (mag) ?=-99 CFHTLS y total magnitude (AB)
*                                        (TOTAL= ISO + delta_mag) (zmag) (1) (6)
      real*4        e_ymag      ! (mag) ?=-99 rms uncertainty on zmag (err_zmag)
      real*8        zmag        ! (mag) ?=-99 CFHTLS y total magnitude (AB)
*                                        (TOTAL= ISO + delta_mag) (zmag) (1)
      real*4        e_zmag      ! (mag) ?=-99 rms uncertainty on zmag (err_zmag)
      real*8        YWmag       ! (mag) ?=-99 WIRCam Y total magnitude (AB)
*                                        (TOTAL= ISO + delta_mag) (Ywirmag) (2)
      real*4        e_YWmag     ! (mag) ?=-99 rms uncertainty on Ywirmag
*                                        (err_Ywirmag)
      real*4        deltamag    ! (mag) Weighted mean rescaling factor
*                                        (from ISO to AUTO) (delta_mag)
      real*8        umagISO     ! (mag) ?=-99 CFHTLS u isophotal magnitude (AB)
*                                        (MAG_ISO_u) (1)
      real*4        e_umagISO   ! (mag) ?=-99 rms uncertainty on MAG_ISO_u
*                                        (MAGERR_ISO_u)
      real*8        gmagISO     ! (mag) ?=-99 CFHTLS g isophotal magnitude (AB)
*                                        (MAG_ISO_g) (1)
      real*8        e_gmagISO   ! (mag) ?=-99 rms uncertainty on MAG_ISO_g
*                                        (MAGERR_ISO_g)
      real*8        rmagISO     ! (mag) ?=-99 CFHTLS r isophotal magnitude (AB)
*                                        (MAG_ISO_r) (1)
      real*8        e_rmagISO   ! (mag) ?=-99 rms uncertainty on MAG_ISO_r
*                                        (MAGERR_ISO_r)
      real*8        imagISO     ! (mag) ?=-99 CFHTLS i isophotal magnitude (AB)
*                                        (MAG_ISO_i) (1)
      real*8        e_imagISO   ! (mag) ?=-99 rms uncertainty on MAG_ISO_i
*                                        (MAGERR_ISO_i)
      real*8        ymagISO     ! (mag) ?=-99 CFHTLS y isophotal magnitude (AB)
*                                        (MAG_ISO_y) (1) (6)
      real*4        e_ymagISO   ! (mag) ?=-99 rms uncertainty on MAG_ISO_y
*                                        (MAGERR_ISO_y)
      real*8        zmagISO     ! (mag) ?=-99 CFHTLS z isophotal magnitude (AB)
*                                        (MAG_ISO_z) (1)
      real*4        e_zmagISO   ! (mag) ?=-99 rms uncertainty on MAG_ISO_z (AB)
*                                        (MAGERR_ISO_z)
      real*8        umagAUTO    ! (mag) ?=-99 CFHTLS u Kron-like elliptical
*                                        aperture magnitude (AB) (MAG_AUTO_u) (1)
      real*4        e_umagAUTO  ! (mag) ?=-99 rms uncertainty on MAG_AUTO_u
*                                        (MAGERR_AUTO_u)
      real*8        gmagAUTO    ! (mag) ?=-99 CFHTLS g Kron-like elliptical
*                                        aperture magnitude (AB) (MAG_AUTO_g) (1)
      real*4        e_gmagAUTO  ! (mag) ?=-99 rms uncertainty on MAG_AUTO_g
*                                        (MAGERR_AUTO_g)
      real*8        rmagAUTO    ! (mag) ?=-99 CFHTLS r Kron-like elliptical
*                                        aperture magnitude (AB) (MAG_AUTO_r) (1)
      real*4        e_rmagAUTO  ! (mag) ?=-99 rms uncertainty on MAG_AUTO_r
*                                        (MAGERR_AUTO_r)
      real*8        imagAUTO    ! (mag) ?=-99 CFHTLS i Kron-like elliptical
*                                        aperture magnitude (AB) (MAG_AUTO_i) (1)
      real*4        e_imagAUTO  ! (mag) ?=-99 rms uncertainty on MAG_AUTO_i
*                                        (MAGERR_AUTO_i)
      real*8        ymagAUTO    ! (mag) ?=-99 CFHTLS y Kron-like elliptical
*                                        aperture magnitude (AB) (MAG_AUTO_y) (1)
      real*4        e_ymagAUTO  ! (mag) ?=-99 rms uncertainty on MAG_AUTO_y
*                                        (MAGERR_AUTO_y) (6)
      real*8        zmagAUTO    ! (mag) ?=-99 CFHTLS z Kron-like elliptical
*                                        aperture magnitude (AB) (MAG_AUTO_z) (1)
      real*4        e_zmagAUTO  ! (mag) ?=-99 rms uncertainty on MAG_AUTO_z
*                                        (MAGERR_AUTO_z)
      real*8        umagAPER    ! (mag) ?=-99 CFHTLS u circular aperture
*                                        magnitude (AB) (MAG_APER_u) (1) (3)
      real*4        e_umagAPER  ! (mag) ?=-99 rms uncertainty on MAG_APER_u
*                                        (MAGERR_APER_u)
      real*8        gmagAPER    ! (mag) ?=-99 CFHTLS g circular aperture
*                                        magnitude (AB) (MAG_APER_g) (1) (3)
      real*4        e_gmagAPER  ! (mag) ?=-99 rms uncertainty on MAG_APER_g
*                                        (MAGERR_APER_g)
      real*8        rmagAPER    ! (mag) ?=-99 CFHTLS r circular aperture
*                                        magnitude (AB) (MAG_APER_r) (1) (3)
      real*4        e_rmagAPER  ! (mag) ?=-99 rms uncertainty on MAG_APER_r
*                                        (MAGERR_APER_r)
      real*8        imagAPER    ! (mag) ?=-99 CFHTLS i circular aperture
*                                        magnitude (AB) (MAG_APER_i) (1) (3)
      real*4        e_imagAPER  ! (mag) ?=-99 rms uncertainty on MAG_APER_i
*                                        (MAGERR_APER_i)
      real*8        ymagAPER    ! (mag) ?=-99 CFHTLS y circular aperture
*                                        magnitude (AB) (MAG_APER_y) (1) (3)
      real*4        e_ymagAPER  ! (mag) ?=-99 rms uncertainty on MAG_APER_y
*                                        (MAGERR_APER_y)
      real*8        zmagAPER    ! (mag) ?=-99 CFHTLS z circular aperture
*                                        magnitude (AB) (MAG_APER_z) (1) (3)
      real*4        e_zmagAPER  ! (mag) ?=-99 rms uncertainty on MAG_APER_z
*                                        (MAGERR_APER_z)
      real*4        E_B_V       ! (mag) CFHTLS E(B-V) extinction (EB_V) (4)
      real*8        YWmagISO    ! (mag) ?=-99 WIRCam Y isophotal magnitude (AB)
*                                        (MAG_ISO_Ywir) (2)
      real*4        e_YWmagISO  ! (mag) ?=-99 rms uncertainty on MAG_APER_z
*                                        (MAGERR_ISO_Ywir)
      real*8        YWmagAPER   ! (mag) ?=-99 WIRCam Y isophotal magnitude (AB)
*                                        (MAG_APER_Ywir) (2)
      real*4        e_YWmagAPER ! (mag) ?=-99 WIRCam Y circular aperture
*                                        magnitude (MAGERR_APER_Ywir)
      real*8        YWmagAUTO   ! (mag) ?=-99 WIRCam Y Kron-like elliptical
*                                        aperture magnitude (AB)
*                                        (MAG_AUTO_Ywir) (2)
      real*4        e_YWmagAUTO ! (mag) ?=-99 rms uncertainty on MAG_AUTO_Ywir
*                                        (MAGERR_AUTO_Ywir)
      integer*4     AreaY       ! (pix+2) Isophotal area above analysis threshold
*                                        (ISOAREA_IMAGE_Ywir) (2)
      integer*4     AreaFY      ! (pix+2) Isophotal area (filtered) above analysis
*                                        threshold (ISOAREAF_IMAGE_Ywir) (2)
      real*8        Xpos        ! (pix) Object position along the x-axis
*                                        (X_IMAGE_Ywir) (2)
      real*8        Ypos        ! (pix) Object position along the y-axis
*                                        (Y_IMAGE_Ywir) (2)
      real*4        AaxisY      ! (deg) Profile RMS along major axis
*                                        (A_WORLD_Ywir) (2)
      real*4        BaxisY      ! (deg) ? Profile RMS along minor axis
*                                        (B_WORLD_Ywir) (2)
      real*4        thetaY      ! (deg) Position angle (THETA_WORLD_Ywir) (2)
      real*4        muMaxY      ! (mag/arcsec+2) Peak Surface brightness above background
*                                        (MU_MAX_Ywir)
      integer*4     FlagsY      ! Extraction flags (FLAGS_Ywir)
      real*8        FWHMImgY    ! (pix) FWHM assuming a gaussian core
*                                        (FWHM_IMAGE_Ywir) (2)
      real*4        ClassStarY  ! Star/Galaxy classifier output
*                                        (CLASS_STAR_Ywir) (2) (7)
*Note (1): All magnitudes are given in th AB system.
*Note (2): The subscript "Ywir" refers to measurements performed on the
* WIRCam Y-band images.
*Note (3): All aperture magnitude (MAG_APE) are given for an aperture
* of 10 pixels diameter.
*Note (4): E(B-V) extinction from Schlegelet al. (1998ApJ...500..525S)
*Note (5): Due to a miss-matchingbetween he CFHTLS catalogues,
* two CFHTLS tiles are missing in the W1 field,
* W1_022929-070000 and W1_023319-07000.
*Note (6): the subscript "y" in the label of the magnitudes
* is the Terapix designation for the emplacement MegaCam
* i-band filter, also known as i2 at CFHT. Not to be
* confused with the subscript "Ywir" which refers to
* the WIRCam Y-band at CFHT.
*Note (7): Star/Galaxy flag as follows:
*  0 = extended / galaxy / non-star
*  1 = point-like source / star

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

C  Loading file 'cfhqsir.dat'	! CFHQSIR catalogue (W1, W2, W3 and W4 fields)

C  Format for file interpretation

    1 format(
     +  A16,1X,E10.6,1X,E10.6,1X,F8.4,1X,E8.4,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,
     +  F8.4,1X,E8.4,1X,E9.5,1X,F8.4,1X,E8.4,1X,F8.4,1X,F8.4,1X,F8.4,
     +  1X,F8.4,1X,F8.4,1X,F8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,
     +  F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,
     +  1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,
     +  E8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,F8.4,
     +  1X,E8.4,1X,F5.3,1X,F8.4,1X,E8.4,1X,F8.4,1X,E8.4,1X,F8.4,1X,
     +  E8.4,1X,I6,1X,I6,1X,F8.2,1X,F8.2,1X,E12.10,1X,E12.10,1X,F5.1,
     +  1X,F6.3,1X,I3,1X,F7.2,1X,F4.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'cfhqsir.dat')
      write(6,*) '....Loading file: cfhqsir.dat'
      do i__=1,8608680
        read(1,'(A646)')ar__
        read(ar__,1)
     +  Tile,RAdeg,DEdeg,umag,e_umag,gmag,e_gmag,rmag,e_rmag,imag,
     +  e_imag,ymag,e_ymag,zmag,e_zmag,YWmag,e_YWmag,deltamag,umagISO,
     +  e_umagISO,gmagISO,e_gmagISO,rmagISO,e_rmagISO,imagISO,
     +  e_imagISO,ymagISO,e_ymagISO,zmagISO,e_zmagISO,umagAUTO,
     +  e_umagAUTO,gmagAUTO,e_gmagAUTO,rmagAUTO,e_rmagAUTO,imagAUTO,
     +  e_imagAUTO,ymagAUTO,e_ymagAUTO,zmagAUTO,e_zmagAUTO,umagAPER,
     +  e_umagAPER,gmagAPER,e_gmagAPER,rmagAPER,e_rmagAPER,imagAPER,
     +  e_imagAPER,ymagAPER,e_ymagAPER,zmagAPER,e_zmagAPER,E_B_V,
     +  YWmagISO,e_YWmagISO,YWmagAPER,e_YWmagAPER,YWmagAUTO,
     +  e_YWmagAUTO,AreaY,AreaFY,Xpos,Ypos,AaxisY,BaxisY,thetaY,
     +  muMaxY,FlagsY,FWHMImgY,ClassStarY
        if(ar__(605:616) .EQ. '') BaxisY = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Tile,RAdeg,DEdeg,umag,e_umag,gmag,e_gmag,rmag,e_rmag,imag,
     +  e_imag,ymag,e_ymag,zmag,e_zmag,YWmag,e_YWmag,deltamag,umagISO,
     +  e_umagISO,gmagISO,e_gmagISO,rmagISO,e_rmagISO,imagISO,
     +  e_imagISO,ymagISO,e_ymagISO,zmagISO,e_zmagISO,umagAUTO,
     +  e_umagAUTO,gmagAUTO,e_gmagAUTO,rmagAUTO,e_rmagAUTO,imagAUTO,
     +  e_imagAUTO,ymagAUTO,e_ymagAUTO,zmagAUTO,e_zmagAUTO,umagAPER,
     +  e_umagAPER,gmagAPER,e_gmagAPER,rmagAPER,e_rmagAPER,imagAPER,
     +  e_imagAPER,ymagAPER,e_ymagAPER,zmagAPER,e_zmagAPER,E_B_V,
     +  YWmagISO,e_YWmagISO,YWmagAPER,e_YWmagAPER,YWmagAUTO,
     +  e_YWmagAUTO,AreaY,AreaFY,Xpos,Ypos,AaxisY,BaxisY,thetaY,
     +  muMaxY,FlagsY,FWHMImgY,ClassStarY
c    .......End.of.Just test output...........
      end do
      close(1)

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