FORTRAN Generation
(/./ftp/cats/II/226)

Conversion of standardized ReadMe file for file /./ftp/cats/II/226 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 2026-Sep-15
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/226              Stellar polarization catalogs agglomeration (Heiles, 2000)
*================================================================================
*An agglomeration of stellar polarization catalogs
*       Heiles C.
*      <Astron. J. 119, 923 (2000)>
*      =2000AJ....119..923H
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'catalog.dat'	! Agglomeration of stellar polarization catalogs

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

C  J2000 position composed of: RAhr DEdeg
      integer*4     DEdeg      (nr__) ! (10-4deg) [-900000,900000] Declination (J2000) (1)
      integer*4     RAhr       (nr__) ! (10-6h) [0,24000000[ Right ascension (J2000) (1)
      real*8        HD         (nr__) ! ?=-999.9 HD number
      real*8        BD         (nr__) ! ?=-999.9 Bonner DM number
      real*8        CD         (nr__) ! ?=-999.9 Cordoba DM number
      real*8        CPD        (nr__) ! ?=-999.9 Cape DM number
      real*4        Pol        (nr__) ! (%) Percentage polarization
      real*8        e_Pol      (nr__) ! (%) ?=-999.900 rms uncertainty on Pol
      real*4        PA         (nr__) ! (deg) Position angle, equatorial
      real*4        e_PA       (nr__) ! (deg) ?=-99.9 rms uncertainty on PA
      real*4        PAgal      (nr__) ! (deg) Position angle, Galactic
      real*8        GLON       (nr__) ! (deg) Galactic longitude
      real*8        GLAT       (nr__) ! (deg) Galactic latitude
      real*4        E_B_V      (nr__) ! (mag) ?=-99.90 Reddening
      real*4        DPA        (nr__) ! (deg) ?=-999.9 Discrepancy between PA and PAgal (2)
      integer*4     IdCat      (nr__) ! [1,5]?=-999 Primary stellar database (3)
      real*4        Vmag       (nr__) ! (mag) ?=-999.9 Visual magnitude
      real*8        Dist       (nr__) ! (pc) ?=-999.9 Distance
      character*16  SpType     (nr__) ! Spectral type (4)
      integer*4     PolRefs    (22,nr__) ! Polarization catalog numbers (5)
      integer*4     DistCat    (nr__) ! Distance catalog
*Note (1):
*    The declination, in units of 10^-4^ decimal degrees, is to the left of
*    the decimal point; the right ascension, in units of 10^-6^ decimal
*    hours, is to the right of the decimal point. For example,
*    -123456.15432100 is DE=-12.3456{deg}, RA=15.432100h.
*Note (2):
*    Discrepancy between the position angles in Galactic and Equatorial
*    coordinates in the original catalog. Nonzero entries represent errors
*    in coordinate conversion in the original catalog, and the angle may be
*    wrong in one or both coordinate systems.
*Note (3): the codes are:
*    1 = Hipparcos, Cat. <I/239>
*    2 = Tycho, Cat. <I/239>
*    3 = SAO, Cat. <I/131>
*    4 = SIMBAD (arcsecond accuracy)
*    5 = SIMBAD (~arcmin accuracy)
* -999 = stellar position and/or identification may be incorrect
*Note (4): Special notations:
*    NOOS: no observation
*    O SD: O type subdwarf
*    All spectral types were derived from the original catalogs. Spectral
*    types of many stars are still uncertain and will change as more
*    observations accumulate. Therefore, it is better for people to obtain
*    spectral types from other sources.
*Note (5):
*    PolRefs is made of 22 binary digits, with 1 meaning a particular
*    catalog was used and 0 meaning it was not; the individual references
*    patterns are listed in the "Reference patterns" section below.
*
*    Let us define nb as the particular binary digit, with nb in range
*    0 -> 21; Each nb corresponds to a particular reference, as follows:
*    0: no entries
*    1: no entries
*    2: Reiz and Franco (1998, Cat. <J/A+AS/130/133>)
*    3: Bel et al. (1993A&A...270..444B)
*    4: Leroy (1993A&A...274..203L)
*    5: Goodman (1997, priv. comm.)
*    6: Appenzeller (1974A&A....36...99A)
*    7: Schroeder (1976A&AS...23..125S)
*    8: Markkannen (1979A&A....74..201M)
*    9: Krautter (1980A&AS...39..167K)
*    10: Korhonen and Reiz (1986A&AS...64..487K)
*    11: Berdyugin et al. (1995A&A...294..568B)
*    12-21: the 10 different references within MFKNK (Mathewson et al.
*           (Cat. <II/34>).
*         For (nb in range 12 -> 21), we have (nb = 22 - DistCat),
*         where (1 <= DistCat <= 10) and is listed in table 2.
*         For example, Behr in MFKNK has DistCat = 4, so it is
*         represented by a 1 in position 18.
*    All entries are 0 or 1 except for Leroy (1993A&A...274..203L), for
*    which 7, 8, 9 mean that original data are from ME, TI, and MA,
*    respectively, as listed in Leroy's Table 1; and for Markkannen
*    (1979A&A....74..201M), for which 2 and 3 specify the original data
*    source as given in Markkanen's Table 2.

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

C  Loading file 'catalog.dat'	! Agglomeration of stellar polarization catalogs

C  Format for file interpretation

    1 format(
     +  2X,I7,1X,I8,1X,F9.1,F11.6,F11.6,F11.6,3X,F6.3,1X,F8.3,1X,F6.1,
     +  1X,F6.1,1X,F6.1,1X,F8.4,1X,F8.4,1X,F6.2,1X,F6.1,1X,I4,1X,F6.1,
     +  1X,F7.1,2X,A16,22I1,2X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'catalog.dat')
      write(6,*) '....Loading file: catalog.dat'
      do i__=1,9286
        read(1,'(A197)')ar__
        read(ar__,1)
     +  DEdeg(i__),RAhr(i__),HD(i__),BD(i__),CD(i__),CPD(i__),
     +  Pol(i__),e_Pol(i__),PA(i__),e_PA(i__),PAgal(i__),GLON(i__),
     +  GLAT(i__),E_B_V(i__),DPA(i__),IdCat(i__),Vmag(i__),Dist(i__),
     +  SpType(i__),(PolRefs(j__,i__),j__=1,22),DistCat(i__)
c    ..............Just test output...........
        write(6,1)
     +  DEdeg(i__),RAhr(i__),HD(i__),BD(i__),CD(i__),CPD(i__),
     +  Pol(i__),e_Pol(i__),PA(i__),e_PA(i__),PAgal(i__),GLON(i__),
     +  GLAT(i__),E_B_V(i__),DPA(i__),IdCat(i__),Vmag(i__),Dist(i__),
     +  SpType(i__),(PolRefs(j__,i__),j__=1,22),DistCat(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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