CDS.headStuff2 FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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.81 (2015-09-23), on 2024-Apr-24
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. II/307              WISE Preliminary Data Release         (Cutri+ 2011)
*================================================================================
*WISE Preliminary Data Release
*     Cutri R.M., et al.
*    <IPAC/Caltech (2011) >
*   =2011yCat.2307....0C
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'wise.sam'	! Sample of the "slim" version of the WISE
                              preliminary release (among 257,310,278 sources)

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

C  J2000 position composed of: RAdeg DEdeg
      character*19  WISEP      (nr__) ! WISE Preliminary Release Catalog name,
*                                 based on J2000 position (designation)
      real*8        RAdeg      (nr__) ! (deg) Right ascension (J2000)
      real*8        DEdeg      (nr__) ! (deg) Declination (J2000)
      real*4        eeMaj      (nr__) ! (arcsec) Semi-major axis of the error ellipse (6)
      real*4        eeMin      (nr__) ! (arcsec) Semi-minor axis of the error ellipse (6)
      integer*4     eePA       (nr__) ! (deg) Position angle of the error ellipse (6)
      real*4        W1mag      (nr__) ! (mag) ? W1 magnitude (3.35um), Vega scale
      real*4        W2mag      (nr__) ! (mag) ? W2 magnitude (4.6um), Vega scale
      real*4        W3mag      (nr__) ! (mag) ? W3 magnitude (11.6um), Vega scale
      real*4        W4mag      (nr__) ! (mag) ? W4 magnitude (22.1um), Vega scale
      real*4        Jmag       (nr__) ! (mag) ? 2MASS J magnitude (1.2um)
      real*4        Hmag       (nr__) ! (mag) ? 2MASS H magnitude (1.6um)
      real*4        Kmag       (nr__) ! (mag) ? 2MASS Ks magnitude (2.2um)
      real*4        e_W1mag    (nr__) ! (mag) ? Mean error on W1 magnitude (3.35um)
      real*4        e_W2mag    (nr__) ! (mag) ? Mean error on W2 magnitude (4.6um)
      real*4        e_W3mag    (nr__) ! (mag) ? Mean error on W3 magnitude (11.6um)
      real*4        e_W4mag    (nr__) ! (mag) ? Mean error on W4 magnitude (22.1um)
      real*4        e_Jmag     (nr__) ! (mag) ? Mean error on J magnitude
      real*4        e_Hmag     (nr__) ! (mag) ? Mean error on H magnitude
      real*4        e_Kmag     (nr__) ! (mag) ? Mean error on Ks magnitude
      character*19  cntr       (nr__) ! Unique identification number for the source
      real*4        snr1       (nr__) ! ? Signal to noise ratio for W1 filter
      real*4        chi2W1     (nr__) ! ? Reduced {chi}^2^ of the W1 profile fit
      real*4        snr2       (nr__) ! ? Signal to noise ratio for W2 filter
      real*4        chi2W2     (nr__) ! ? Reduced {chi}^2^ of the W2 profile fit
      real*4        snr3       (nr__) ! ? Signal to noise ratio for W3 filter
      real*4        chi2W3     (nr__) ! ? Reduced {chi}^2^ of the W3 profile fit
      real*4        snr4       (nr__) ! ? Signal to noise ratio for W4 filter
      real*4        chi2W4     (nr__) ! ? Reduced {chi}^2^ of the W4 profile fit
      integer*4     nb         (nr__) ! Number of PSF components used simultaneously
*                                 in the profile-fitting
      integer*4     na         (nr__) ! [0/1] Active deblending flag (1 if a detection
*                                 was split into multiple sources)
      real*4        sat1       (nr__) ! [0/1] Saturated pixel fraction in W1 (w1sat)
      real*4        sat2       (nr__) ! [0/1] Saturated pixel fraction in W2 (w2sat)
      real*4        sat3       (nr__) ! [0/1] Saturated pixel fraction in W3 (w3sat)
      real*4        sat4       (nr__) ! [0/1] Saturated pixel fraction in W4 (w4sat)
      character*4   ccf        (nr__) ! [DdPpHhOo0] Contamination and confusion flag,
*                                       one per band (cc_flags) (1)
      integer*4     ex         (nr__) ! [0/1] Extended source flag (ext_flg)
