FORTRAN Generation
(/./ftp/cats/IX/24)

Conversion of standardized ReadMe file for file /./ftp/cats/IX/24 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 2024-Apr-17
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. IX/24        The Einstein Observatory HRI Source List       (Giacconi+, 1979)
*================================================================================
*The Einstein Observatory HRI Source List
*     Giacconi et al.
*    <The Einstein Observatory (HEAO-2) (1979)>
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'hrifield.dat'	! Field Parameters for the HRI Source List

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

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

      integer*4     RAh         ! (h) Right Ascension (B1950) (hour)
      integer*4     RAm         ! (min) Right Ascension (B1950) (min)
      integer*4     RAs         ! (s) Right Ascension (B1950) (sec)
      character*1   DE_         ! Declination sign (B1950)
      integer*4     DEd         ! (deg) Declination (B1950) (deg)
      integer*4     DEm         ! (arcmin) Declination (B1950) (arcmin)
      integer*4     DEs         ! (arcsec) Declination (B1950) (arcsec)
      integer*4     Seqno       ! Sequence number of observation (G1)
      real*4        GLON        ! (deg) Galactic longitude of field center (1)
      real*4        GLAT        ! (deg) Galactic latitude of field center (1)
      real*4        nH          ! (cm-2) Column density (2)
      real*8        rollAng     ! (rad) Angle which measures the roll of spacecraft (3)
      real*8        ExpTime     ! (s) Effective exposure time (4)
      real*8        Ypos        ! (pix) Average y offset in pixels (5)
      real*8        Zpos        ! (pix) Average z offset in pixels (5)
      real*8        Rot         ! (rad) Average rotation offset (5)
      character*5   Instr       ! Focal plane detector (6)
      integer*4     Obs         ! Observer number (7)
      integer*4     Strt_D      ! (d) Date (Day) the observation started (8)
      integer*4     Strt_Y      ! (yr) Date (Year) the observation started (8)
      integer*4     Stop_D      ! (d) Date (Day) the observation ended (8)
      integer*4     Stop_Y      ! (yr) Date (Year) the observation ended (8)
      real*8        Strt_s      ! (s) Start time of observation (8)
      real*8        Stop_s      ! (s) End time of observation (8)
      real*4        JD_2442500  ! (d) Offseted Julian date of observation (9)
      integer*4     datamax     ! (ph/pix) Maximum number of detected photons/pixel (10)
      character*3   FlgFld      ! Field Flag (11)
      character*12  FITSname    ! FITS file name (12)
      character*60  ObsTitle    ! The title of the observation
