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. V/98                    MSX Infrared Astrometric Catalog (Egan+ 1996)
*================================================================================
*The MSX Infrared Astrometric Catalog
*       Egan M.P., Price S.D.
*      <Astron. J 112, 2862 (1996)>
*      =1996AJ....112.2862E
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'msx.dat'	! MSX Infrared Astrometric Catalog

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

C  J2000 position composed of: RAh RAm RAs DE- DEd DEm DEs
      real*8        RAdeg      (nr__) ! (deg) Right Ascension J2000
      real*8        DEdeg      (nr__) ! (deg)     Declination J2000
C  ---------------------------------- ! (position vector(s) in degrees)

      character*1   AsID       (nr__) ! *[FfANS] Original astrometric catalog ID
      integer*4     AsName     (nr__) ! Astrometric catalog number
      character*1   IrID       (nr__) ! *[PFSBZC] IR catalog ID
      character*13  IrName     (nr__) ! Name of star in IR catalog
      integer*4     RAh        (nr__) ! (h) Right ascension, J2000
      integer*4     RAm        (nr__) ! (min) Right ascension, J2000
      real*4        RAs        (nr__) ! (s) Right ascension, J2000
      character*1   DE_        (nr__) ! Sign of declination
      integer*4     DEd        (nr__) ! (deg) Declination, J2000
      integer*4     DEm        (nr__) ! (arcmin) Declination, J2000
      real*4        DEs        (nr__) ! (arcsec) Declination, J2000
      real*4        e_RAs      (nr__) ! (ms) Mean R.A. error*cos(dec)
      real*4        e_DEs      (nr__) ! (0.01arcsec) Mean declination error
      real*8        pmRA       (nr__) ! (10-2s/yr) Proper motion in right ascension (J2000)
      real*8        pmDE       (nr__) ! (10-2arcsec/yr) Proper motion in declination (J2000)
      real*4        e_pmRA     (nr__) ! (0.1mas/yr) Mean error of R.A. PM*cos(dec)
      real*4        e_pmDE     (nr__) ! (0.1mas/yr) Mean error of Dec. PM
      character*3   Sp         (nr__) ! *Spectral type
      character*2   LRS        (nr__) ! IRAS LRS designation
      real*4        Vmag       (nr__) ! (mag) V visual magnitude
      real*4        F12um      (nr__) ! (Jy) ?=0.000E+00 IRAS 12mu flux
      real*4        F25um      (nr__) ! (Jy) ?=0.000E+00 IRAS 25mu flux
      real*4        F60um      (nr__) ! (Jy) ?=0.000E+00 IRAS 60mu flux
      real*4        F100um     (nr__) ! (Jy) ?=0.000E+00 IRAS 100mu flux
      integer*4     q_F12um    (nr__) ! IRAS 12um flux quality flag
      integer*4     q_F25um    (nr__) ! IRAS 25um flux quality flag
      integer*4     q_F60um    (nr__) ! IRAS 60um flux quality flag
      integer*4     q_F100um   (nr__) ! IRAS 100um flux quality flag
      real*4        FSIIIA     (nr__) ! (Jy) *SPIRIT III Band A flux density estimate
      real*4        FSIIIB1    (nr__) ! (Jy) *SPIRIT III Band B1 flux density estimate
      real*4        FSIIIB2    (nr__) ! (Jy) *SPIRIT III Band B2 flux density estimate
      real*4        FSIIIC     (nr__) ! (Jy) *SPIRIT III Band C flux density estimate
      real*4        FSIIID     (nr__) ! (Jy) *SPIRIT III Band D flux density estimate
      real*4        FSIIIE     (nr__) ! (Jy) *SPIRIT III Band E flux density estimate
      real*4        F12umEst   (nr__) ! (Jy) Estimated IRAS 12 micron flux
      real*4        Lam1       (nr__) ! (um) *? Wavelength of CIO observation
      real*4        Flux1      (nr__) ! (Jy) *? Corresponding Flux of CIO observation
      real*4        Lam2       (nr__) ! (um) *? Wavelength of CIO observation
      real*4        Flux2      (nr__) ! (Jy) *? Corresponding Flux of CIO observation
