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

Conversion of standardized ReadMe file for file /./ftp/cats/IX/40/ into FORTRAN code for loading all data files into arrays.

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 2014-Jul-22
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/40  The XMM-Newton 2nd Incremental Source Catalogue (2XMMi)  (XMM-SSC, 2008)
*================================================================================
*The XMM-Newton 2nd Serendipitous Source Catalogue
*     XMM-Newton Survey Science Centre Consortium
*    <XMM-SSC, Leicester, UK (2008)>
*    =2008yCat.9040....0X
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'xmm2is.dat'	! The 2XMMi catalog, "slim" version

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

      integer*4     Source     (nr__) ! [1,221170] (SRCID) Unique source index
      character*16  v2XMMi     (nr__) ! (IAUNAME) Unique source name (7)
      real*8        RAdeg      (nr__) ! (deg) (SC_RA) Mean source right ascension (ICRS)
      real*8        DEdeg      (nr__) ! (deg) (SC_DEC) Mean source declination (ICRS)
      real*4        ePos       (nr__) ! (arcsec) (SC_POSERR) Mean error on position
      real*4        Flux1      (nr__) ! (mW/m2) (SC_EP_1_FLUX) Mean flux in 0.2-0.5keV band
      real*4        e_Flux1    (nr__) ! (mW/m2) (SC_EP_1_FLUX_ERR) Mean error on Flux1
      real*4        Flux2      (nr__) ! (mW/m2) (SC_EP_2_FLUX) Mean flux in 0.5-1.0keV band
      real*4        e_Flux2    (nr__) ! (mW/m2) (SC_EP_2_FLUX_ERR) Mean error on Flux2
      real*4        Flux3      (nr__) ! (mW/m2) (SC_EP_3_FLUX) Mean flux in 1.0-2.0keV band
      real*4        e_Flux3    (nr__) ! (mW/m2) (SC_EP_3_FLUX_ERR) Mean error on Flux3
      real*4        Flux4      (nr__) ! (mW/m2) (SC_EP_4_FLUX) Mean flux in 2.0-4.5keV band
      real*4        e_Flux4    (nr__) ! (mW/m2) (SC_EP_4_FLUX_ERR) Mean error on Flux4
      real*4        Flux5      (nr__) ! (mW/m2) (SC_EP_5_FLUX) Mean flux in 4.5-12keV band
      real*4        e_Flux5    (nr__) ! (mW/m2) (SC_EP_5_FLUX_ERR) Mean error on Flux5
      real*4        Flux       (nr__) ! (mW/m2) (SC_EP_8_FLUX) Mean flux in 0.2-12keV band
      real*4        e_Flux     (nr__) ! (mW/m2) (SC_EP_8_FLUX_ERR) Mean error on Flux
      real*4        Flux14     (nr__) ! (mW/m2) ? (SC_EP_9_FLUX) Mean flux in 0.5-4.5keV band
      real*4        e_Flux14   (nr__) ! (mW/m2) ? (SC_EP_9_FLUX_ERR) Mean error on Flux14
      real*8        HR1        (nr__) ! ? (SC_HR1) Hardness ratio of bands 1 and 2 (1)
      real*8        e_HR1      (nr__) ! ? (SC_HR1_ERR) Mean error on HR1
      real*8        HR2        (nr__) ! ? (SC_HR2) Hardness ratio of bands 2 and 3 (1)
      real*8        e_HR2      (nr__) ! ? (SC_HR2_ERR) Mean error on HR2
      real*8        HR3        (nr__) ! ? (SC_HR3) Hardness ratio of bands 3 and 4 (1)
      real*8        e_HR3      (nr__) ! ? (SC_HR3_ERR) Mean error on HR3
      real*8        HR4        (nr__) ! ? (SC_HR4) Hardness ratio of bands 4 and 5 (1)
      real*8        e_HR4      (nr__) ! ? (SC_HR4_ERR) Mean error on HR4
      real*4        srcML      (nr__) ! (SC_DET_ML) Source detection likelihood (2)
      real*4        extML      (nr__) ! (SC_EXT_ML) Detection likelihood of the
