Conversion of standardized ReadMe file for
file /./ftp/cats/II/344 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-May-20
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. II/344 KiDS-ESO-DR2 multi-band source catalog (de Jong+, 2015)
*================================================================================
*The Kilo-Degree Survey second data release multi-band source catalog.
* de Jong J.T.A., Verdoes Kleijn G.A., Boxhoorn D.R., Buddelmeijer H.,
* Capaccioli M., Getman F., Grado A., Helmich E., Huang Z., Irisarri N.,
* Kuijken K., La Barbera F., McFarland J.P., Napolitano N.R., Radovich M.,
* Sikkema G., Valentijn E.A., Begeman K.G., Brescia M., Cavuoti S., Choi A.,
* Cordes O.-M., Covone G., Dall'Ora M., Hildebrandt H., Longo G., Nakajima R.,
* Paolillo M., Puddu E., Rifatto A., Tortora C., van Uitert E., Buddendiek A.,
* Harnois-Deraps J., Erben T., Eriksen M.B., Heymans C., Hoekstra H.,
* Joachimi B., Kitching T.D., Klaes D., Koopmans L.V.E., Koehlinger F.,
* Roy N., Sifon C., Schneider P., Sutherland W.J., Viola M., Vriend W.-J.
* <Astron. Astrophys., 582, A62 (2015)>
* =2015A&A...582A..62D
* =2016yCat.2344....0D
C=============================================================================
C Internal variables
integer*4 i__
c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
C Declarations for 'kids_dr2.sam' ! *KiDS-ESO-DR2 multi-band source catalog
integer*4 nr__
parameter (nr__=1000) ! Number of records
character*543 ar__ ! Full-size record
C J2000 position composed of: RAdeg DEdeg
character*25 KiDS (nr__) ! Source identifier (KIDS JHHMMSS.ss+DDMMSS.ss)
* (SourceID) (1)
real*8 RAdeg (nr__) ! (deg) Right ascension (J2000) (RAJ2000)
real*8 DEdeg (nr__) ! (deg) Declination (J2000) (DEJ2000)
integer*4 mClass (nr__) ! ?=-99 Star/galaxy separation (2)
real*8 A (nr__) ! (pix) Linear semi major axis in pixel units
real*8 B (nr__) ! (pix) Linear semi minor axis in pixel units
real*4 S_G (nr__) ! SExtractor star/galaxy classifier
* (0=galaxy) (mClassStat)
real*4 Ell (nr__) ! Ellipticity
real*8 grad (nr__) ! (pix) ? g-band SExtractor FLUX_RADIUS (FLUX_RADIUS_G)
real*8 irad (nr__) ! (pix) ? i-band SExtractor FLUX_RADIUS (FLUX_RADIUS_I)
real*8 rrad (nr__) ! (pix) ? r-band SExtractor FLUX_RADIUS (FLUX_RADIUS_R)
real*8 urad (nr__) ! (pix) ? u-band SExtractor FLUX_RADIUS (FLUX_RADIUS_U)
real*8 gFWHM (nr__) ! (pix) ? g-band SExtractor FWHM_IMAGE (FWHM_IMAGE_G)
real*8 iFWHM (nr__) ! (pix) ? i-band SExtractor FWHM_IMAGE (FWHM_IMAGE_I)
real*8 rFWHM (nr__) ! (pix) ? r-band SExtractor FWHM_IMAGE (FWHM_IMAGE_R)
real*8 uFWHM (nr__) ! (pix) ? u-band SExtractor FWHM_IMAGE (FWHM_IMAGE_U)
integer*4 gflg (nr__) ! [0/120] g-band SExtractor extraction flag
* (flg_G) (3)
integer*4 iflg (nr__) ! [0/120] i-band SExtractor extraction flag
* (flg_I) (3)
integer*4 rflg (nr__) ! [0/124] r-band SExtractor extraction flag
* (flg_R) (3)
integer*4 uflg (nr__) ! [0/120] u-band SExtractor extraction flag
* (flg_U) (3)
integer*4 gflgISO (nr__) ! [0/255] g-band mask flag (IMAFLAGS_ISO_G) (4)
integer*4 iflgISO (nr__) ! [0/255] i-band mask flag (IMAFLAGS_ISO_I) (4)
integer*4 rflgISO (nr__) ! [0/255] r-band mask flag (IMAFLAGS_ISO_R) (4)
integer*4 uflgISO (nr__) ! [0/254] u-band mask flag (IMAFLAGS_ISO_U) (4)
real*8 Rad (nr__) ! (pix) Kron-radius used for MAG_AUTO (KRON_RADIUS)
real*8 e_gmag (nr__) ! (mag) ? g-band error in MAG_AUTO (MAGERR_AUTO_G) (5)
real*8 e_imag (nr__) ! (mag) ? i-band error in MAG_AUTO (MAGERR_AUTO_I) (5)
real*8 e_rmag (nr__) ! (mag) ? r-band error in MAG_AUTO (MAGERR_AUTO_R) (5)
real*8 e_umag (nr__) ! (mag) ? u-band error in MAG_AUTO (MAGERR_AUTO_U) (5)
real*8 e_gmagISO (nr__) ! (mag) ? g-band error in MAG_ISO (MAGERR_ISO_G) (5)
real*8 e_imagISO (nr__) ! (mag) ? i-band error in MAG_ISO (MAGERR_ISO_I) (5)
real*8 e_rmagISO (nr__) ! (mag) ? r-band error in MAG_ISO (MAGERR_ISO_R) (5)
real*8 e_umagISO (nr__) ! (mag) ? u-band error in MAG_ISO (MAGERR_ISO_U) (5)
real*8 gmag (nr__) ! (mag) [10.4/42.8]? g-band AB magnitude (MAG_AUTO_G)
real*8 imag (nr__) ! (mag) [9.8/40.4]? i-band AB magnitude (MAG_AUTO_I)
real*8 rmag (nr__) ! (mag) [10.5/41.4]? r-band AB magnitude (MAG_AUTO_R)
real*8 umag (nr__) ! (mag) [8.7/40.5]? u-band AB magnitude (MAG_AUTO_U)
real*8 gmagISO (nr__) ! (mag) [11.2/42.7]? g-band AB magnitude (MAG_ISO_G)
real*8 imagISO (nr__) ! (mag) [10.1/42.9]? i-band AB magnitude (MAG_ISO_I)
real*8 rmagISO (nr__) ! (mag) [11.1/30.5]? r-band AB magnitude (MAG_ISO_R)
real*8 umagISO (nr__) ! (mag) [12.1/43.7]? u-band AB magnitude (MAG_ISO_U)
integer*4 gNmp (nr__) ! g-band number of masked pixels (NIMAFLAGS_ISO_G)
integer*4 iNmp (nr__) ! i-band number of masked pixels (NIMAFLAGS_ISO_I)
integer*4 rNmp (nr__) ! r-band number of masked pixels (NIMAFLAGS_ISO_R)
integer*4 uNmp (nr__) ! u-band number of masked pixels (NIMAFLAGS_ISO_U)
integer*4 gisoA (nr__) ! (pix2) g-band isophotal aperture (ISOAREA_IMAGE_G)
integer*4 iisoA (nr__) ! (pix2) i-band isophotal aperture (ISOAREA_IMAGE_I)
integer*4 risoA (nr__) ! (pix2) r-band isophotal aperture (ISOAREA_IMAGE_R)
integer*4 uisoA (nr__) ! (pix2) u-band isophotal aperture (ISOAREA_IMAGE_U)
real*8 PA (nr__) ! (deg) [-90/90] Position angle (POSANG)
integer*4 SeqR (nr__) ! [/600929]?=-99 r-band sequence number (SEQNR)
real*8 gXpos (nr__) ! (pix) X pixel position in g-band image (XPOS_G)
real*8 iXpos (nr__) ! (pix) X pixel position in i-band image (XPOS_I)
real*8 rXpos (nr__) ! (pix) X pixel position in r-band image (XPOS_R)
real*8 uXpos (nr__) ! (pix) X pixel position in u-band image (XPOS_U)
real*8 gYpos (nr__) ! (pix) Y pixel position in g-band image (YPOS_G)
real*8 iYpos (nr__) ! (pix) Y pixel position in i-band image (YPOS_I)
real*8 rYpos (nr__) ! (pix) Y pixel position in r-band image (YPOS_R)
real*8 uYpos (nr__) ! (pix) Y pixel position in u-band image (YPOS_U)
*Note (1): Some names with missing "0", having formats like JHHMMSS.ss+DDMMSS.s
* or JHHMMSS.s+DDMMSS.ss have been corrected by CDS and the agreement
* of the author in order to match the unique format JHHMMSS.ss+DDMMSS.ss
* as in DR3.
*Note (2): The result of the star/galaxy (S/G) classification is available via
* the 2DPHOT (mClass) flag. Flag values are:
* 1 = high-confidence star candidates,
* 2 = objects with FWHM smaller than stars in the stellar locus,
* e.g., some cosmic-rays and/or other unreliable sources),
* 4 = stars according to S/G separation, and
* 0 = otherwise (galaxies);
* flag values are summed, so 2DPHOT=5 signifies a high-confidence
* star candidate that is also above the S/G separation line.
*Note (3): The extraction flag of a source given as a sum of powers of 2
* by SExtractor. If a source has neighbors (flag = 1) and
* is blended with another source (flag = 2) and
* some pixels are saturated (flag = 4), then the final extraction flag
* given to the source is 7 (= 1 + 4 + 2). Generally, a source with the
* extraction flag 0 gives the most reliable photometry.
* For detailed information on this flag, see
* the SExtractor User's Manual.
*Note (4): The flag image is used during source extraction for the single-band
* source list to flag sources whose isophotes overlap with the critical
* areas. The resulting flags are stored in the following two SExtractor
* parameters:
* IMAFLAGS_ISO: sum of all mask flags encountered in the isophote profile;
* NIMAFLAG_ISO: number of flagged pixels entering IMAFLAGS_ISO.
* See section 4.4 in de Jong et al. (2015A&A...582A..62D) for further
* explanations.
*Note (5): Magnitudes uncertainties >=100mag have been left blank by CDS.
C=============================================================================
C Loading file 'kids_dr2.sam' ! *KiDS-ESO-DR2 multi-band source catalog
C Format for file interpretation
1 format(
+ A25,1X,F10.6,1X,F10.6,1X,I3,1X,F9.4,1X,F8.4,1X,F5.3,1X,F5.3,
+ 1X,F12.4,1X,F12.4,1X,F15.4,1X,F13.4,1X,F14.4,1X,F12.4,1X,
+ F11.4,1X,F14.4,1X,I3,1X,I3,1X,I3,1X,I3,1X,I3,1X,I3,1X,I3,1X,
+ I3,1X,F7.4,1X,F8.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,
+ F8.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F8.5,1X,F8.5,
+ 1X,F8.5,1X,F8.5,1X,I7,1X,I7,1X,I7,1X,I7,1X,I7,1X,I7,1X,I7,1X,
+ I6,1X,F7.3,1X,I6,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,1X,F10.4,
+ 1X,F10.4,1X,F10.4,1X,F10.4)
C Effective file loading
open(unit=1,status='old',file=
+'kids_dr2.sam')
write(6,*) '....Loading file: kids_dr2.sam'
do i__=1,1000
read(1,'(A543)')ar__
read(ar__,1)
+ KiDS(i__),RAdeg(i__),DEdeg(i__),mClass(i__),A(i__),B(i__),
+ S_G(i__),Ell(i__),grad(i__),irad(i__),rrad(i__),urad(i__),
+ gFWHM(i__),iFWHM(i__),rFWHM(i__),uFWHM(i__),gflg(i__),
+ iflg(i__),rflg(i__),uflg(i__),gflgISO(i__),iflgISO(i__),
+ rflgISO(i__),uflgISO(i__),Rad(i__),e_gmag(i__),e_imag(i__),
+ e_rmag(i__),e_umag(i__),e_gmagISO(i__),e_imagISO(i__),
+ e_rmagISO(i__),e_umagISO(i__),gmag(i__),imag(i__),rmag(i__),
+ umag(i__),gmagISO(i__),imagISO(i__),rmagISO(i__),umagISO(i__),
+ gNmp(i__),iNmp(i__),rNmp(i__),uNmp(i__),gisoA(i__),iisoA(i__),
+ risoA(i__),uisoA(i__),PA(i__),SeqR(i__),gXpos(i__),iXpos(i__),
+ rXpos(i__),uXpos(i__),gYpos(i__),iYpos(i__),rYpos(i__),
+ uYpos(i__)
if(ar__(84:95) .EQ. '') grad(i__) = rNULL__
if(ar__(97:108) .EQ. '') irad(i__) = rNULL__
if(ar__(110:124) .EQ. '') rrad(i__) = rNULL__
if(ar__(126:138) .EQ. '') urad(i__) = rNULL__
if(ar__(140:153) .EQ. '') gFWHM(i__) = rNULL__
if(ar__(155:166) .EQ. '') iFWHM(i__) = rNULL__
if(ar__(168:178) .EQ. '') rFWHM(i__) = rNULL__
if(ar__(180:193) .EQ. '') uFWHM(i__) = rNULL__
if(ar__(235:242) .EQ. '') e_gmag(i__) = rNULL__
if(ar__(244:251) .EQ. '') e_imag(i__) = rNULL__
if(ar__(253:260) .EQ. '') e_rmag(i__) = rNULL__
if(ar__(262:269) .EQ. '') e_umag(i__) = rNULL__
if(ar__(271:278) .EQ. '') e_gmagISO(i__) = rNULL__
if(ar__(280:287) .EQ. '') e_imagISO(i__) = rNULL__
if(ar__(289:296) .EQ. '') e_rmagISO(i__) = rNULL__
if(ar__(298:305) .EQ. '') e_umagISO(i__) = rNULL__
if(ar__(307:314) .EQ. '') gmag(i__) = rNULL__
if(ar__(316:323) .EQ. '') imag(i__) = rNULL__
if(ar__(325:332) .EQ. '') rmag(i__) = rNULL__
if(ar__(334:341) .EQ. '') umag(i__) = rNULL__
if(ar__(343:350) .EQ. '') gmagISO(i__) = rNULL__
if(ar__(352:359) .EQ. '') imagISO(i__) = rNULL__
if(ar__(361:368) .EQ. '') rmagISO(i__) = rNULL__
if(ar__(370:377) .EQ. '') umagISO(i__) = rNULL__
c ..............Just test output...........
write(6,1)
+ KiDS(i__),RAdeg(i__),DEdeg(i__),mClass(i__),A(i__),B(i__),
+ S_G(i__),Ell(i__),grad(i__),irad(i__),rrad(i__),urad(i__),
+ gFWHM(i__),iFWHM(i__),rFWHM(i__),uFWHM(i__),gflg(i__),
+ iflg(i__),rflg(i__),uflg(i__),gflgISO(i__),iflgISO(i__),
+ rflgISO(i__),uflgISO(i__),Rad(i__),e_gmag(i__),e_imag(i__),
+ e_rmag(i__),e_umag(i__),e_gmagISO(i__),e_imagISO(i__),
+ e_rmagISO(i__),e_umagISO(i__),gmag(i__),imag(i__),rmag(i__),
+ umag(i__),gmagISO(i__),imagISO(i__),rmagISO(i__),umagISO(i__),
+ gNmp(i__),iNmp(i__),rNmp(i__),uNmp(i__),gisoA(i__),iisoA(i__),
+ risoA(i__),uisoA(i__),PA(i__),SeqR(i__),gXpos(i__),iXpos(i__),
+ rXpos(i__),uXpos(i__),gYpos(i__),iYpos(i__),rYpos(i__),
+ uYpos(i__)
c .......End.of.Just test output...........
end do
close(1)
C=============================================================================
stop
end