FORTRAN Generation
(/./ftp/cats/VIII/90)

Conversion of standardized ReadMe file for file /./ftp/cats/VIII/90 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 2026-Sep-10
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. VIII/90              The FIRST Survey Catalog, Version 12Feb16   (Becker+ 2012)
*================================================================================
*The FIRST Survey Catalog, Version 2012 Feb
*     Becker R.H., Helfand D.J., White R.L., Gregg M.D., Laurent-Muehleisen S.A.
*    <Astrophys. J. 475, 479 (1997)>
*   =1997ApJ...475..479W
*   =2012yCat.8090....0B
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'first12.dat'	! The FIRST survey catalog, 12Feb16 Version

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

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

      character*16  FIRST       ! FIRST Source designation (1)
      integer*4     RAh         ! (h) Right Ascension J2000 (hours) (2)
      integer*4     RAm         ! (min) Right Ascension J2000 (minutes) (2)
      real*4        RAs         ! (s) Right Ascension J2000 (seconds) (2)
      character*1   DE_         ! Declination J2000 (sign) (2)
      integer*4     DEd         ! (deg) Declination J2000 (degrees) (2)
      integer*4     DEm         ! (arcmin) Declination J2000 (minutes) (2)
      real*4        DEs         ! (arcsec) Declination J2000 (seconds) (2)
      real*4        p_S         ! [0,1] Probability of being a side lobe (3)
      real*8        Fpeak       ! (mJy) Peak flux density at 1.4GHz (4)
      real*8        Fint        ! (mJy) Integrated flux density at 1.4GHz (4)
      real*4        Rms         ! (mJy) Local noise estimate (5)
      real*4        MajAxis     ! (arcsec) Major axis (FWHM) (6)
      real*4        MinAxis     ! (arcsec) Minor axis (FWHM) (6)
      real*4        PA          ! (deg) [0/180] Position angle (6)
      real*4        fMaj        ! (arcsec) Fitted MajAxis before deconvolution (7)
      real*4        fMin        ! (arcsec) Fitted MinAxis before deconvolution (7)
      real*4        fPA         ! (deg) [0/180] Fitted PA before deconvolution (7)
      character*12  Field       ! Name of the coadded image containing
*                                 the source (8)
      integer*4     N1          ! [0/10]?=-1 Number of SDSS-DR8 counterparts (9)
      real*4        r1          ! (arcsec) [0/8]?=99 Closest SDSS match (9)
      real*4        m1          ! (mag) ?=99 SDSS i magnitude of closest SDSS match (9)
      character*1   c1          ! [sg-] SDSS class: s=star, g=galaxy
      integer*4     N2          ! Number of 2MASS counterparts (10)
      real*4        r2          ! (arcsec) [0/8]?=99 Closest 2MASS match (10)
      real*4        m2          ! (mag) ?=99 2MASS Ks mag. of closest 2MASS match (10)