*                                       (0 = consistent with point source)
      character*4   var        (nr__) ! [0-9] Variability flag, one per band (2)
      integer*4     nW1        (nr__) ! Frame detection count in W1 (w1nm) (4)
      integer*4     mW1        (nr__) ! Integer frame coverage in W1 (w1m) (5)
      integer*4     nW2        (nr__) ! Frame detection count in W2 (w2nm) (4)
      integer*4     mW2        (nr__) ! Integer frame coverage in W2 (w2m) (5)
      integer*4     nW3        (nr__) ! Frame detection count in W3 (w3nm) (4)
      integer*4     mW3        (nr__) ! Integer frame coverage in W3 (w3m) (5)
      integer*4     nW4        (nr__) ! Frame detection count in W4 (w4nm) (4)
      integer*4     mW4        (nr__) ! Integer frame coverage in W4 (w4m) (5)
      integer*8     v2Mkey     (nr__) ! ? 2MASS PSC association (not identification!)
      real*4        d2M        (nr__) ! (arcsec) [0,3]? Distance separating the positions of the
*                                 WISE source and associated 2MASS PSC source
*Note (1): One character per band (W1/W2/W3/W4) that indicates that the
*     photometry and/or position measurements of a source may be
*     contaminated or biased due to proximity to an image artifact.
* D,d =  Diffraction spike. Source may be a spurious detection of or
*     contaminated by a diffraction spike from a nearby bright star on
*     the same image
* P,p = Persistence. Source may be a spurious detection of or contaminated
*       by a latent image left by a bright star
* H,h = Halo. Source photometry may be a spurious detection of or
*       contaminated by the scattered light halo surrounding a nearby
*       bright source
* O,o = (letter "o") Optical ghost. Source may be a spurious detection
*     of or contaminated by an optical ghost image caused by a nearby bright
*     source
* 0  = (number zero) Source is unaffected by known artifacts.
*Note (2): The variability flag is a 4-character string, one character per
*     band, containing a value related to the probability that the source
*     flux measured on the individual WISE exposures is variable.
*  * value "0" indicates insufficient or inadequate data to make a
*    determination  (<11 exposures)
*  * values 1 thru 9 indicate increasing probabilities of variation;
*    - values 1-4 are most likely not variable,
*    - values 5-7 are likely variables (but susceptible of false-positive
*      variability)
*    - values >7 have the highest probability of being true variables
*Note (4): number of individual exposures on which this source was detected
*     with SNR>3 in the profile-fit measurement. This number can be zero for
*     sources that are well-detected on the coadded Atlas Image, but too
*     faint for detection on the single exposures.
*Note (5): number of individual exposures on which a profile-fit measurement
*     of this source was possible.
*Note (6): the parameters of the error ellipse are computed from the
*     1-{sigma} in RA and Dec (sigra, sigdec) and the co-{sigma} sigradec
*     with the formulae:
*     {Delta} = (sigra^2^-sigdec^2^)^2^ + 4*sigradec^2^
*     eeMaj^2^ = 0.5*(sigra^2^+sigdec^2^+sqrt({Delta}))
*     eeMin^2^ = 0.5*(sigra^2^+sigdec^2^-sqrt({Delta}))
*     tan(eePA) = (eeMaj^2^-sigdec^2^)/(sigradec*|sigradec|)
*               = (sigradec*|sigradec|)/(eeMaj^2^-sigra^2^)
*
*     Conversely, the sigra/sigdec are given by:
*     sigra^2^  = eeMaj^2^sin^2^(eePA) + eeMin^2^cos^2^(eePA)
*     sigdec^2^ = eeMaj^2^cos^2^(eePA) + eeMin^2^sin^2^(eePA)

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

C  Loading file 'wise.sam'	! Sample of the "slim" version of the WISE
*                              preliminary release (among 257,310,278 sources)

