FORTRAN Generation
()

Conversion of standardized ReadMe file for catalog 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 2021-Jan-27
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. J/A+A/564/A79     Proper motions of open clusters from UCAC4      (Dias+, 2014)
*================================================================================
*Proper motions of the optically visible open clusters based on the
*UCAC4 catalog.
*    Dias W.S., Monteiro H., Caetano T.C., Lepine J.R.D., Assafin M.,
*    Oliveira A.F.
*   <Astron. Astrophys. 564, A79 (2014)>
*   =2014A&A...564A..79D
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'pm/*'	! Proper motions and membership, by cluster,
                             based on UCAC4

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

C  Position composed of: RAdeg DEdeg (Epoch=J2000)
      character*17  Cluster     ! Cluster name
      real*8        R           ! (arcmin) Distance from source
      character*10  UCAC4       ! UCAC4 recommended identifier (ZZZ-NNNNNN) (1)
      real*8        RAdeg       ! (deg) Mean right ascension (ICRS), Ep=J2000 (2)
      integer*4     e_RAdeg     ! (mas) Mean error of RAdeg at mean epoch
      real*8        DEdeg       ! (deg) Mean declination (ICRS), Ep=J2000 (2)
      integer*4     e_DEdeg     ! (mas) Mean error of DEdeg at mean epoch
      integer*4     ePos        ! (mas) Total mean error on position at Ep=J2000 (3)
      real*8        EpRA        ! (yr) Central epoch for mean RA
      real*8        EpDE        ! (yr) Central epoch for mean Declination
      real*4        f_mag       ! (mag) ? UCAC fit model magnitude (579-642nm) (4)
      real*4        a_mag       ! (mag) ? UCAC aperture magnitude (579-642nm) (4)
      real*4        e_a_mag     ! (mag) ? Mean error on f.mag and a.mag (5)
      integer*4     of          ! [0/9] UCAC4 object classification flag (6)
      integer*4     db          ! [0/36] UCAC4 double star flag (7)
      integer*4     Na          ! [0/71] Number of UCAC observations for the star
      integer*4     Nu          ! [0/70] Number of used UCAC observations (8)
      integer*4     Nc          ! [1/38] Number of catalog positions used for pm
      real*8        pmRA        ! (mas/yr) ? Proper motion in RA(*cos(Dec)) (9)
      real*4        e_pmRA      ! (mas/yr) ? Mean error on pmRA (9)
      real*8        pmDE        ! (mas/yr) ? Proper motion in Dec (9)
      real*4        e_pmDE      ! (mas/yr) ? Mean error on pmDE (9)
*--------------------------------------------------------------------------------
      integer*4     MPOS1       ! [1/182895114] Unique star ID number (10)
      character*10  UCAC2       ! UCAC2 (Cat. I/289) designation (ZZZ-NNNNNN)
      character*12  Tycho_2     ! Tycho-2 (Cat. I/259) designation (FFFF-NNNNN-N)
*--------------------------------------------------------------------------------
      integer*8     v2Mkey      ! ? 2MASS (Cat. II/246) Unique source identifier
      real*4        Jmag        ! (mag) ? 2MASS J magnitude (1.2um)
      real*4        e_Jmag      ! (mag) ? Mean error (rounded to 0.01mag)
      integer*4     q_Jmag      ! [0,58]? J-band quality-confusion flag (11)
      real*4        Hmag        ! (mag) ? 2MASS H magnitude (1.6um)
      real*4        e_Hmag      ! (mag) ? Mean error (rounded to 0.01mag)
      integer*4     q_Hmag      ! [0,58]? H-band quality-confusion flag (11)
      real*4        Kmag        ! (mag) ? 2MASS Ks magnitude (2.2um)
      real*4        e_Kmag      ! (mag) ? Mean error (rounded to 0.01mag)
      integer*4     q_Kmag      ! [0,58]? K-band quality-confusion flag (11)