*Note (1):   The pointing position approximates the  center of the field of
*    view for the observation.
*Note (2): The 'nH'  column gives the column density of neutral hydrogen in
*    atoms/cm^2^   integrated along the line of sight through our galaxy in
*    the  direction  of  the  target  of  the  observation.   Specified  in
*    exponential  notation,  the NH values are obtained from sky surveys of
*    neutral hydrogen using 21cm radio observations. For declinations north
*    of -40 {deg}, they are from the Bell Lab survey (Stark, Heiles, Bally,
*    and Linke, see Cat.  <VIII/28>).  For declinations south of -40 {deg},
*    the  column densities are from Heiles and Cleary (1979AuJPA..47....1H)
*    and Cleary, Heiles, and Haslam (1979A&AS...36...95C), see Cat. VIII/8.
*Note (3): The roll angle is the angle, in radians, which measures the roll
*    of the spacecraft about the axis pointing towards the field center. It
*    provides the  angular orientation  of the  focal plane  detectors with
*    respect to the celestial coordinate grid. A positive value of the roll
*    angle  indicates a  clockwise rotation  of the  (detector's projected)
*    field when viewing the celestial sphere.
*Note (4):  The 'livetime',   in seconds,   is a  measure of  the effective
*    exposure time for the field center.  It is the total number of seconds
*    during  which the  detectors were  able to  gather data.   It excludes
*    intervals lost because  of  Earth  occultation,   because  of  passage
*    through the South Atlantic Anomaly,  or because of unacceptable aspect
*    solution.   The livetime has been corrected for detector dead time,  a
*    fractional correction for the time during which the detector is unable
*    to record events because it is "processing" a prior event.
*Note (5):  These columns give the average offset (in pixels,  for y and z
*    coordinates) and the average rotation angle offset (in radians) of the
*    aspect solution for  the  observation.   The  average  offset  is  the
*    average, over the exposure, of the offset between the initial pointing
*    direction and all subsequent data. For the coordinates, it is given in
*    pixels,   each pixel being 0.5"/pixel.  For the rotation angle,  it is
*    given in radians.
*Note (6):  The Instr column lists which instrument was in the focal plane
*    at the time of  the observation.   The instrument  will either  be the
*    HRI-2 or HRI-3. The HRI-2 instrument was used only before 12/15/78.
*    See "The HRI Instruments" section above for more details.
*Note (7): The observer column gives a code which identifies the observer of
*    the observation. The following are defined:
*
*          0=CFA 1=CAL 2=MIT 3=GSFC 4+=Guest
*
*    The  list  of  the  observer  names  is  in  the  file  "obsnames.dat"
*    (identical to the similar file in Cat. <IX/27>).
*Note (8): These columns give the start and stop time, day, and year of the
*    observation.   The start and stop days are given as integers between 1
*    and 365. The start and stop times are given in seconds from 00:00UT.
*Note (9):  This column gives  the  number  of  days from noon  on March 28,
*    1975 (2442500 JD).
*Note (10):   The datamax column is the  maximum number of detected photons
*    per pixel found in the FITS file created for the cdrom version of this
*    database.  Since the files were created at zoom 4,  this is the number
*    of photons in a 2" pixel, not in a 0.5" instrument pixel.
*Note (11): The field flag is given in this column.  The format will be one
*    or more strings, usually of 1 character,  which indicate where to find
*    ancillary information.
*
*    The following flags are defined:
*
*    N - The automated source detection analysis was not run for this field.
*
*    W - The detection threshold was set to too low a value (typically by
*        1 to 2 counts) for this field.  As this results in the detection
*        of spurious sources, appearance of this flag almost always implies
*        that some HRI Rev 1 detections in this field have been deleted from
*        the HRI Source List.
*
*    X - There is at least one extended source in the field.
*
*    Y - This HRI field contains a bright source (count rate typically > 1
*        ct/sec), giving rise to detection of spurious sources in the wings
*        of the bright source.  These sources do not appear in the HRI Source
*        List.
*
*    Z - There are regions of source confusion (many real point sources so
*        close together that they could not be resolved by the source
*        detection algorithm used in the Rev 1 processing) in this field; the
*        nucleus of M31 is an example of such a field.
*
*    Q - A splotch due to artifacts in HRI-2 (used only from launch until
*        mid-December 1978) is visible in the image.
*
*    These flags are stacked,  so to search for a source which is extended,
*    the 'X' may be preceded/followed by other flag characters.
*Note (12): The filename column gives the FITS file name, used to reference
*    the   observation  when  accessing  the  Einstein  cdroms  distributed
*    throughout the astronomical community (see
*    http://nssdc.gsfc.nasa.gov/cd-rom/set_bd/sssmcp.html)

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

C  Declarations for 'hrisrc.dat'	! Source Parameters for the HRI Source List

      integer*4 nr__1
      parameter (nr__1=600)	! Number of records
      character*69 ar__1  	! Full-size record

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

      integer*4     RAh_1       ! (h) Right Ascension (B1950) (hour)
      integer*4     RAm_1       ! (min) Right Ascension (B1950) (min)
      integer*4     RAs_1       ! (s) Right Ascension (B1950) (sec)
      character*1   DE__1       ! Declination sign (B1950)
      integer*4     DEd_1       ! (deg) Declination (B1950) (deg)
      integer*4     DEm_1       ! (arcmin) Declination (B1950) (arcmin)
      integer*4     DEs_1       ! (arcsec) Declination (B1950) (arcsec)
      integer*4     Seqno_1     ! Sequence number for the observation (G1)
      integer*4     FOSno       ! Field Ordered Source Number (1)
      real*4        errPos      ! (rad) Positional uncertainty (90% confidence) (2)
      real*4        cCRate      ! (ct/s) Corrected Count rate of source (3)
      real*4        e_cCRate    ! (ct/s) Corrected Count rate error (3)
      real*8        SNR         ! Signal to noise ratio (4)
      character*2   srcflag     ! Source flags (5)
*Note (1):  The  source  number  may  differ  from  that  of  the  original
*    "standard"  processing  because some previously  detected sources were
*    not  included in this list while other,  doubtless real sources,  were
*    not found by the automated system. Sources will not be present in this
*    source list for any of the following reasons:
*
*    1) Source was not detected in the 12"x12" detect cell.  All sources
*       found only in 24"x24" and larger detect cells were rejected.  In
*       theory, this could result in the rejection of some real sources at
*       large off-axis angles or of non-zero extent.  In practice, most
*       detections in the larger cells were rediscoveries of 12"x12"
*       sources.
*
*    2) Source detected in the wings of another strong source.  Because
*       the assumption of a constant background over the field is grossly
*       in error when a strong source is present, spurious detections in
*       such cases were common. Detections in 111 HRI fields were excluded
*       for this reason.
*
*    3) Source is at threshold. The detection thresholds for sources were
*       designed to give information on any possible source in the field.
*       Thus the threshold was set to give an average of 1 false source
*       per field.  For the present data base, we are instead concerned
*       to list only sources whose existence is established at a high
*       confidence level.  This is achieved by raising slightly the
*       threshold below which no source detection will be accepted (by 1
*       to 2 counts for typical exposures).
*
*    4) Field dominated by a strong, extended source.  Small irregularities
*       in surface brightness led to the detection of many separate
*       "sources" which are clearly part of the one large source.
*Note (2): The positional error listed gives the positional uncertainty
*    (in radians) for the 90% confidence level. This includes a statistical
*    contribution added in quadrature to a systematic term.
*Note (3): The corrected count rate and error are given in these two
*    columns. The count rate for each source (cCRate) is obtained by
*    summing all counts within a circle of radius 18" centered on the
*    final source position, and then applying the appropriate correction
*    factors for exposure time, vignetting, deadtime, mirror scattering,
*    and quantum efficiency. The error (e_cCRate) was estimated as follows:
*    As a preliminary and conservative (i.e., high) estimate for the
*    uncertainty in this rate, we have used
*
*                         sqrt(BCTS)
*                Error = ----------- x Count Rate
*                           BCTS
*
*    where BCTS is the sum of all counts inside the Detection box of side =
*    12".
*Note (4): The 'SNR' column gives the signal-to-noise ratio, the count rate
*    divided by the error.  This is a conservative estimate since for small
*    number of counts the Poisson errors are significantly asymmetric.
*Note (5): The 'srcflag'  column lists the source flag.  The source will be
*    marked with a source flag if one of the following conditions exists:
*
*      C - The source lies in a confused region; its position and count rate
*          may be seriously in error.
*
*      X - This source shows obvious extent.
*
*      U - The count rate for this source has been underestimated, either
*          because it is extended, confused, or at the edge of the field
*          of view.
*
*    These flags are stacked,  so to search for a source which is extended,
*    the 'X' may be preceded/followed by other flag characters.

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

