FORTRAN Generation
(/./ftp/cats/J/ApJ/605/759)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/605/759 into FORTRAN code for loading all data files into arrays.

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/ApJ/605/759   Multifrequency obs. of radio pulse broadening      (Bhat+, 2004)
*================================================================================
*Multifrequency observations of radio pulse broadening and constraints on
*interstellar electron density microstructure.
*    Bhat N.D.R., Cordes J.M., Camilo F., Nice D.J., Lorimer D.R.
*   <Astrophys. J., 605, 759-783 (2004)>
*   =2004ApJ...605..759B
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'position.dat'	! Pulsar positions (from Simbad)

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

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

      character*10  PSR        (nr__) ! Pulsar identification
      integer*4     RAh        (nr__) ! (h) Right ascension (J2000.0)
      integer*4     RAm        (nr__) ! (min) Right ascension (J2000.0)
      real*4        RAs        (nr__) ! (s) ? Right ascension (J2000.0)
      character*1   DE_        (nr__) ! Declination sign (J2000.0)
      integer*4     DEd        (nr__) ! (deg) Declination (J2000.0)
      integer*4     DEm        (nr__) ! (arcmin) Declination (J2000.0)
      integer*4     DEs        (nr__) ! (arcsec) ? Declination (J2000.0)

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

C  Declarations for 'table2.dat'	! New measurements of pulse-broadening times and
                             predictions from the electron density models

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

C  Position composed of: GLON GLAT
      character*10  PSR_1      (nr__1) ! Pulsar identification
      character*1   n_PSR      (nr__1) ! [mi] Type of pulse (1)
      integer*4     Ref        (nr__1) ! Reference to pulsar parameters (2)
      integer*4     RefFreq    (nr__1) ! (MHz) Frequency band of the survey that discovered
*                                   the pulsar
      real*8        Per        (nr__1) ! (ms) ? Pulse period
      real*4        DM         (nr__1) ! (pc/cm3) ? Dispersion measure
      real*4        GLON       (nr__1) ! (deg) ? Galactic longitude
      real*4        GLAT       (nr__1) ! (deg) ? Galactic latitude
      integer*4     Freq       (nr__1) ! (MHz) ? Observation frequency
      character*1   l_PBF1t    (nr__1) ! Limit flag on PBF1t
      real*4        PBF1t      (nr__1) ! (ms) ? PBF_1_ broadening time
      character*1   f_PBF1t    (nr__1) ! [bcde] Flag on PBF1t (3)
      real*4        e_PBF1t    (nr__1) ! (ms) ? Uncertainty in PBF1t
      real*4        PBF1f      (nr__1) ! ? PBF_1_ figure of merit
      character*1   l_PBF2t    (nr__1) ! Limit flag on PBF2t
      real*4        PBF2t      (nr__1) ! (ms) ? PBF_2_ broadening time
      character*1   f_PBF2t    (nr__1) ! [bcde] Flag on PBF2t (3)
      real*4        e_PBF2t    (nr__1) ! (ms) ? Uncertainty in PBF2t
      real*4        PBF2f      (nr__1) ! ? PBF_2_ figure of merit
      character*1   l_tc93     (nr__1) ! Much less than limit flag on tc93
      real*8        tc93       (nr__1) ! (ms) ? Pulse broadening using the TC93 model
      character*1   l_ne2001   (nr__1) ! Much less than limit flag on ne2001
      real*8        ne2001     (nr__1) ! (ms) ? Pulse broadening using the NE2001 model
*Note (1): Flag on PSR as follows:
*      m = Main pulse
*      i = inter pulse
*      See also Fig. 1.
*Note (2): Reference(s) to pulsar parameters as follows:
*      1 = ATNF pulsar catalog, available at
*          http://www.atnf.csiro.au/research/pulsar/psrcat
*      2 = Morris et al. (2002, Cat. <J/MNRAS/335/275>)
*      3 = Hobbs et al. (2004), in preparation
*      4 = Lorimer et al. (2002AJ....123.1750L)
*      5 = Kramer et al. (2003, Cat. <J/MNRAS/342/1299>)
*          Note that pulsars in (2), (3), and (5) (Parkes multibeam survey
*          discoveries), as well as in (4), are also available in (1)
*Note (3): Flags as follows:
*      b = The PBF yields unphysical residuals from the deconvolution for
*          any realistic value of {tau}_d_ (see text).
*      c = Signal-to-noise ratio is too small to allow a meaningful fit to
*          the PBF.
*      d = {tau}_d_ is negligibly small.
*      e = The pulsar is not detected at this frequency.

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

C  Loading file 'position.dat'	! Pulsar positions (from Simbad)