*Note (1):
*    This column (not  part of  the original  catalog) contains  the source
*    name  built from the rule registered at IAU ('J' followed by truncated
*    J2000-position)
*Note (2):
*    Position (J2000)  of the source.  The accuracy of the position depends
*    on the  brightness and size  of the source  and the noise  in the map.
*    Point sources at  the detection  limit of  the catalog  have positions
*    accurate to  better than  1 arcsec  at 90%   confidence;  2  mJy point
*    sources  in typically noisy regions have positions good to 0.5 arcsec.
*    An empirical expression for the positional accuracy is
*
*        unc(90% confidence) = Size  (1/SNR + 1/20)  arcsec
*
*    where Size is  either the  major or  minor axis  fitted FWHM  (fMaj or
*    fMin) as given in the  catalog  and  SNR  is  the  peak  flux  density
*    signal-to-noise ratio:
*
*        SNR = (Fpeak-0.25) / Rms
*
*    (The  positional uncertainty  is of course  elliptical for  elliptical
*    sources). The best possible positional uncertainty is limited to about
*    0.1  arcsec by our  ability to fit  source positions in  maps with 1.8
*    arcsec   pixels  and  by  various  random  calibration  uncertainties.
*    Systematic errors in the positions are smaller than 0.05 arcsec.
*Note (3):
*    p(S)  indicates the probability that  the  source  is  spurious  (most
*    commonly  because it is a sidelobe of of a nearby bright source).  Low
*    values mean the source is  unlikely  to  be  spurious.
*
*    Sidelobe probabilities for this  version  of  the  catalog  have  been
*    computed  using an improved algorithm based on multiple voting oblique
*    decision tree classifiers. The classifiers were trained using deep VLA
*    fields that give reliable assessments of the reality of FIRST sources.
*    The  algorithm will be  described in detail  in a future  paper on the
*    final  FIRST catalog;  nevertheless,  we  still recommend checking the
*    images.
*Note (4):
*    Fpeak  and Fint are the peak and integrated flux densities measured in
*    mJy. They  are derived by fitting an  elliptical Gaussian model to the
*    source. To correct  for the ``CLEAN  bias'' effect, 0.25  mJy has been
*    added to the peak  flux density  and the  integrated flux  density has
*    been multiplied by (1+0.25/Fpeak)   (see  our  paper  paper  for  more
*    details).
*
*    The  uncertainty in  Fpeak is  given by  the rms  noise at  the source
*    position,  while the uncertainty  in Fint can  be considerably greater
*    depending on  the source size  and morphology. For  bright sources the
*    accuracies of Fpeak and  Fint are  limited to  about 5%  by systematic
*    effects. Note that for sources  that  are  not  well-described  by  an
*    elliptical  Gaussian model,  Fint is  not an  accurate measure  of the
*    integrated flux density.
*Note on (5):
*    Rms  is a local noise estimate at the source position measured in mJy.
*    Rms is computed by combining the measured noise from all grid pointing
*    images contributing to  this  coadded  map  position.  Note  that  the
*    significance of  detection  for  a  source  is  (Fpeak-0.25)/Rms,  not
*    Fpeak/Rms, because of the CLEAN  bias  correction  to  the  peak  flux
*    density. The catalog includes only sources brighter than 5 Rms.
*
*    FITS  images giving the rms noise as a function of position on the sky
*    are available  for the northern  and the southern  areas. These images
*    give the  rms in  mJy/beam tabulated  on a  ~3arcmin  grid in  RA  and
*    Declination. If there is no source in the catalog at a given position,
*    the source  peak flux density  (before CLEAN bias  correction) is less
*    than 5 times the coverage map rms value at that position.
*    The sky area covered is displayed in the images at
*    http://sundog.stsci.edu/first/catalogs/
*Note (6):
*    MajAxis, MinAxis, and PA give  the  major  and  minor  axes  (FWHM  in
*    arcsec) and  position angle (degrees  east of north)  derived from the
*    elliptical Gaussian  model for  the source.  MajAxis and  MinAxis have
*    been  deconvolved  to  remove  blurring  by  the  elliptical  Gaussian
*    point-spread function. (The fitted parameters before deconvolution are
*    given in the fMaj,  fMin,  and fPA columns).  In the north the beam is
*    circular 5.4 arcsec FWHM;  south  of  +04d33'21"   it  is  elliptical,
*    6.4x5.4 arcsec FWHM,  with the major axis running north-south.  In the
*    southern Galactic cap (RA  =  21h  to 3h),   the elliptical  beam size
*    increases further to 6.8x5.4 arcsec south of declination -02{deg}30'25"
*
*    Noise  can cause the fitted values of the major and minor axes (before
*    deconvolution)   to  be  smaller  than  the  beam.  The  corresponding
*    deconvolved size is given as zero in this case.
*
*    The  uncertainties  in  the  deconvolved  sizes  depend  on  both  the
*    brightness and  the sizes. Objects  at the catalog  flux density limit
*    have  uncertainties of about 2 arcsec in their sizes (so faint objects
*    with  Maj<2arcsec  are  consistent  with  point  sources).  An  simple
*    empirical estimate of the uncertainty is
*
*        {sigma}(Size) = 10arcsec  (1/SNR + 1/75)
*
*    where SNR is the signal-to-noise ratio defined above.
*Note (7):
*    fMaj, fMin, and fPA give the major and minor axes (FWHM in arcsec) and
*    position angle  (degrees east  of north)  derived from  the elliptical
*    Gaussian model for  the source.  These are  the fitted  sizes measured
*    directly  from the image; the elliptical point-spread function has not
*    been deconvolved.
*Note (8):
*    The Field Name is the name of the coadded image containing the source.
*    Note that the field  name encodes  the position  of the  field center:
*    field  hhmmm+ddmmm is centered at RA=hh mm.m, Dec=+dd mm.m. The images
*    are available from several  archives  and  through  the  FIRST  Cutout
*    Server.
*
*    All  field names in the current catalog end with a letter E through S,
*    depending  on the date of the last  catalog release in which the image
*    was  modified.  The Q,  R and S fields are new in this catalog,  while
*    sources extracted  from the  E-N fields  are essentially  identical to
*    those in the  previous version of  the catalog.  The  Q fields include
*    contributions from  data taken in  Spring 2009;  the  R fields include
*    remade grid  images that were  found to have  instrument or processing
*    problems; and the S fields include data taken in Spring 2011.
*Note (9):
*    These columns  give  information  on  optical  counterparts  from  the
*    SDSS-DR8  catalog (Cat.  II/306):  number of matches within a fiducial
*    radius of 8'', the separation between the FIRST source and the nearest
*    match,  the i magnitude,  and a morphological classification.  A value
*    N1=-1 indicates that the FIRST  source  falls  outside  the  SDSS  DR8
*    survey area so that  no  SDSS  data  are  available;   a  value  m1=-1
*    indicates no valid magnitude in the SDSS-DR8 catalog.
*Note (10):
*    These columns  give  information  on  optical  counterparts  from  the
*    2MASS  catalog (Cat.  II/246):  number of matches within a fiducial
*    radius of 8'', the separation between the FIRST source and the nearest
*    match, and the Ks magnitude.

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