C  Declarations for 'obsnames.dat'	! Einstein Observers

      integer*4 nr__2
      parameter (nr__2=435)	! Number of records
      character*61 ar__2  	! Full-size record

      integer*4     Obs_1       ! The observer's identifying number
      character*56  ObsName     ! The observer's name and institution

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

C  Loading file 'hrifield.dat'	! Field Parameters for the HRI Source List

C  Format for file interpretation

    1 format(
     +  1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2,1X,I5,1X,F6.2,1X,F6.2,
     +  1X,E7.2,1X,F8.5,1X,F9.2,1X,F7.2,1X,F7.2,1X,F8.5,1X,A5,1X,I3,
     +  1X,I3,1X,I4,1X,I3,1X,I4,1X,F8.2,1X,F8.2,1X,E10.5,1X,I5,1X,A3,
     +  1X,A12,1X,A60)

C  Effective file loading

      open(unit=1,status='old',file=
     +'hrifield.dat')
      write(6,*) '....Loading file: hrifield.dat'
      do i__=1,870
        read(1,'(A232)')ar__
        read(ar__,1)
     +  RAh,RAm,RAs,DE_,DEd,DEm,DEs,Seqno,GLON,GLAT,nH,rollAng,
     +  ExpTime,Ypos,Zpos,Rot,Instr,Obs,Strt_D,Strt_Y,Stop_D,Stop_Y,
     +  Strt_s,Stop_s,JD_2442500,datamax,FlgFld,FITSname,ObsTitle
        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)
     +  RAh,RAm,RAs,DE_,DEd,DEm,DEs,Seqno,GLON,GLAT,nH,rollAng,
     +  ExpTime,Ypos,Zpos,Rot,Instr,Obs,Strt_D,Strt_Y,Stop_D,Stop_Y,
     +  Strt_s,Stop_s,JD_2442500,datamax,FlgFld,FITSname,ObsTitle
        write(6,'(6H Pos: 2F8.4)') RAdeg,DEdeg
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'hrisrc.dat'	! Source Parameters for the HRI Source List