*--------------------------------------------------------------------------------
      real*4        Bmag        ! (mag) ? B magnitude from APASS (12)
      integer*4     e_Bmag      ! (cmag) ? Estimated error on Bmag (12)
      character*1   f_Bmag      ! [.-] Actual or S/N estimated error (12)
      real*4        Vmag        ! (mag) ? V magnitude from APASS (12)
      integer*4     e_Vmag      ! (cmag) ? Estimated error on Vmag (12)
      character*1   f_Vmag      ! [.-] Actual or S/N estimated error (12)
      real*4        gmag        ! (mag) ? g magnitude from APASS (12)
      integer*4     e_gmag      ! (cmag) ? Estimated error on gmag (12)
      character*1   f_gmag      ! [.-] Actual or S/N estimated error (12)
      real*4        rmag        ! (mag) ? r magnitude from APASS (12)
      integer*4     e_rmag      ! (cmag) ? Estimated error on rmag (12)
      character*1   f_rmag      ! [.-] Actual or S/N estimated error (12)
      real*4        imag        ! (mag) ? i magnitude from APASS (12)
      integer*4     e_imag      ! (cmag) ? Estimated error on imag (12)
      character*1   f_imag      ! [.-] Actual or S/N estimated error (12)
*--------------------------------------------------------------------------------
      integer*4     g           ! [0,3] g-flag from SPM (13)
      integer*4     c           ! [0,7] c-flag from SPM (14)
      integer*4     H           ! [0/9] Hipparcos/Tycho flag (15)
      integer*4     A           ! [0/8] AC2000 flag (16)
      integer*4     b           ! [0/8] AGK2 Bonn match flag (16)
      integer*4     h_1         ! [0/8] AGK2 Hamburg match flag (16)
      integer*4     Z           ! [0/8] Zone astrographic match flag (16)
      integer*4     B_1         ! [0/8] Black Birch match flag (16)
      integer*4     L           ! [0/8] Lick Astrographic match flag (16)
      integer*4     N           ! [0/8] NPM Lick match flag (16)
      integer*4     S           ! [0/8] SPM Lick match flag (16)
      integer*4     LEDA        ! ([6arcsec]) LEDA I-band galaxy match (17)
      integer*4     v2MX        ! (arcsec) 2MASX K-band match (18)
      integer*4     P           ! (%) [0/100] Membership probability