C  Format for file interpretation

    1 format(A10,5X,I2,1X,I2,1X,F4.1,1X,A1,I2,1X,I2,1X,I2)

C  Effective file loading

      open(unit=1,status='old',file=
     +'position.dat')
      write(6,*) '....Loading file: position.dat'
      do i__=1,98
        read(1,'(A35)')ar__
        read(ar__,1)
     +  PSR(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__)
        if(ar__(22:25) .EQ. '') RAs(i__) = rNULL__
        if(ar__(34:35) .EQ. '') DEs(i__) = iNULL__
        RAdeg(i__) = rNULL__
        DEdeg(i__) = rNULL__
c  Derive coordinates RAdeg and DEdeg from input data
c  (RAdeg and DEdeg are set to rNULL__ when unknown)
        if(RAh(i__) .GT. -180) RAdeg(i__)=RAh(i__)*15.
        if(RAm(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAm(i__)/4.
        if(RAs(i__) .GT. -180) RAdeg(i__)=RAdeg(i__)+RAs(i__)/240.
        if(DEd(i__) .GE. 0) DEdeg(i__)=DEd(i__)
        if(DEm(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEm(i__)/60.
        if(DEs(i__) .GE. 0) DEdeg(i__)=DEdeg(i__)+DEs(i__)/3600.
        if(DE_(i__).EQ.'-'.AND.DEdeg(i__).GE.0) DEdeg(i__)=-DEdeg(i__)
c    ..............Just test output...........
        write(6,1)
     +  PSR(i__),RAh(i__),RAm(i__),RAs(i__),DE_(i__),DEd(i__),
     +  DEm(i__),DEs(i__)
        write(6,'(6H Pos: 2F8.4)') RAdeg(i__),DEdeg(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table2.dat'	! New measurements of pulse-broadening times and
*                             predictions from the electron density models

C  Format for file interpretation

    2 format(
     +  A10,1X,A1,1X,I1,1X,I4,1X,F7.2,1X,F5.1,1X,F4.1,1X,F4.1,1X,I4,
     +  1X,A1,F6.2,1X,A1,1X,F4.1,1X,F4.2,1X,A1,F6.2,1X,A1,1X,F5.2,1X,
     +  F4.2,1X,A1,F7.3,1X,A1,F7.3)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table2.dat')
      write(6,*) '....Loading file: table2.dat'
      do i__=1,179
        read(1,'(A107)')ar__1
        read(ar__1,2)
     +  PSR_1(i__),n_PSR(i__),Ref(i__),RefFreq(i__),Per(i__),DM(i__),
     +  GLON(i__),GLAT(i__),Freq(i__),l_PBF1t(i__),PBF1t(i__),
     +  f_PBF1t(i__),e_PBF1t(i__),PBF1f(i__),l_PBF2t(i__),PBF2t(i__),
     +  f_PBF2t(i__),e_PBF2t(i__),PBF2f(i__),l_tc93(i__),tc93(i__),
     +  l_ne2001(i__),ne2001(i__)
        if(ar__1(21:27) .EQ. '') Per(i__) = rNULL__
        if(ar__1(29:33) .EQ. '') DM(i__) = rNULL__
        if(ar__1(35:38) .EQ. '') GLON(i__) = rNULL__
        if(ar__1(40:43) .EQ. '') GLAT(i__) = rNULL__
        if(ar__1(45:48) .EQ. '') Freq(i__) = iNULL__
        if(ar__1(51:56) .EQ. '') PBF1t(i__) = rNULL__
        if(ar__1(60:63) .EQ. '') e_PBF1t(i__) = rNULL__
        if(ar__1(65:68) .EQ. '') PBF1f(i__) = rNULL__
        if(ar__1(71:76) .EQ. '') PBF2t(i__) = rNULL__
        if(ar__1(80:84) .EQ. '') e_PBF2t(i__) = rNULL__
        if(ar__1(86:89) .EQ. '') PBF2f(i__) = rNULL__
        if(ar__1(92:98) .EQ. '') tc93(i__) = rNULL__
        if(ar__1(101:107) .EQ. '') ne2001(i__) = rNULL__
c    ..............Just test output...........
        write(6,2)
     +  PSR_1(i__),n_PSR(i__),Ref(i__),RefFreq(i__),Per(i__),DM(i__),
     +  GLON(i__),GLAT(i__),Freq(i__),l_PBF1t(i__),PBF1t(i__),
     +  f_PBF1t(i__),e_PBF1t(i__),PBF1f(i__),l_PBF2t(i__),PBF2t(i__),
     +  f_PBF2t(i__),e_PBF2t(i__),PBF2f(i__),l_tc93(i__),tc93(i__),
     +  l_ne2001(i__),ne2001(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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