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 2017-Sep-22
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. I/284               The USNO-B1.0 Catalog     (Monet+ 2003)
*================================================================================
*The USNO-B Catalog
*     Monet D.G., Levine S.E., Casian B., et al.
*    <Astron. J., 125, 984 (2003)>
*    =2003AJ....125..984M
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'out.sam'	! Sample of data (around 0+0)

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

C  J2000 position composed of: RAdeg DEdeg (Epoch=J2000)
      character*12  USNO_B1_0   ! Designation of the object (1)
      character*12  Tycho_2     ! Designation in the Tycho-2 Catalog <I/259>
      real*8        RAdeg       ! (deg) Right Ascension at Eq=J2000, Ep=J2000 (2)
      real*8        DEdeg       ! (deg) Declination at Eq=J2000, Ep=J2000 (2)
      integer*4     e_RAdeg     ! (mas) Mean error on RAdeg*cos(DEdeg) at Epoch
      integer*4     e_DEdeg     ! (mas) Mean error on DEdeg at Epoch
      real*4        Epoch       ! (yr) Mean epoch of observation (2)
      integer*4     pmRA        ! (mas/yr) Proper motion in RA (relative to YS4.0)
      integer*4     pmDE        ! (mas/yr) Proper motion in DE (relative to YS4.0)
      integer*4     muPr        ! (0.1) ? Total Proper Motion probability (7)
      integer*4     e_pmRA      ! (mas/yr) Mean error on pmRA
      integer*4     e_pmDE      ! (mas/yr) Mean error on pmDE
      integer*4     fit_RA      ! (100mas) Mean error on RA fit
      integer*4     fit_DE      ! (100mas) Mean error on DE fit
      integer*4     Ndet        ! [0,5] Number of detections (7)
      character*3   Flags       ! [MsY.] Flags on object (3)
      real*4        B1mag       ! (mag) ? First blue magnitude
      integer*4     B1C         ! ? source of photometric calibration (4)
      integer*4     B1S         ! ? Survey number (see "Surveys" section below)
      integer*4     B1f         ! ? Field number in survey
      integer*4     B1s_g       ! ? Star-galaxy separation (6)
      real*4        B1xi        ! (arcsec) ? Residual in X direction (5)
      real*4        B1eta       ! (arcsec) ? Residual in Y direction (5)
      real*4        R1mag       ! (mag) ? First red magnitude
      integer*4     R1C         ! ? source of photometric calibration (4)
      integer*4     R1S         ! ? Survey number (see "Surveys" section below)
      integer*4     R1f         ! ? Field number in survey
      integer*4     R1s_g       ! ? Star-galaxy separation (6)
      real*4        R1xi        ! (arcsec) ? Residual in X direction (5)
      real*4        R1eta       ! (arcsec) ? Residual in Y direction (5)
      real*4        B2mag       ! (mag) ? Second blue magnitude
      integer*4     B2C         ! ? source of photometric calibration (4)
      integer*4     B2S         ! ? Survey number (see "Surveys" section below)
      integer*4     B2f         ! ? Field number in survey
      integer*4     B2s_g       ! ? Star-galaxy separation (6)
      real*4        B2xi        ! (arcsec) ? Residual in X direction (5)
      real*4        B2eta       ! (arcsec) ? Residual in Y direction (5)
      real*4        R2mag       ! (mag) ? Second red magnitude
      integer*4     R2C         ! ? source of photometric calibration (4)
      integer*4     R2S         ! ? Survey number (see "Surveys" section below)
      integer*4     R2f         ! ? Field number in survey
      integer*4     R2s_g       ! ? Star-galaxy separation (6)
      real*4        R2xi        ! (arcsec) ? Residual in X direction (5)
      real*4        R2eta       ! (arcsec) ? Residual in Y direction (5)
      real*4        Imag        ! (mag) ? Infrared (N) magnitude
      integer*4     IC          ! ? source of photometric calibration (4)
      integer*4     IS          ! ? Survey number (see "Surveys" section below)
      integer*4     If          ! ? Field number in survey
      integer*4     Is_g        ! ? Star-galaxy separation (6)
      real*4        Ixi         ! (arcsec) ? Residual in X direction (5)
      real*4        Ieta        ! (arcsec) ? Residual in Y direction (5)
*Note (1): The USNO-B1.0 is arranged in zones of 0.1deg in Declination,
*     with objects ordered by Right Ascension in each zone.
*     The USNO-B1.0 is made of the zone number (from 0000 in South Pole
*     to 1799 in North Pole), followed by a sequential number.
*Note (2): The proper motion was applied to compute the RAdeg and DEdeg
*    values. Please note that the large uncertainties in the proper motions
*    mean that the RAdeg and DEdeg are less accurate than the mean errors
*    e_RAdeg and e_DEdeg which apply to the position at the mean Epoch.
*Note (3): . denotes the absence of any flag
*     M = Existence in a proper motion catalog,
*     s = object on a diffraction spike
*     Y = Correlation with YS4.0 catalog (Monet, in prep.)
*Note (4): the photometric calibration is represented by a number:
*    0 = bright photometric standards on the plate
*    1 = faint photometric standard on the plate
*    2 = faint photometric standard one plate away (on overlap plate)
*    3 = faint photometric standard two plate away (on overlap of overlap)
*    etc
*Note (5): Distance, along the x- and y- direction, of the object position
*    compared to the mean epoch.
*Note (6): The star/galaxy separation is a measure of the similarity
*    of the point-spread function to a stellar profile:
*     0 means quite dissimilar -- i.e. a non-stellar object
*    11 means quite similar -- i.e. a stellar object
*Note (7): For Tycho-2 stars, the Total Proper Motion probability is
*    not given, and the number of detections Ndet is set to zero.
*    For other stars, Ndet is 2 or more.

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

