FORTRAN Generation
(/./ftp/cats/IX/39/)

Conversion of standardized ReadMe file for file /./ftp/cats/IX/39/ 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.5, on 2013-Jun-18
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__=-1.e37)     	! NULL real number
      parameter  (iNULL__=-2147483647)	! NULL int  number

C=============================================================================
Cat. IX/39  The XMM-Newton 2nd Serendipitous Source Catalogue (2XMM)  (XMM-SSC, 2007)
*================================================================================
*The XMM-Newton 2nd Serendipitous Source Catalogue
*     XMM-Newton Survey Science Centre Consortium
*    <XMM-SSC, Leicester, UK (2007)>
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'xmm2slim.dat'	! The 2XMM catalog, "slim" version

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

      integer*4     Source      ! [1,191870] (SRCID) Unique source index
      character*16  v2XMM       ! (IAUNAME) Unique source name
      real*8        RAdeg       ! (deg) (SC_RA) Mean source right ascension (ICRS)
      real*8        DEdeg       ! (deg) (SC_DEC) Mean source declination (ICRS)
      real*4        ePos        ! (arcsec) (SC_POSERR) Mean error on position
      real*4        Flux1       ! (mW/m2) (SC_EP_1_FLUX) Mean flux in 0.2-0.5keV band
      real*4        e_Flux1     ! (mW/m2) (SC_EP_1_FLUX_ERR) Mean error on Flux1
      real*4        Flux2       ! (mW/m2) (SC_EP_2_FLUX) Mean flux in 0.5-1.0keV band
      real*4        e_Flux2     ! (mW/m2) (SC_EP_2_FLUX_ERR) Mean error on Flux2
      real*4        Flux3       ! (mW/m2) (SC_EP_3_FLUX) Mean flux in 1.0-2.0keV band
      real*4        e_Flux3     ! (mW/m2) (SC_EP_3_FLUX_ERR) Mean error on Flux3
      real*4        Flux4       ! (mW/m2) (SC_EP_4_FLUX) Mean flux in 2.0-4.5keV band
      real*4        e_Flux4     ! (mW/m2) (SC_EP_4_FLUX_ERR) Mean error on Flux4
      real*4        Flux5       ! (mW/m2) (SC_EP_5_FLUX) Mean flux in 4.5-12keV band
      real*4        e_Flux5     ! (mW/m2) (SC_EP_5_FLUX_ERR) Mean error on Flux5
      real*4        Flux        ! (mW/m2) (SC_EP_8_FLUX) Mean flux in 0.2-12keV band
      real*4        e_Flux      ! (mW/m2) (SC_EP_8_FLUX_ERR) Mean error on Flux
      real*4        Flux14      ! (mW/m2) ? (SC_EP_9_FLUX) Mean flux in 0.5-4.5keV band
      real*4        e_Flux14    ! (mW/m2) ? (SC_EP_9_FLUX_ERR) Mean error on Flux14
      real*8        HR1         ! ? (SC_HR1) Hardness ratio of bands 1 and 2 (1)
      real*8        e_HR1       ! ? (SC_HR1_ERR) Mean error on HR1
      real*8        HR2         ! ? (SC_HR2) Hardness ratio of bands 2 and 3 (1)
      real*8        e_HR2       ! ? (SC_HR2_ERR) Mean error on HR2
      real*8        HR3         ! ? (SC_HR3) Hardness ratio of bands 3 and 4 (1)
      real*8        e_HR3       ! ? (SC_HR3_ERR) Mean error on HR3
      real*8        HR4         ! ? (SC_HR4) Hardness ratio of bands 4 and 5 (1)
      real*8        e_HR4       ! ? (SC_HR4_ERR) Mean error on HR4
      real*4        srcML       ! (SC_DET_ML) Source detection likelihood (2)
      real*4        extML       ! (SC_EXT_ML) Detection likelihood of the
*                                            extended source (3)
      real*4        Cst         ! [0,1]? (SC_CHI2PROB) Constant probability (4)
      integer*4     V           ! [0,1]  (SC_VAR_FLAG) Variability flag (V=1)
      integer*4     S           ! [0,4]  (SC_SUM_FLAG) summary flag (5)
      integer*4     Nd          ! (N_DETECTIONS) Number of detections
      character*16  v1XMM       ! (MATCH_1XMM) Name of matched 1XMM source (6)
      real*4        o1XMM       ! (arcsec) [0,3]? (SEP_1XMM) Distance of 1XMM source
      integer*4     ID2XMMp     ! ? (SRCID_2XMMP) ID of matched 2XMMp source (6)
      character*16  v2XMMp      ! (MATCH_2XMMP) Name of matched 2XMMp source (6)
      real*4        o2XMp       ! (arcsec) [0,3]? (SEP_2XMMP)  Distance of  2XMMp source
      character*52  uLEDAS      ! (LEDAS_URL) URL for details at LEDAS
