FORTRAN Generation
(/./ftp/cats/J/A_A/439/413)

Conversion of standardized ReadMe file for file /./ftp/cats/J/A_A/439/413 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-Jun-08
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/439/413       XMDS/VVDS 4{sigma} catalogue             (Chiappetti+, 2005)
*================================================================================
*The XMM-LSS survey: The XMDS/VVDS 4{sigma} catalogue.
*    Chiappetti L., Tajer M., Trinchieri G., Maccagni D., Maraschi L.,
*    Paioro L., Pierre M., Surdej J., Garcet  O., Gosset E., Le Fevre O.,
*    Bertin E., McCracken H.J., Mellier Y., Foucaud S., Radovich M., Ripepi V.,
*    Arnaboldi M.
*   <Astron. Astrophys. 439, 413 (2005)>
*   =2005A&A...439..413C
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'xmds1.dat'	! The XMDS catalogue

      integer*4 nr__
      parameter (nr__=364)	! Number of records
      character*160 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)

      integer*4     Seq         ! *Internal sequence identifier
      character*16  XMDS        ! *Catalog name of the object
      integer*4     RAh         ! (h) Right ascension (J2000)
      integer*4     RAm         ! (min) Right ascension (J2000)
      real*4        RAs         ! (s) Right ascension (J2000)
      character*1   DE_         ! Declination sign (J2000)
      integer*4     DEd         ! (deg) Declination (J2000)
      integer*4     DEm         ! (arcmin) Declination (J2000)
      real*4        DEs         ! (arcsec) Declination (J2000)
      real*4        CountB      ! (ct) Number of net counts in 0.5-2keV band
      real*4        e_CountB    ! (ct) Error on CountB
      real*4        CountCD     ! (ct) Number of net counts in 2-10keV band
      real*4        e_CountCD   ! (ct) Error on CountCD
      real*4        FluxB       ! (10-18W/m2) Flux in 0.5-2keV band
      real*4        FluxCD      ! (10-18W/m2) flux in 2-10keV band
      character*2   bBand       ! *[A B CD] band which has highest S/N ratio
      integer*4     Gap         ! *[0/2]? Gap flag
      integer*4     Rank        ! *[0/4] Identification rank
      real*4        DistXO      ! (arcsec) *? Distance between X-ray source and
*                                       counterpart
      real*4        Rmag        ! (mag) *? R magnitude of counterpart
      real*4        e_Rmag      ! (mag) ? Error on Rmag
      real*4        Imag        ! (mag) *? I magnitude of counterpart
      real*4        e_Imag      ! (mag) ? error on Imag
      integer*4     Opt         ! *[0/2]? photometry reliability flag
      character*1   VR          ! *[V] Presence of radio counterpart in
*                                         VIMOS1.4GHz (<J/A+A/403/857>)
      character*1   LR          ! *[L] Presence of radio counterpart in
*                                         XMM-LSS 325MHz (<J/ApJ/591/640>)
      character*30  CatName     ! *Name of counterpart in external catalogues