*                                            extended source (3)
      real*4        Cst        (nr__) ! [0,1]? (SC_CHI2PROB) Constant probability (4)
      integer*4     V          (nr__) ! [0,1]  (SC_VAR_FLAG) Variability flag (V=1)
      integer*4     S          (nr__) ! [0,4]  (SC_SUM_FLAG) summary flag (5)
      integer*4     Chg        (nr__) ! [1,3] (SC_CHFLAG1) Changes compared to 2XMM (7)
      integer*4     Nd         (nr__) ! (N_DETECTIONS) Number of detections
      character*16  v1XMM      (nr__) ! (MATCH_1XMM) Name of matched 1XMM source (6)
      real*4        o1XMM      (nr__) ! (arcsec) [0,3]? (SEP_1XMM) Distance of 1XMM source
      character*94  uLEDAS     (nr__) ! (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 (note they differ from catalog 1XMM):
*        1 = 0.2 -  0.5 keV (narrow band)
*        2 = 0.5 -  1.0 keV (narrow band)
*        3 = 1.0 -  2.0 keV (narrow band)
*        4 = 2.0 -  4.5 keV (narrow band)
*        5 = 4.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
*Note (7): the 'Chg' flag indicates whether a source is (1) a 2XMM source
*     with unchanged averaged parameters, (2) a 2XMM source with changed
*     averaged parameters, or (3) a new source. In the case (3), the source
*     is named '2XMMi' followed by the contents of the 2XMM column (2nd
*     column); the name is otherwise 2XMM followed by the  contents of the
*     2XMM column.

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

C  Loading file 'xmm2is.dat'	! The 2XMMi catalog, "slim" version

C  Format for file interpretation

    1 format(
     +  I6,7X,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,I1,1X,I2,6X,A16,1X,F4.1,1X,A94)

C  Effective file loading

      open(unit=1,file='xmm2is.dat', status='old')
      write(6,*) '....Loading file: xmm2is.dat'
      do i__=1,221012
        read(1,'(A434)')ar__
        read(ar__,1)
     +  Source(i__),v2XMMi(i__),RAdeg(i__),DEdeg(i__),ePos(i__),
     +  Flux1(i__),e_Flux1(i__),Flux2(i__),e_Flux2(i__),Flux3(i__),
     +  e_Flux3(i__),Flux4(i__),e_Flux4(i__),Flux5(i__),e_Flux5(i__),
     +  Flux(i__),e_Flux(i__),Flux14(i__),e_Flux14(i__),HR1(i__),
     +  e_HR1(i__),HR2(i__),e_HR2(i__),HR3(i__),e_HR3(i__),HR4(i__),
     +  e_HR4(i__),srcML(i__),extML(i__),Cst(i__),V(i__),S(i__),
     +  Chg(i__),Nd(i__),v1XMM(i__),o1XMM(i__),uLEDAS(i__)
        if(ar__(192:203) .EQ. '') Flux14(i__) = rNULL__
        if(ar__(205:213) .EQ. '') e_Flux14(i__) = rNULL__
        if(ar__(215:221) .EQ. '') HR1(i__) = rNULL__
        if(ar__(223:229) .EQ. '') e_HR1(i__) = rNULL__
        if(ar__(231:237) .EQ. '') HR2(i__) = rNULL__
        if(ar__(239:245) .EQ. '') e_HR2(i__) = rNULL__
        if(ar__(247:253) .EQ. '') HR3(i__) = rNULL__
        if(ar__(255:261) .EQ. '') e_HR3(i__) = rNULL__
        if(ar__(263:269) .EQ. '') HR4(i__) = rNULL__
        if(ar__(271:277) .EQ. '') e_HR4(i__) = rNULL__
        if(ar__(299:303) .EQ. '') Cst(i__) = rNULL__
        if(ar__(336:339) .EQ. '') o1XMM(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Source(i__),v2XMMi(i__),RAdeg(i__),DEdeg(i__),ePos(i__),
     +  Flux1(i__),e_Flux1(i__),Flux2(i__),e_Flux2(i__),Flux3(i__),
     +  e_Flux3(i__),Flux4(i__),e_Flux4(i__),Flux5(i__),e_Flux5(i__),
     +  Flux(i__),e_Flux(i__),Flux14(i__),e_Flux14(i__),HR1(i__),
     +  e_HR1(i__),HR2(i__),e_HR2(i__),HR3(i__),e_HR3(i__),HR4(i__),
     +  e_HR4(i__),srcML(i__),extML(i__),Cst(i__),V(i__),S(i__),
     +  Chg(i__),Nd(i__),v1XMM(i__),o1XMM(i__),uLEDAS(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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