C  Format for file interpretation

    1 format(
     +  A19,1X,F9.5,1X,F9.5,1X,F4.2,1X,F4.2,1X,I3,2X,F6.3,1X,F6.3,1X,
     +  F6.3,1X,F6.3,1X,F6.3,1X,F6.3,1X,F6.3,2X,F5.3,1X,F5.3,1X,F5.3,
     +  1X,F5.3,1X,F5.3,1X,F5.3,1X,F5.3,1X,A19,2X,F6.1,1X,E9.3,1X,
     +  F6.1,1X,E9.3,1X,F6.1,1X,E9.3,1X,F6.1,1X,E9.3,2X,I1,1X,I1,2X,
     +  F5.3,1X,F5.3,1X,F5.3,1X,F5.3,2X,A4,1X,I1,1X,A4,7X,I4,1X,I4,1X,
     +  I4,1X,I4,1X,I4,1X,I4,1X,I4,1X,I4,1X,I10,1X,F6.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'wise.sam')
      write(6,*) '....Loading file: wise.sam'
      do i__=1,150
        read(1,'(A342)')ar__
        read(ar__,1)
     +  WISEP(i__),RAdeg(i__),DEdeg(i__),eeMaj(i__),eeMin(i__),
     +  eePA(i__),W1mag(i__),W2mag(i__),W3mag(i__),W4mag(i__),
     +  Jmag(i__),Hmag(i__),Kmag(i__),e_W1mag(i__),e_W2mag(i__),
     +  e_W3mag(i__),e_W4mag(i__),e_Jmag(i__),e_Hmag(i__),e_Kmag(i__),
     +  cntr(i__),snr1(i__),chi2W1(i__),snr2(i__),chi2W2(i__),
     +  snr3(i__),chi2W3(i__),snr4(i__),chi2W4(i__),nb(i__),na(i__),
     +  sat1(i__),sat2(i__),sat3(i__),sat4(i__),ccf(i__),ex(i__),
     +  var(i__),nW1(i__),mW1(i__),nW2(i__),mW2(i__),nW3(i__),
     +  mW3(i__),nW4(i__),mW4(i__),v2Mkey(i__),d2M(i__)
        if(ar__(56:61) .EQ. '') W1mag(i__) = rNULL__
        if(ar__(63:68) .EQ. '') W2mag(i__) = rNULL__
        if(ar__(70:75) .EQ. '') W3mag(i__) = rNULL__
        if(ar__(77:82) .EQ. '') W4mag(i__) = rNULL__
        if(ar__(84:89) .EQ. '') Jmag(i__) = rNULL__
        if(ar__(91:96) .EQ. '') Hmag(i__) = rNULL__
        if(ar__(98:103) .EQ. '') Kmag(i__) = rNULL__
        if(ar__(106:110) .EQ. '') e_W1mag(i__) = rNULL__
        if(ar__(112:116) .EQ. '') e_W2mag(i__) = rNULL__
        if(ar__(118:122) .EQ. '') e_W3mag(i__) = rNULL__
        if(ar__(124:128) .EQ. '') e_W4mag(i__) = rNULL__
        if(ar__(130:134) .EQ. '') e_Jmag(i__) = rNULL__
        if(ar__(136:140) .EQ. '') e_Hmag(i__) = rNULL__
        if(ar__(142:146) .EQ. '') e_Kmag(i__) = rNULL__
        if(ar__(169:174) .EQ. '') snr1(i__) = rNULL__
        if(ar__(176:184) .EQ. '') chi2W1(i__) = rNULL__
        if(ar__(186:191) .EQ. '') snr2(i__) = rNULL__
        if(ar__(193:201) .EQ. '') chi2W2(i__) = rNULL__
        if(ar__(203:208) .EQ. '') snr3(i__) = rNULL__
        if(ar__(210:218) .EQ. '') chi2W3(i__) = rNULL__
        if(ar__(220:225) .EQ. '') snr4(i__) = rNULL__
        if(ar__(227:235) .EQ. '') chi2W4(i__) = rNULL__
        if(ar__(326:335) .EQ. '') v2Mkey(i__) = iNULL__
        if(ar__(337:342) .EQ. '') d2M(i__) = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  WISEP(i__),RAdeg(i__),DEdeg(i__),eeMaj(i__),eeMin(i__),
     +  eePA(i__),W1mag(i__),W2mag(i__),W3mag(i__),W4mag(i__),
     +  Jmag(i__),Hmag(i__),Kmag(i__),e_W1mag(i__),e_W2mag(i__),
     +  e_W3mag(i__),e_W4mag(i__),e_Jmag(i__),e_Hmag(i__),e_Kmag(i__),
     +  cntr(i__),snr1(i__),chi2W1(i__),snr2(i__),chi2W2(i__),
     +  snr3(i__),chi2W3(i__),snr4(i__),chi2W4(i__),nb(i__),na(i__),
     +  sat1(i__),sat2(i__),sat3(i__),sat4(i__),ccf(i__),ex(i__),
     +  var(i__),nW1(i__),mW1(i__),nW2(i__),mW2(i__),nW3(i__),
     +  mW3(i__),nW4(i__),mW4(i__),v2Mkey(i__),d2M(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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