FORTRAN Generation
(/./ftp/cats/J/ApJ/945/94)

Conversion of standardized ReadMe file for file /./ftp/cats/J/ApJ/945/94 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 2026-Oct-15
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/945/94     HectoMAP: the complete redshift survey (DR2)     (Sohn+, 2023)
*================================================================================
*HectoMAP: the complete redshift survey (Data Release 2).
*    Sohn J., Geller M.J., Hwang Ho S., Fabricant D.G., Utsumi Y., Damjanov I.
*   <Astrophys. J., 945, 94 (2023)>
*   =2023ApJ...945...94S
C=============================================================================

C  Internal variables

      integer*4 i__

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

C  Declarations for 'table3.dat'	! The HectoMAP redshift survey

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

C  J2000 position composed of: RAdeg DEdeg
      integer*8     ObjID      (nr__) ! SDSS DR16 Object ID
      real*8        RAdeg      (nr__) ! (deg) [200/250] Right Ascension (J2000)
      real*8        DEdeg      (nr__) ! (deg) [42.5/44] Declination (J2000)
      real*8        zspec      (nr__) ! [-0.0004/7.02] Spectroscopic redshift
      real*8        e_zspec    (nr__) ! [3e-06/42] Redshift uncertainty
      real*4        rPmag0     (nr__) ! (mag) [12.29/23] SDSS Petrosian r-band magnitude
      real*4        e_rPmag0   (nr__) ! (mag) [0/58] rPmag0 uncertainty
      real*4        rMAG       (nr__) ! (mag) [-31.7/-6.6] K-corrected r-band absolute cModel
*                                  magnitude (1)
      real*4        rmag0      (nr__) ! (mag) [12.24/23.24]?=-99 SDSS cModel r-band magnitude
      real*4        e_rmag0    (nr__) ! (mag) [0/1.38]?=-99 rmag0 uncertainty
      real*4        g_r0       (nr__) ! (mag) [-3.7/11.8] SDSS g-r cModel color index
      real*4        rmagHSC0   (nr__) ! (mag) [0/23.85] HSC/SSP DR3 r-band cModel magnitude
      real*4        e_rmagHSC0 (nr__) ! (mag) [0.01/0.5] rmagHSC0 uncertainty
      real*4        g_rHSC0    (nr__) ! (mag) [-2.4/7.8]?=-99 HSC/SSP DR3 g-r cModel color
      real*4        Dn4000     (nr__) ! [0.02/9.96]?=-99 Spectral indicator D_n_4000;
*                                  see Section 3.1
      real*4        e_Dn4000   (nr__) ! [0/9.9]?=-99 Dn4000 uncertainty
      real*4        logMs      (nr__) ! ([Msun]) [7/12.3]?=-99 Stellar mass in log scale;
*                                  see Section 3.2
      real*4        E_logMs    (nr__) ! ([Msun]) [0/1.1]?=-99 logMs upper uncertainty
      real*4        e_logMs_1  (nr__) ! ([Msun]) [0/0.9]?=-99 logMs lower uncertainty
      character*4   r_zspec    (nr__) ! Redshift Source (2)
*Note (1): K-correction at z=0.35; see Section 3.3.
*Note (2): Source(s) of the spectroscopy as follows:
*    BOSS = SDSS/BOSS (Section 2.2.1; 2802 occurrences);
*    MMT  = MMT/Hectospec observations (Section 2.2.2; 88296 occurrences);
*    NED  = NASA Extragalactic Database (375 occurrences);
*    SDSS = SDSS Main Galaxy Sample (Section 2.2.1; 3932 occurrences).

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

C  Declarations for 'table4.dat'	! Radial velocities for stars in HectoMAP

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

C  J2000 position composed of: RAdeg DEdeg
      integer*8     ObjID_1    (nr__1) ! SDSS DR16 Object ID
      real*8        RAdeg_1    (nr__1) ! (deg) [200/250] Right Ascension (J2000)
      real*8        DEdeg_1    (nr__1) ! (deg) [42.5/44] Declination (J2000)
      real*8        cz         (nr__1) ! (km/s) [-1240/1367.5] Radial velocity (cz) of stars
      real*8        e_cz       (nr__1) ! (km/s) [0/95365]?=-9.99 cz uncertainty
      real*4        rmag0_1    (nr__1) ! (mag) [10.48/32] Petrosian r-band magnitude
      real*4        e_rmag0_1  (nr__1) ! (mag) [0/69.5] rmag0 uncertainty
      character*8   Flag       (nr__1) ! Classified as "Point" or "Extended" sources
*                                by SDSS

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

C  Loading file 'table3.dat'	! The HectoMAP redshift survey

C  Format for file interpretation

    1 format(
     +  I19,1X,F10.6,1X,F9.6,1X,F9.6,1X,F9.6,1X,F5.2,1X,F5.2,1X,F6.2,
     +  1X,F6.2,1X,F6.2,1X,F5.2,1X,F5.2,1X,F4.2,1X,F6.2,1X,F6.2,1X,
     +  F6.2,1X,F6.2,1X,F6.2,1X,F6.2,1X,A4)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table3.dat')
      write(6,*) '....Loading file: table3.dat'
      do i__=1,95405
        read(1,'(A157)')ar__
        read(ar__,1)
     +  ObjID(i__),RAdeg(i__),DEdeg(i__),zspec(i__),e_zspec(i__),
     +  rPmag0(i__),e_rPmag0(i__),rMAG(i__),rmag0(i__),e_rmag0(i__),
     +  g_r0(i__),rmagHSC0(i__),e_rmagHSC0(i__),g_rHSC0(i__),
     +  Dn4000(i__),e_Dn4000(i__),logMs(i__),E_logMs(i__),
     +  e_logMs_1(i__),r_zspec(i__)
c    ..............Just test output...........
        write(6,1)
     +  ObjID(i__),RAdeg(i__),DEdeg(i__),zspec(i__),e_zspec(i__),
     +  rPmag0(i__),e_rPmag0(i__),rMAG(i__),rmag0(i__),e_rmag0(i__),
     +  g_r0(i__),rmagHSC0(i__),e_rmagHSC0(i__),g_rHSC0(i__),
     +  Dn4000(i__),e_Dn4000(i__),logMs(i__),E_logMs(i__),
     +  e_logMs_1(i__),r_zspec(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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

C  Loading file 'table4.dat'	! Radial velocities for stars in HectoMAP

C  Format for file interpretation

    2 format(
     +  I19,1X,F10.6,1X,F9.6,1X,F8.2,1X,F8.2,1X,F5.2,1X,F5.2,1X,A8)

C  Effective file loading

      open(unit=1,status='old',file=
     +'table4.dat')
      write(6,*) '....Loading file: table4.dat'
      do i__=1,6544
        read(1,'(A79)')ar__1
        read(ar__1,2)
     +  ObjID_1(i__),RAdeg_1(i__),DEdeg_1(i__),cz(i__),e_cz(i__),
     +  rmag0_1(i__),e_rmag0_1(i__),Flag(i__)
c    ..............Just test output...........
        write(6,2)
     +  ObjID_1(i__),RAdeg_1(i__),DEdeg_1(i__),cz(i__),e_cz(i__),
     +  rmag0_1(i__),e_rmag0_1(i__),Flag(i__)
c    .......End.of.Just test output...........
      end do
      close(1)

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