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

Conversion of standardized ReadMe file for file /./ftp/cats/IX/41 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-Oct-12
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. IX/41   XMM-Newton Serendipitous Source Catalogue 2XMMi-DR3    (XMM-SSC, 2010)
*================================================================================
*XMM-Newton Serendipitous Source Catalogue: 2XMMi-DR3
*     XMM-Newton Survey Science Centre Consortium
*    <XMM-SSC, Leicester, UK (2010)>
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'xmm2ir3s.dat'	! The 2XMMi-DR3 Catalog, "slim" version

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

C  Position composed of: RAdeg DEdeg
      integer*4     Source      ! [1,263230] (SRCID) Unique source index
      character*22  v2XMMi      ! (IAUNAME) Unique source name (8)
      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        srcML       ! (SC_DET_ML) Source detection likelihood (2)
      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        Flux8       ! (mW/m2) (SC_EP_8_FLUX) Mean flux in 0.2-12keV band
      real*4        e_Flux8     ! (mW/m2) (SC_EP_8_FLUX_ERR) Mean error on Flux
      real*4        Flux9       ! (mW/m2) ? (SC_EP_9_FLUX) Mean flux in 0.5-4.5keV band
      real*4        e_Flux9     ! (mW/m2) ? (SC_EP_9_FLUX_ERR) Mean error on Flux14
      real*4        HR1         ! ? (SC_HR1) Hardness ratio of bands 1 and 2 (1)
      real*4        e_HR1       ! ? (SC_HR1_ERR) Mean error on HR1
      real*4        HR2         ! ? (SC_HR2) Hardness ratio of bands 2 and 3 (1)
      real*4        e_HR2       ! ? (SC_HR2_ERR) Mean error on HR2
      real*4        HR3         ! ? (SC_HR3) Hardness ratio of bands 3 and 4 (1)
      real*4        e_HR3       ! ? (SC_HR3_ERR) Mean error on HR3
      real*4        HR4         ! ? (SC_HR4) Hardness ratio of bands 4 and 5 (1)
      real*4        e_HR4       ! ? (SC_HR4_ERR) Mean error on HR4
      real*4        ext         ! (arcsec) (SC_EXTENT) Total band extent
      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
      integer*4     c           ! [0,1] (CONFUSED) Confusion flag (7)
      integer*4     f1          ! [0,3] (SC_DR_FIRST) Release source added (6)
      integer*4     fu          ! [0,3] (SC_DR_LAST) Release source modified (6)
      character*97  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 (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): addition and last modification of source:
*     the flags indicate in which catalogue in the 2XMM catalogue series
*     (starting from 2XMM) this unique source first appeared (f1) or was
*     last modified (fu). The flag is 1 for 2XMM (IX/39), 2 for 2XMMi
*     (IX/40) and 3 for the present 2XMMi-DR3 catalogue (IX/41).
*Note (7): This flag (1=true, 0=false) signifies that the 3-{sigma} error
*     circle of a detection within this unique source overlaps the 3-{sigma}
*     error circle of a nearby unique source. As such, it is an indicator of
*     possible confusion (uncertainty) about the assignment of detections
*     between sources.
*Note (8):
*     The IAU identification, defined from the average corrected position,
*     is of the form "2XMM JHHMMSS.s+DDMMSS" or "2XMMi JHHMMSS.s+DDMMSS";
*     see the "Nomenclature Notes" section above.

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

C  Loading file 'xmm2ir3s.dat'	! The 2XMMi-DR3 Catalog, "slim" version

C  Format for file interpretation

    1 format(
     +  I6,1X,A22,1X,F8.4,1X,F8.4,1X,F4.1,1X,E9.3,1X,E11.5,1X,E9.3,1X,
     +  E11.5,1X,E9.3,1X,E11.5,1X,E9.3,1X,E11.5,1X,E9.3,1X,E11.5,1X,
     +  E9.3,1X,E11.5,1X,E9.3,1X,E11.5,1X,E9.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,F5.1,1X,E9.3,
     +  1X,F5.3,1X,I1,1X,I1,1X,I2,1X,I1,1X,I1,1X,I1,1X,A97)

C  Effective file loading

      open(unit=1,status='old',file=
     +'xmm2ir3s.dat')
      write(6,*) '....Loading file: xmm2ir3s.dat'
      do i__=1,262902
        read(1,'(A405)')ar__
        read(ar__,1)
     +  Source,v2XMMi,RAdeg,DEdeg,ePos,srcML,Flux1,e_Flux1,Flux2,
     +  e_Flux2,Flux3,e_Flux3,Flux4,e_Flux4,Flux5,e_Flux5,Flux8,
     +  e_Flux8,Flux9,e_Flux9,HR1,e_HR1,HR2,e_HR2,HR3,e_HR3,HR4,e_HR4,
     +  ext,extML,Cst,V,S,Nd,c,f1,fu,uLEDAS
        if(ar__(196:206) .EQ. '') Flux9 = rNULL__
        if(ar__(208:216) .EQ. '') e_Flux9 = rNULL__
        if(ar__(218:223) .EQ. '') HR1 = rNULL__
        if(ar__(225:230) .EQ. '') e_HR1 = rNULL__
        if(ar__(232:237) .EQ. '') HR2 = rNULL__
        if(ar__(239:244) .EQ. '') e_HR2 = rNULL__
        if(ar__(246:251) .EQ. '') HR3 = rNULL__
        if(ar__(253:258) .EQ. '') e_HR3 = rNULL__
        if(ar__(260:265) .EQ. '') HR4 = rNULL__
        if(ar__(267:272) .EQ. '') e_HR4 = rNULL__
        if(ar__(290:294) .EQ. '') Cst = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Source,v2XMMi,RAdeg,DEdeg,ePos,srcML,Flux1,e_Flux1,Flux2,
     +  e_Flux2,Flux3,e_Flux3,Flux4,e_Flux4,Flux5,e_Flux5,Flux8,
     +  e_Flux8,Flux9,e_Flux9,HR1,e_HR1,HR2,e_HR2,HR3,e_HR3,HR4,e_HR4,
     +  ext,extML,Cst,V,S,Nd,c,f1,fu,uLEDAS
c    .......End.of.Just test output...........
      end do
      close(1)

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