Program read c c Program to read distance data file c operate on it as necessary and to output c items in a format suitable for plotting c (i.e. in zcat.format) c the output velocity is the peculiar velocity w.r.t. c the input Hubble Constant character*10 name character*1 sign h0=72 ! km/s/Mpc c set up I/O open(unit=1,file='nearby.gal.dist.dat',status='old') open(unit=2,file='nearby.gal.zcat',status='unknown') c skip 2 lines of header info do 3 j=1,2 3 read(1,100) name num=0 ! count galaxies do 10 j=1,1000 read(1,101,end=20,err=20) name,ra,dec,vh,dm,dist 101 format(1x,a10,3f10.0,5x,f9.0,5x,f7.0) if(name.eq.' ') go to 20 num=num+1 C DECODE RA AND DEC INTO OLD FORMAT SIGN = '+' IF(DEC.LT.0.0) SIGN = '-' DD=ABS(DEC) + .000000001 ID=DD ID1=(DD-ID)*60. + 0.001 ID2=(DD-ID-FLOAT(ID1)/60.)*3600. + 0.01 RR=RA IR=RR IR1=(RR-IR)*60. + 0.001 RRA=(RR-IR-FLOAT(IR1)/60.)*3600. + 0.001 c Fill in distances, compute hubble const for this object if(dist.eq.0.0.and.dm.ne.0.0) dist=10.**((dm-25.0)/5.0) hx=vh/dist c Compute observed - expected velocity c assuming an H0 of 72 km/s/Mpc ivdiff=0 if(vh.ne.0.0) ivdiff=vh - dist*72. 10 write(2,100) NAME,IR,IR1,RRA,SIGN,ID,ID1,ID2, -ivdiff,dist,hx,vh 100 FORMAT(3x,A10,4x,2I2.2,F4.1,A1,3I2.2,5x,I7,10x,2f8.2,f10.0) 20 continue type 103, num 103 format(/,' The number of galaxies converted is ', i5) close(1) close(2) stop end