*Note (1): the UCAC4 number is the recommended identification of UCAC4 stars.
*     It made as "ZZZ-NNNNNNN", where zzz is the zone number (between 1 and
*     900 from South pole to North pole, each zone being 0.2{deg} wide), and
*     nnnnnn the 6-digit running number in the zone.
*Note (2): Positions are on the International Celestial Reference System
*     (ICRS) as represented by the Hipparcos / Tycho-2  catalogs. The epoch
*     for the positions of all stars is J2000.0: the weighted mean catalog
*     position was updated using the proper motions. The observational UCAC
*     position is but one of several going into these values and is not
*     given in the UCAC4; thus the original UCAC observation cannot be
*     recovered from these data.
*Note (3): taking into account the propagation of the proper motion error
*     between the mean epoch and J2000.
*Note (4): systematic errors are expected to be below 0.1mag. The aperture
*     photometry (a.mag) is considered more robust, particularly for "odd"
*     cases, while the model fit magnitude is expected to be more accurate
*     for "well behaved" stars.
*Note (5): For many stars a photometric error based on the scatter from
*     individual observations of that star on different CCD frames could be
*     obtained.  A model error was also attempted to be assigned, based on
*     the S/N ratio.  The error quoted here is the larger of the 2.  If that
*     error exceeds 0.9mag the error was set to 0.9mag
*Note (6): the object type flag is used to identify possible problems
*    with a star and has the following meaning:
*    0 = good, clean star, no known problem
*    1 = near overexposed star
*    2 = possible streak object
*    3 = high proper motion (HPM) star
*    4 = actually use external HPM data instead of UCAC4 observed data
*        (accuracy of positions varies between catalogs)
*    5 = poor proper motion solution, report only CCD epoch position
*    6 = substitute poor astrometric results by FK6/Hip/Tycho-2 data
*    7 = added supplement star (no CCD data) from FK6/Hip/Tycho-2 data,
*        and 2 stars added from high proper motion surveys
*    8 = high proper motion solution in UCAC4, star not matched with PPMXL
*    9 = high proper motion solution in UCAC4, discrepant motion to PPMXL
*Note (7): The double star flag is used to indicate the type/quality
*     of double star fit. It is a combination of 2 flags, dsf+dst:
*  * dsf = double star flag, represents the overall classification:
*      0 = single star
*     10 = component #1 of "good" double star
*     20 = component #2 of "good" double star
*     30 = blended image
*  * dst = double star type, derived from pixel data image profile fits
*          (largest value of all images used for this star):
*      0 = no double star, not sufficient #pixels or elongation
*          to even call double star fit subroutine
*      1 = elongated image but no more than 1 peak detected
*      2 = 2 separate peaks detected -> try double star fit
*      3 = secondary peak found on each side of primary
*      4 = case 1 after successful double fit (small separation, blended image)
*      5 = case 2 after successful double fit (most likely real double)
*      6 = case 3 after successful double fit (brighter secondary picked)
*Note (8): A zero for the number of used images indicates that all images
*     have some "problem" (such as overexposure). In that case an unweighted
*     mean over all available images (Na) is taken to derive the mean
*     position, while normally a weighted mean was calculated based on the
*     "good" images, excluding possible problem images (Nu<=Na).
*Note (9):  For astrometric data copied from the FK6, Hipparcos and Tycho-2
*     catalogs a mean error in positions was adopted depending on input
*     catalog and the brightness of the star rather than giving the
*     individual star's error quoted in those catalogs.
*Note (10):  This unique star identification number is between 200001 and
*     321640 for Hipparcos stars, and between 1 and 9430 for non-Hipparcos
*     stars supplemented to the UCAC4 catalog (no CCD observation). For all
*     other stars this unique star identification number is the internal
*     mean-position-file (MPOS) number + 1million. Note, there are several
*     thousand cases where different UCAC4 stars link to the same Hipparcos
*     star number due to resolved binary stars with each component being a
*     separate star entry in UCAC4.
*Note (11): For each 2MASS bandpass a combined flag was created
*     (cc_flg + ph_qual) consisting of the contamination flag (0 to 50)
*     and the photometric quality flag (0 to 8).
*      00 =  cc_flg 2MASS '0', no artifacts or contamination
*      10 =  cc_flg 2MASS 'p', source may be contaminated by a latent image
*      20 =  cc_flg 2MASS 'c', photometric confusion
*      30 =  cc_flg 2MASS 'd', diffraction spike confusion
*      40 =  cc_flg 2MASS 's', electronic stripe
*      50 =  cc_flg 2MASS 'b', bandmerge confusion
*       0 = no ph_qual flag
*       1 = ph_qual 2MASS 'X', no valid brightness estimate
*       2 = ph_qual 2MASS 'U', upper limit on magnitude
*       3 = ph_qual 2MASS 'F', no reliable estimate of the photometric error
*       4 = ph_qual 2MASS 'E', goodness-of-fit quality of profile-fit poor
*       5 = ph_qual 2MASS 'A', valid measurement, snr>10 AND cmsig<0.10857
*       6 = ph_qual 2MASS 'B', valid measurement, snr> 7 AND cmsig<0.15510
*       7 = ph_qual 2MASS 'C', valid measurement, snr> 5 AND cmsig<0.21714
*       8 = ph_qual 2MASS 'D', valid measurement, no snr OR cmsig req.
*
*     For example the value 05 is decoded to be cc_flg=0, and ph_qual=5,
*     meaning no artifacts or contamination and 2MASS qual flag = "A".
*Note (12): Data are from the AAVSO Photometric all-sky survey (APASS) DR6
*     plus single observation stars kindly provided by A.Henden. For bright
*     stars the Bmag and Vmag columns contain the Hipparcos/Tycho Bt and Vt
*     mags respectively, whenever there is no APASS B or V available and
*     valid Bt or Vt mags were found. The errors flagged with "-" are formal
*     errors estimated from the S/N, while the "normal" errors (flagged with
*     ".") are from the official release data error estimates (at least 2
*     observations per star).
*Note (13): The g-flag from the Yale San Juan first epoch Southern
*     Proper Motion data (YSJ1, SPM) has the following meaning:
*     0 = no info
*     1 = matched with 2MASS extended source list (2MASX
*     2 = LEDA  galaxy
*     3 = known QSO
*Note (14): The c-flag from the Yale San Juan first epoch Southern Proper
*     Motion data (YSJ1, SPM) indicates which input catalog has been used
*     to identify stars for pipeline processing:
*     1 = Hipparcos (Cat. I/311)
*     2 = Tycho2 (Cat. I/259)
*     3 = UCAC2 (Cat. I/289)
*     4 = 2MASS psc (Cat. II/246)
*     5 = 2MASS xsc (extended sources, Cat. VII/233; largely galaxies)
*     6 = LEDA  (confirmed galaxies, Paturel et al. 2005)
*     7 = QSO   (Veron-Cetty & Veron 2006, Cat. VII/248)
*Note (15): The FK6-Hipparcos-Tycho-source-flag has the following meaning:
*     0 = not a Hipparcos or Tycho star
*     1 = Hipparcos 1997 version main catalog (Cat I/239)
*     2 = Hipparcos double star annex
*     3 = Tycho-2 (Cat. I/259)
*     4 = Tycho annex 1
*     5 = Tycho annex 2
*     6 = FK6 position and proper motion (instead of Hipparcos data)
*     7 = Hippparcos 2007 solution position and proper motion (Cat. I/311)
*     8 = FK6, only PM substitution (not in UCAC4 data)
*     9 = Hipparcos 2007, only proper motion substituted (Cat. I/311)
*Note (16): The catflg match flag is provided for major catalogs used
*     in the computation of the proper motions.  Each match is analyzed
*     for multiple matches of entries of the 1st catalog to 2nd catalog
*     entries, and the other way around.  Matches are also classified
*     by separation and difference in magnitude to arrive at a confidence
*     level group.  The flag has the following meaning:
*     0 = star not matched with this catalog
*     1 = unique-unique match, not involving a double star
*     2 = unique-unique match, but involving a flagged double star
*     3 = multiple match but unique in high confidence level group, no double
*     4 = as 3, but involving a flagged double star
*     5 = closest match, not involving a double, likely o.k.
*     6 = closest match, but involving a flagged double star
*     7 = maybe o.k. smallest separation match in both directions, no double
*     8 = as 7, but involving a flagged double star
*Note (17): value is either 0 (no match) or contains the log of the apparent
*     total diameter (in 0.1arcmin) for I-band (object size) information
*     copied from the LEDA catalog (galaxies). A size value of less than 1
*     has been rounded up to 1.
*Note (18): This flag is either 0 (no match) or contains the length of the
*     semi-major axis of the fiducial ellipse at the K-band (object size)
*     information copied from the 2MASS extended source catalog.

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

C  Loading file 'pm/*'	! Proper motions and membership, by cluster,
*                             based on UCAC4

C  Format for file interpretation

    1 format(
     +  A17,1X,F10.6,1X,A10,1X,F11.7,1X,I3,1X,F11.7,1X,I3,1X,I4,1X,
     +  F7.2,1X,F7.2,1X,F6.3,1X,F6.3,1X,F4.2,1X,I1,1X,I2,1X,I3,1X,I3,
     +  1X,I3,1X,F8.1,1X,F4.1,1X,F8.1,1X,F4.1,1X,I9,1X,A10,1X,A12,1X,
     +  I10,1X,F6.3,1X,F4.2,1X,I2,1X,F6.3,1X,F4.2,1X,I2,1X,F6.3,1X,
     +  F4.2,1X,I2,1X,F6.3,1X,I2,1X,A1,1X,F6.3,1X,I2,1X,A1,1X,F6.3,1X,
     +  I2,1X,A1,1X,F6.3,1X,I2,1X,A1,1X,F6.3,1X,I2,1X,A1,1X,I1,1X,I1,
     +  1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I1,1X,I2,
     +  1X,I2,4X,I3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'J/A+A/564/A79/pm/*')
      write(6,*) '....Loading file: pm/*'
      do i__=1,1803
        read(1,'(A341)')ar__
        read(ar__,1)
     +  Cluster,R,UCAC4,RAdeg,e_RAdeg,DEdeg,e_DEdeg,ePos,EpRA,EpDE,
     +  f_mag,a_mag,e_a_mag,of,db,Na,Nu,Nc,pmRA,e_pmRA,pmDE,e_pmDE,
     +  MPOS1,UCAC2,Tycho_2,v2Mkey,Jmag,e_Jmag,q_Jmag,Hmag,e_Hmag,
     +  q_Hmag,Kmag,e_Kmag,q_Kmag,Bmag,e_Bmag,f_Bmag,Vmag,e_Vmag,
     +  f_Vmag,gmag,e_gmag,f_gmag,rmag,e_rmag,f_rmag,imag,e_imag,
     +  f_imag,g,c,H,A,b,h_1,Z,B_1,L,N,S,LEDA,v2MX,P
        if(ar__(94:99) .EQ. '') f_mag = rNULL__
        if(ar__(101:106) .EQ. '') a_mag = rNULL__
        if(ar__(108:111) .EQ. '') e_a_mag = rNULL__
        if(ar__(130:137) .EQ. '') pmRA = rNULL__
        if(ar__(139:142) .EQ. '') e_pmRA = rNULL__
        if(ar__(144:151) .EQ. '') pmDE = rNULL__
        if(ar__(153:156) .EQ. '') e_pmDE = rNULL__
        if(ar__(192:201) .EQ. '') v2Mkey = iNULL__
        if(ar__(203:208) .EQ. '') Jmag = rNULL__
        if(ar__(210:213) .EQ. '') e_Jmag = rNULL__
        if(ar__(215:216) .EQ. '') q_Jmag = iNULL__
        if(ar__(218:223) .EQ. '') Hmag = rNULL__
        if(ar__(225:228) .EQ. '') e_Hmag = rNULL__
        if(ar__(230:231) .EQ. '') q_Hmag = iNULL__
        if(ar__(233:238) .EQ. '') Kmag = rNULL__
        if(ar__(240:243) .EQ. '') e_Kmag = rNULL__
        if(ar__(245:246) .EQ. '') q_Kmag = iNULL__
        if(ar__(248:253) .EQ. '') Bmag = rNULL__
        if(ar__(255:256) .EQ. '') e_Bmag = iNULL__
        if(ar__(260:265) .EQ. '') Vmag = rNULL__
        if(ar__(267:268) .EQ. '') e_Vmag = iNULL__
        if(ar__(272:277) .EQ. '') gmag = rNULL__
        if(ar__(279:280) .EQ. '') e_gmag = iNULL__
        if(ar__(284:289) .EQ. '') rmag = rNULL__
        if(ar__(291:292) .EQ. '') e_rmag = iNULL__
        if(ar__(296:301) .EQ. '') imag = rNULL__
        if(ar__(303:304) .EQ. '') e_imag = iNULL__
c    ..............Just test output...........
        write(6,1)
     +  Cluster,R,UCAC4,RAdeg,e_RAdeg,DEdeg,e_DEdeg,ePos,EpRA,EpDE,
     +  f_mag,a_mag,e_a_mag,of,db,Na,Nu,Nc,pmRA,e_pmRA,pmDE,e_pmDE,
     +  MPOS1,UCAC2,Tycho_2,v2Mkey,Jmag,e_Jmag,q_Jmag,Hmag,e_Hmag,
     +  q_Hmag,Kmag,e_Kmag,q_Kmag,Bmag,e_Bmag,f_Bmag,Vmag,e_Vmag,
     +  f_Vmag,gmag,e_gmag,f_gmag,rmag,e_rmag,f_rmag,imag,e_imag,
     +  f_imag,g,c,H,A,b,h_1,Z,B_1,L,N,S,LEDA,v2MX,P
c    .......End.of.Just test output...........
      end do
      close(1)

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