*Note on AsID:
*  F  FK5, Cat. <I/149>
*  f  FK5 Extension, Cat. <I/175>
*  A  ACRS, Cat. <I/171>
*  N  PPM, Cat. <I/146>
*  S  PPM South, Cat. <I/193>
*Note on IrID:
*  P  IRAS Point Source Catalog, Cat. <II/125>
*  F  IRAS Faint Source Catalog, Cat. <II/156>
*  B  Combined PSC/FSC data, Cat. <II/125> and Cat. <II/156>
*  Z  IRAS Faint Source Reject
*  S  IRAS Serendiptious Survey, Cat. <II/126>
*  C  Catalog of IR Observations, Cat. <II/209>
*Note on Sp:
*  Coded spectral type, e.g. G83 = G8 III; G80 = G8
*Note on Lam1, Lam2, Flux1, Flux2:
*  These values were originally embedded in the IRAS Fxxum columns.
*Note on FSIIIA, FSIIIB1, FSIIIB2, FSIIIC, FSIIID, FSIIIE:
*  the wavelength domains are specified by the central wavelength 
*  (isophotal wavelength) and the FWHM wavelength range (in {mu}m):
*  ----------------------------
*  Band  Center   FWHM Points
*  ----------------------------
*  A     8.28     6.8  - 10.8
*  B1    4.29     4.22 - 4.36
*  B2    4.25     4.24 - 4.45
*  C    12.13     11.1 - 13.2
*  D    14.65     13.5 - 15.9
*  E    21.34     18.2 - 25.1
*  ----------------------------

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

C  Loading file 'msx.dat'	! MSX Infrared Astrometric Catalog

C  Format for file interpretation

    1 format(
     +  A1,I6,A1,A13,I2,I2,F6.3,A1,I2,I2,F5.2,F6.1,F5.1,F9.3,F9.2,
     +  F6.1,F6.1,A3,A2,F5.2,E9.3,E9.3,E9.3,E9.3,I1,I1,I1,I1,E9.3,
     +  E9.3,E9.3,E9.3,E9.3,E9.3,E9.3,F4.1,E9.3,F4.1,E9.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'msx.dat')
      write(6,*) '....Loading file: msx.dat'
      do i__=1,177860
        read(1,'(A221)')ar__
        read(ar__,1)
     +  AsID(i__),AsName(i__),IrID(i__),IrName(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),e_RAs(i__),
     +  e_DEs(i__),pmRA(i__),pmDE(i__),e_pmRA(i__),e_pmDE(i__),
     +  Sp(i__),LRS(i__),Vmag(i__),F12um(i__),F25um(i__),F60um(i__),
     +  F100um(i__),q_F12um(i__),q_F25um(i__),q_F60um(i__),
     +  q_F100um(i__),FSIIIA(i__),FSIIIB1(i__),FSIIIB2(i__),
     +  FSIIIC(i__),FSIIID(i__),FSIIIE(i__),F12umEst(i__),Lam1(i__),
     +  Flux1(i__),Lam2(i__),Flux2(i__)
        if(ar__(196:199) .EQ. '') Lam1(i__) = rNULL__
        if(ar__(200:208) .EQ. '') Flux1(i__) = rNULL__
        if(ar__(209:212) .EQ. '') Lam2(i__) = rNULL__
        if(ar__(213:221) .EQ. '') Flux2(i__) = rNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  AsID(i__),AsName(i__),IrID(i__),IrName(i__),RAh(i__),RAm(i__),
     +  RAs(i__),DE_(i__),DEd(i__),DEm(i__),DEs(i__),e_RAs(i__),
     +  e_DEs(i__),pmRA(i__),pmDE(i__),e_pmRA(i__),e_pmDE(i__),
     +  Sp(i__),LRS(i__),Vmag(i__),F12um(i__),F25um(i__),F60um(i__),
     +  F100um(i__),q_F12um(i__),q_F25um(i__),q_F60um(i__),
     +  q_F100um(i__),FSIIIA(i__),FSIIIB1(i__),FSIIIB2(i__),
     +  FSIIIC(i__),FSIIID(i__),FSIIIE(i__),F12umEst(i__),Lam1(i__),
     +  Flux1(i__),Lam2(i__),Flux2(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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