C  Loading file 'first12.dat'	! The FIRST survey catalog, 12Feb16 Version

C  Format for file interpretation

    1 format(
     +  A16,1X,I2,1X,I2,1X,F6.3,1X,A1,I2,1X,I2,1X,F5.2,1X,F5.3,1X,
     +  F8.2,1X,F9.2,2X,F6.3,1X,F6.2,1X,F6.2,1X,F5.1,1X,F6.2,1X,F6.2,
     +  1X,F5.1,1X,A12,1X,I2,1X,F5.2,1X,F5.2,1X,A1,1X,I2,1X,F5.2,1X,
     +  F5.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'first12.dat')
      write(6,*) '....Loading file: first12.dat'
      do i__=1,946464
        read(1,'(A160)')ar__
        read(ar__,1)
     +  FIRST,RAh,RAm,RAs,DE_,DEd,DEm,DEs,p_S,Fpeak,Fint,Rms,MajAxis,
     +  MinAxis,PA,fMaj,fMin,fPA,Field,N1,r1,m1,c1,N2,r2,m2
        RAdeg = rNULL__
        DEdeg = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh .GT. -180) RAdeg=RAh*15.
        if(RAm .GT. -180) RAdeg=RAdeg+RAm/4.
        if(RAs .GT. -180) RAdeg=RAdeg+RAs/240.
        if(DEd .GE. 0) DEdeg=DEd
        if(DEm .GE. 0) DEdeg=DEdeg+DEm/60.
        if(DEs .GE. 0) DEdeg=DEdeg+DEs/3600.
        if(DE_.EQ.'-'.AND.DEdeg.GE.0) DEdeg=-DEdeg
c    ..............Just test output...........
        write(6,1)
     +  FIRST,RAh,RAm,RAs,DE_,DEd,DEm,DEs,p_S,Fpeak,Fint,Rms,MajAxis,
     +  MinAxis,PA,fMaj,fMin,fPA,Field,N1,r1,m1,c1,N2,r2,m2
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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