C  Format for file interpretation

    2 format(
     +  1X,I2,1X,I2,1X,I2,1X,A1,I2,1X,I2,1X,I2,1X,I5,1X,I2,1X,E7.2,1X,
     +  E9.4,1X,E9.4,1X,F9.3,1X,A2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'hrisrc.dat')
      write(6,*) '....Loading file: hrisrc.dat'
      do i__=1,600
        read(1,'(A69)')ar__1
        read(ar__1,2)
     +  RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,Seqno_1,FOSno,
     +  errPos,cCRate,e_cCRate,SNR,srcflag
        RAdeg_1 = rNULL__
        DEdeg_1 = rNULL__
c  Derive coordinates RAdeg_1 and DEdeg_1 from input data
c  (RAdeg_1 and DEdeg_1 are set to rNULL__ when unknown)
        if(RAh_1 .GT. -180) RAdeg_1=RAh_1*15.
        if(RAm_1 .GT. -180) RAdeg_1=RAdeg_1+RAm_1/4.
        if(RAs_1 .GT. -180) RAdeg_1=RAdeg_1+RAs_1/240.
        if(DEd_1 .GE. 0) DEdeg_1=DEd_1
        if(DEm_1 .GE. 0) DEdeg_1=DEdeg_1+DEm_1/60.
        if(DEs_1 .GE. 0) DEdeg_1=DEdeg_1+DEs_1/3600.
        if(DE__1.EQ.'-'.AND.DEdeg_1.GE.0) DEdeg_1=-DEdeg_1
c    ..............Just test output...........
        write(6,2)
     +  RAh_1,RAm_1,RAs_1,DE__1,DEd_1,DEm_1,DEs_1,Seqno_1,FOSno,
     +  errPos,cCRate,e_cCRate,SNR,srcflag
        write(6,'(6H Pos: 2F8.4)') RAdeg_1,DEdeg_1
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'obsnames.dat'	! Einstein Observers

C  Format for file interpretation

    3 format(I3,1X,A56)

C  Effective file loading

      open(unit=1,status='old',file=
     +'obsnames.dat')
      write(6,*) '....Loading file: obsnames.dat'
      do i__=1,435
        read(1,'(A61)')ar__2
        read(ar__2,3)Obs_1,ObsName
c    ..............Just test output...........
        write(6,3)Obs_1,ObsName
c    .......End.of.Just test output...........
      end do
      close(1)

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