*Note (1): The hardness ratio is defined as   (F2-F1)/(F2+F1)
*     if F2 is the flux in the harder band (the hardness ratio is
*     therefore -1 for softest sources and +1 for hardest sources).
*     The energy bands are:
*        1 = 0.2 -  0.5 keV (narrow band)
*        2 = 0.5 -  2.0 keV (narrow band)
*        3 = 2.0 -  4.5 keV (narrow band)
*        4 = 4.5 -  7.5 keV (narrow band)
*        5 = 7.5 - 12.0 keV (narrow band)
*        6 = 0.2 -  2.0 keV = soft broad band, no images made
*        7 = 2.0 - 12.0 keV = hard broad band, no images made
*        8 = 0.2 - 12.0 keV = total band
*        9 = 0.5 -  4.5 keV = XID band
*Note (2): defined as the maximum of the likelihoods of all detections
*     of this source.
*Note (3): defined as the average of the extent likelihoods of all
*     detections of this source.
*Note (4): {chi}^2^ probability that the unique source as detected by
*     any of the observations is constant, that is, the minimum value
*     of the EPIC probabilities in each detection.
*Note (5):
*    The summary flag of the source is derived from the EPIC flag, and is
*    assigned the following values:
*    0 = good: none of the EPIC flags was set.
*    1 = source parameters may be affected: at least one of the EPIC
*        warning flags was set, but no possible-spurious detection flag
*        is set.
*    2 = possibly spurious source: at least one of the possible-spurious
*        detection flags was set but not the manual flag
*    3 = source located in a area where spurious detection may occur.
*    4 = source located in a area where spurious detection may occur and is
*        possibly spurious.
*Note (6): within a radius of 3arcsec

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

C  Loading file 'xmm2slim.dat'	! The 2XMM catalog, "slim" version

C  Format for file interpretation

    1 format(
     +  I6,6X,A16,1X,F8.4,1X,F8.4,1X,F4.1,1X,E12.6,1X,E9.3,1X,E12.6,
     +  1X,E9.3,1X,E12.6,1X,E9.3,1X,E12.6,1X,E9.3,1X,E12.6,1X,E9.3,1X,
     +  E12.6,1X,E9.3,1X,E12.6,1X,E9.3,1X,F7.4,1X,F7.4,1X,F7.4,1X,
     +  F7.4,1X,F7.4,1X,F7.4,1X,F7.4,1X,F7.4,1X,E9.3,1X,E9.3,1X,F5.3,
     +  1X,I1,1X,I1,1X,I2,6X,A16,1X,F4.2,1X,I6,7X,A16,1X,F4.2,33X,A52)

C  Effective file loading

      open(unit=1,file='xmm2slim.dat', status='old')
      write(6,*) '....Loading file: xmm2slim.dat'
      do i__=1,191870
        read(1,'(A456)')ar__
        read(ar__,1)
     +  Source,v2XMM,RAdeg,DEdeg,ePos,Flux1,e_Flux1,Flux2,e_Flux2,
     +  Flux3,e_Flux3,Flux4,e_Flux4,Flux5,e_Flux5,Flux,e_Flux,Flux14,
     +  e_Flux14,HR1,e_HR1,HR2,e_HR2,HR3,e_HR3,HR4,e_HR4,srcML,extML,
     +  Cst,V,S,Nd,v1XMM,o1XMM,ID2XMMp,v2XMMp,o2XMp,uLEDAS
        if(ar__(191:202) .EQ. '') Flux14 = rNULL__
        if(ar__(204:212) .EQ. '') e_Flux14 = rNULL__
        if(ar__(214:220) .EQ. '') HR1 = rNULL__
        if(ar__(222:228) .EQ. '') e_HR1 = rNULL__
        if(ar__(230:236) .EQ. '') HR2 = rNULL__
        if(ar__(238:244) .EQ. '') e_HR2 = rNULL__
        if(ar__(246:252) .EQ. '') HR3 = rNULL__
        if(ar__(254:260) .EQ. '') e_HR3 = rNULL__
        if(ar__(262:268) .EQ. '') HR4 = rNULL__
        if(ar__(270:276) .EQ. '') e_HR4 = rNULL__
        if(ar__(298:302) .EQ. '') Cst = rNULL__
        if(ar__(333:336) .EQ. '') o1XMM = rNULL__
        if(ar__(338:343) .EQ. '') ID2XMMp = iNULL__
        if(ar__(368:371) .EQ. '') o2XMp = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Source,v2XMM,RAdeg,DEdeg,ePos,Flux1,e_Flux1,Flux2,e_Flux2,
     +  Flux3,e_Flux3,Flux4,e_Flux4,Flux5,e_Flux5,Flux,e_Flux,Flux14,
     +  e_Flux14,HR1,e_HR1,HR2,e_HR2,HR3,e_HR3,HR4,e_HR4,srcML,extML,
     +  Cst,V,S,Nd,v1XMM,o1XMM,ID2XMMp,v2XMMp,o2XMp,uLEDAS
c    .......End.of.Just test output...........
      end do
      close(1)

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