FORTRAN Generation
(/./ftp/cats/J/ApJS/127/79)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJS/127/79 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-Mar-29
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/ApJS/127/79     BATSE occultation catalog of Gamma-Ray sources   (Ling+, 2000)
*================================================================================
*A BATSE Earth occultation catalog of 0.03-1.8 MeV Gamma-Ray source spectra and
*light curves for phases 1-3 (1999-1994)
*    Ling J.C., Wheaton W. A., Wallyn P., Skelton R.T., Mahoney W.A.,
*    Radocinski R.G., Callas J.L., Ling N.F., Tumer E., Shubert R.
*   <Astrophys. J. Suppl. Ser. 127, 79 (2000)>
*   =2000ApJS..127...79L
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! Time averaged fluxes of 14 channel spectra of
                                  34 Gamma-Ray sources

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

      character*22  Name        ! Object name
      integer*4     Channel     ! BATSE Channel number
      integer*4     Emin        ! (keV) Lower Energy range in Channel
      integer*4     Emax        ! (keV) Upper Energy range in Channel
      integer*4     P1Beg       ! (d) Beginning Julian date of Period 1
      integer*4     P1End       ! (d) Ending Julian date of Period 1
      character*7   P1Panel     ! Panels in Figure 8 where data is shown
      real*4        P1Flux      ! (ct/cm2/s/keV) Period 1 Flux in Channel
      real*4        e_P1Flux    ! (ct/cm2/s/keV) Uncertainty in P1Flux
      integer*4     P2Beg       ! (d) ? Beginning Julian date of Period 2
      integer*4     P2End       ! (d) ? Ending Julian date of Period 2
      character*7   P2Panel     ! Panel in Figure 8 where data is shown
      real*4        P2Flux      ! (ct/cm2/s/keV) ? Period 2 Flux in Channel
      real*4        e_P2Flux    ! (ct/cm2/s/keV) ? Uncertainty in P2Flux
      integer*4     P3Beg       ! (d) ? Beginning Julian date of Period 3
      integer*4     P3End       ! (d) ? Ending Julian date of Period 3
      character*2   P3Panel     ! Panel in Figure 8 where data is shown
      real*4        P3Flux      ! (ct/cm2/s/keV) ? Period 3 Flux in Channel
      real*4        e_P3Flux    ! (ct/cm2/s/keV) ? Uncertainty in P3Flux

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

C  Loading file 'table3.dat'	! Time averaged fluxes of 14 channel spectra of
*                                  34 Gamma-Ray sources

C  Format for file interpretation

    1 format(
     +  A22,1X,I2,2X,I4,1X,I4,1X,I7,1X,I7,1X,A7,1X,E10.3,1X,E9.2,1X,
     +  I7,1X,I7,1X,A7,1X,E10.3,1X,E9.2,1X,I7,1X,I7,1X,A2,1X,E10.3,1X,
     +  E9.2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,686
        read(1,'(A166)')ar__
        read(ar__,1)
     +  Name,Channel,Emin,Emax,P1Beg,P1End,P1Panel,P1Flux,e_P1Flux,
     +  P2Beg,P2End,P2Panel,P2Flux,e_P2Flux,P3Beg,P3End,P3Panel,
     +  P3Flux,e_P3Flux
        if(ar__(83:89) .EQ. '') P2Beg = iNULL__
        if(ar__(91:97) .EQ. '') P2End = iNULL__
        if(ar__(107:116) .EQ. '') P2Flux = rNULL__
        if(ar__(118:126) .EQ. '') e_P2Flux = rNULL__
        if(ar__(128:134) .EQ. '') P3Beg = iNULL__
        if(ar__(136:142) .EQ. '') P3End = iNULL__
        if(ar__(147:156) .EQ. '') P3Flux = rNULL__
        if(ar__(158:166) .EQ. '') e_P3Flux = rNULL__
c    ..............Just test output...........
        write(6,1)
     +  Name,Channel,Emin,Emax,P1Beg,P1End,P1Panel,P1Flux,e_P1Flux,
     +  P2Beg,P2End,P2Panel,P2Flux,e_P2Flux,P3Beg,P3End,P3Panel,
     +  P3Flux,e_P3Flux
c    .......End.of.Just test output...........
      end do
      close(1)

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