*Note on Seq:
*    If the X-ray source has more possible counterparts, all X-ray columns 
*    from Name to Gap are repeated.
*Note on XMDS:
*    Name of the object, built from uncorrected J2000 coordinates as
*    provided by the XMM-SAS. The coordinate columns actually provide
*    corrected positions which frequently differ from the last digits 
*    in the RA and DEC parts of the name.
*Note on bBand:
*    The X-ray energy band which has the best S/N ratio is coded as follows:
*     A  = 0.3-0.5 keV
*     B  = 0.5-2.0 keV
*     C  = 2.0-4.5 keV
*     D  = 4.5-10  keV
*     CD =   2-10  keV
*Note on Gap:
*    This flag indicates the reliability of the X-ray flux, due to the fact
*    the source falls on inter-CCD gaps in one or more of the EPIC cameras,
*    or close to the edge (or outside) of the FOV of one EPIC camera and is
*    based on the ratio of the punctual exposures in each camera to the
*    maximum exposure in the FOV also for each camera.
*
*    The coding is as follows:
*    0 = maximum reliability, no problems
*    1 = fair reliability, X-ray position could fall near a CCD border or gap
*    2 = poor reliability, X-ray position almost surely falls close to CCD 
*        border or gap)
*    An additional code of -1 indicates the fact the source falls outside
*    of the FOV in at least one camera (this does not occur for the present
*    subsample)
*Note on Rank:
*    The rank gives the quality of the identification with the counterpart,
*    coded as follows:
*      0 = optimal (e.g. only counterpart, or brightest and closest)
*      1 = good
*      2 = ambiguous (e.g. typically more than one possible counterparts listed)
*      4 = blank field (unidentified source)
*Note on DistXO:
*    The distance between the X-ray source position and, in the following
*    order of preference:
*    - the VVDS optical counterpart (if any)
*    - or the radio counterpart in the VIMOS1.4GHz catalogue (Bondi et al.,
*      2003, Cat. <J/A+A/403/857>)
*    - or the radio counterpart in the XMM-LSS 325MHz catalogue (Cohen et al.,
*      2003, Cat. <J/ApJ/591/640>
*    - or the catalogued NED object
*    - or the catalogued SIMBAD object
*    It is blank if there are no counterparts.
*Note on Rmag and Imag:
*    This note applies to all optical columns from Rmag to e_Imag
*    inclusive. The magnitudes are given when there is a valid measurement
*    in the VVDS catalogue. They may be left blank in case of radio
*    counterparts only, or of (usually very bright) objects present only in
*    external (SIMBAD) catalogues
*Note on Opt:
*    This flag gives the quality of the VVDS photometry, as follows:
*     0 = magnitudes flagged as good
*     1 = magnitudes flagged as possibly bad, but not saturated
*     2 = magnitudes flagged as bad because saturated
*Note on VR:
*    A "V" in this column indicates an association with a radio source in
*    the or the radio counterpart in the VIMOS1.4GHz catalogue (Bondi et
*    al., 2003, Cat. <J/A+A/403/857>). Otherwise the column is left blank
*Note on LR:
*    A "L" in this column indicates an association with a radio source in
*    the of the radio counterpart in the XMM-LSS 325 MHz catalogue (Cohen
*    et al., 2003, Cat. <J/ApJ/591/640>). Otherwise the column is left blank
*Note on CatName:
*    The name of the counterpart in external sites like NED or SIMBAD 
*    or in the XMM-LSS 325 MHz catalogue (Cohen et al., 2003, Cat.
*    <J/ApJ/591/640>) (preferred order). 
*    The VIRMOS 1.4GHZ catalog (Bondi et al., 2003, Cat. <J/A+A/403/857>) 
*    is in SIMBAD.

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

C  Loading file 'xmds1.dat'	! The XMDS catalogue

C  Format for file interpretation

    1 format(
     +  I4,6X,A16,1X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,F4.1,1X,F6.1,
     +  1X,F4.1,1X,F5.1,1X,F4.1,1X,F5.1,1X,F5.1,1X,A2,1X,I1,1X,I1,1X,
     +  F4.1,1X,F5.2,1X,F4.2,1X,F5.2,1X,F4.2,1X,I1,1X,A1,1X,A1,1X,A30)

C  Effective file loading

      open(unit=1,status='old',file=
     +'xmds1.dat')
      write(6,*) '....Loading file: xmds1.dat'
      do i__=1,364
        read(1,'(A160)')ar__
        read(ar__,1)
     +  Seq,XMDS,RAh,RAm,RAs,DE_,DEd,DEm,DEs,CountB,e_CountB,CountCD,
     +  e_CountCD,FluxB,FluxCD,bBand,Gap,Rank,DistXO,Rmag,e_Rmag,Imag,
     +  e_Imag,Opt,VR,LR,CatName
        if(ar__(89:89) .EQ. '') Gap = iNULL__
        if(ar__(93:96) .EQ. '') DistXO = rNULL__
        if(ar__(98:102) .EQ. '') Rmag = rNULL__
        if(ar__(104:107) .EQ. '') e_Rmag = rNULL__
        if(ar__(109:113) .EQ. '') Imag = rNULL__
        if(ar__(115:118) .EQ. '') e_Imag = rNULL__
        if(ar__(120:120) .EQ. '') Opt = iNULL__
        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)
     +  Seq,XMDS,RAh,RAm,RAs,DE_,DEd,DEm,DEs,CountB,e_CountB,CountCD,
     +  e_CountCD,FluxB,FluxCD,bBand,Gap,Rank,DistXO,Rmag,e_Rmag,Imag,
     +  e_Imag,Opt,VR,LR,CatName
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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