C  Loading file 'out.sam'	! Sample of data (around 0+0)

C  Format for file interpretation

    1 format(
     +  A12,1X,A12,1X,F10.6,F10.6,1X,I3,1X,I3,1X,F6.1,1X,I6,1X,I6,1X,
     +  I1,1X,I3,1X,I3,1X,I1,1X,I1,1X,I1,1X,A3,2X,F5.2,1X,I1,1X,I1,1X,
     +  I3,1X,I2,1X,F6.2,F6.2,2X,F5.2,1X,I1,1X,I1,1X,I3,1X,I2,1X,F6.2,
     +  F6.2,2X,F5.2,1X,I1,1X,I1,1X,I3,1X,I2,1X,F6.2,F6.2,2X,F5.2,1X,
     +  I1,1X,I1,1X,I3,1X,I2,1X,F6.2,F6.2,2X,F5.2,1X,I1,1X,I1,1X,I3,
     +  1X,I2,1X,F6.2,F6.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'out.sam')
      write(6,*) '....Loading file: out.sam'
      do i__=1,100
        read(1,'(A250)')ar__
        read(ar__,1)
     +  USNO_B1_0,Tycho_2,RAdeg,DEdeg,e_RAdeg,e_DEdeg,Epoch,pmRA,pmDE,
     +  muPr,e_pmRA,e_pmDE,fit_RA,fit_DE,Ndet,Flags,B1mag,B1C,B1S,B1f,
     +  B1s_g,B1xi,B1eta,R1mag,R1C,R1S,R1f,R1s_g,R1xi,R1eta,B2mag,B2C,
     +  B2S,B2f,B2s_g,B2xi,B2eta,R2mag,R2C,R2S,R2f,R2s_g,R2xi,R2eta,
     +  Imag,IC,IS,If,Is_g,Ixi,Ieta
        if(ar__(77:77) .EQ. '') muPr = iNULL__
        if(ar__(98:102) .EQ. '') B1mag = rNULL__
        if(ar__(104:104) .EQ. '') B1C = iNULL__
        if(ar__(106:106) .EQ. '') B1S = iNULL__
        if(ar__(108:110) .EQ. '') B1f = iNULL__
        if(ar__(112:113) .EQ. '') B1s_g = iNULL__
        if(ar__(115:120) .EQ. '') B1xi = rNULL__
        if(ar__(121:126) .EQ. '') B1eta = rNULL__
        if(ar__(129:133) .EQ. '') R1mag = rNULL__
        if(ar__(135:135) .EQ. '') R1C = iNULL__
        if(ar__(137:137) .EQ. '') R1S = iNULL__
        if(ar__(139:141) .EQ. '') R1f = iNULL__
        if(ar__(143:144) .EQ. '') R1s_g = iNULL__
        if(ar__(146:151) .EQ. '') R1xi = rNULL__
        if(ar__(152:157) .EQ. '') R1eta = rNULL__
        if(ar__(160:164) .EQ. '') B2mag = rNULL__
        if(ar__(166:166) .EQ. '') B2C = iNULL__
        if(ar__(168:168) .EQ. '') B2S = iNULL__
        if(ar__(170:172) .EQ. '') B2f = iNULL__
        if(ar__(174:175) .EQ. '') B2s_g = iNULL__
        if(ar__(177:182) .EQ. '') B2xi = rNULL__
        if(ar__(183:188) .EQ. '') B2eta = rNULL__
        if(ar__(191:195) .EQ. '') R2mag = rNULL__
        if(ar__(197:197) .EQ. '') R2C = iNULL__
        if(ar__(199:199) .EQ. '') R2S = iNULL__
        if(ar__(201:203) .EQ. '') R2f = iNULL__
        if(ar__(205:206) .EQ. '') R2s_g = iNULL__
        if(ar__(208:213) .EQ. '') R2xi = rNULL__
        if(ar__(214:219) .EQ. '') R2eta = rNULL__
        if(ar__(222:226) .EQ. '') Imag = rNULL__
        if(ar__(228:228) .EQ. '') IC = iNULL__
        if(ar__(230:230) .EQ. '') IS = iNULL__
        if(ar__(232:234) .EQ. '') If = iNULL__
        if(ar__(236:237) .EQ. '') Is_g = iNULL__
        if(ar__(239:244) .EQ. '') Ixi = rNULL__
        if(ar__(245:250) .EQ. '') Ieta = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  USNO_B1_0,Tycho_2,RAdeg,DEdeg,e_RAdeg,e_DEdeg,Epoch,pmRA,pmDE,
     +  muPr,e_pmRA,e_pmDE,fit_RA,fit_DE,Ndet,Flags,B1mag,B1C,B1S,B1f,
     +  B1s_g,B1xi,B1eta,R1mag,R1C,R1S,R1f,R1s_g,R1xi,R1eta,B2mag,B2C,
     +  B2S,B2f,B2s_g,B2xi,B2eta,R2mag,R2C,R2S,R2f,R2s_g,R2xi,R2eta,
     +  Imag,IC,IS,If,Is_g,Ixi,Ieta
c    .......End.of.Just test output...........
      end do
      close(1)

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