program pulsar C Reads pulsar catalog data from bincat.dat (on lu 23). include 'rdascat.h' character*16 ctype character*12 name,cname character*14 cra,rab,raerr,cdec,decb,decerr,raj,decj character*1 dflag,tauflag character*4 pm logical loop data loop/.true./,pm/'+/- '/ if(iargc().eq.0) go to 1 call getarg(1,cname) C call rdascat(23,npsr) !Read the ASCII catalog call rdbincat(23,npsr) !Read the binary catalog (faster) loop=.false. go to 40 1 write(*,1000) 1000 format('pulsar> '$) C call rdascat(23,npsr) !Read the ASCII catalog call rdbincat(23,npsr) !Read the binary catalog (faster) go to 20 10 write(*,1000) 20 read(*,1020,err=30,end=999) cname 1020 format(a12) if(cname(1:1).eq.'q'.or.cname(1:1).eq.'Q'.or. + cname(1:1).eq.'x'.or.cname(1:1).eq.'X'.or. + cname(1:1).eq.'e'.or.cname(1:1).eq.'E') go to 999 if(cname(1:1).eq.'B'.or.cname(1:1).eq.'J'.or. + (cname(1:1).ge.'0'.and.cname(1:1).le.'2')) go to 40 30 write(*,1030) 1030 format('Enter pulsar name (default B1950): '$) go to 20 40 if(cname(1:1).ne.'B'.and.cname(1:1).ne.'J') cname='B'//cname do 100 i=1,npsr name='B'//bname(i) if(name(2:2).eq.' ') name='J'//jname(i) if(name.eq.cname) go to 110 if('J'//jname(i).eq.cname) go to 110 100 continue print*,cname,' not found.' go to 10 110 ctype=' ' nt=ntype(i) if(iand(nt,256).ne.0) ctype='E'//ctype if(iand(nt,2 ).ne.0) ctype='S'//ctype if(iand(nt,32 ).ne.0) ctype='R'//ctype if(iand(nt,16 ).ne.0) ctype='M'//ctype if(iand(nt,64 ).ne.0) ctype='I'//ctype if(iand(nt,128).ne.0) ctype='H'//ctype if(iand(nt,4 ).ne.0) ctype='G'//ctype if(iand(nt,1 ).ne.0) ctype='C'//ctype if(iand(nt,8 ).ne.0) ctype='B'//ctype if(ctype(1:1).ne.' ') ctype='Type: '//ctype write(*,1100) jname(i),bname(i),ctype,nscode(i) 1100 format(/'PSR: J',a12,' B',a8,10x,a16,2x,'Scode: ',o4) rab=cra(ra1950(i)) raerr=cra(rae(i)) write(*,1102) rab,pm,raerr 1102 format('RAB: ',1x,a14,2x,a4,a14) decb=cdec(dec1950(i)) decerr=cdec(dece(i)) write(*,1104) decb,pm,decerr(2:) 1104 format('DECB: ',a14,3x,a4,a13) raj=cra(ra2000(i)) write(*,1103) raj,pm,raerr 1103 format('RAJ: ',1x,a14,2x,a4,a14) decj=cdec(dec2000(i)) write(*,1105) decj,pm,decerr(2:) 1105 format('DECJ: ',a14,3x,a4,a13) if(pmrae(i).ne.0.d0) then write(*,11071) posepoch(i) 11071 format('Epoch: ',f7.0) write(*,11072) pmra(i),pm,pmrae(i) 11072 format('PMRA: ',f9.3,2x,a4,f9.3) write(*,11073) pmdec(i),pm,pmdece(i) 11073 format('PMDEC:',f9.3,2x,a4,f9.3) endif write(*,1107) ldeg(i),bdeg(i) 1107 format('l,b: ',2f8.3) write(*,1106) p(i),pm,pe(i) 1106 format('P: ',f21.18,2x,a4,f21.18) if(pdot(i).ne.0.d0) then write(*,1108) pdot(i),pm,pdote(i) 1108 format('Pdot:',1p,d15.6,2x,a4,d15.6,0p) write(*,11081) epoch(i) 11081 format('Pepoch:',f7.0) if(f2e(i).ne.0.d0) write(*,11082) f2(i),pm,f2e(i) 11082 format('f2: ',1p,d15.6,2x,a4,d15.6,0p) endif write(*,1110) dm(i),pm,dme(i) 1110 format('DM: ',f10.4,2x,a4,f10.4) if(w50(i).gt.0.d0) write(*,1112) w50(i),w50(i)/p(i) 1112 format('w50: ',f7.2,' ms',f10.2,' mP') if(s400(i).gt.0.d0) write(*,1114) s400(i) 1114 format('s400: ',f7.2) if(s1400(i).gt.0.d0) write(*,1116) s1400(i) 1116 format('s1400: ',f7.2) if(rm(i).ne.0.d0) write(*,1132) rm(i),pm,rme(i) 1132 format('RM: ',f8.2,2x,a4,f7.2) tauflag=' ' if(ntauflag(i).ne.0) tauflag='<' if(tau(i).ne.0.d0) write(*,1134) tauflag,tau(i) 1134 format('log tau_s:',2x,a1,f6.2) if(dmin(i).gt.0.d0.or.dmax(i).gt.0.d0) then dmaxx=99. if(dmax(i).ne.0.d0) dmaxx=dmax(i) write(*,1136) dmin(i),dmaxx 1136 format('dl,du: ',2f8.2) endif dflag=' ' if(ndflag(i).ne.0) dflag='>' z=dist(i)*sin(bdeg(i)/57.2957795131d0) write(*,1138) dflag,dist(i),z,lcode(i),ucode(i) 1138 format('d,z: ',2x,a1,f6.2,f8.2,3x,2a1) dflag=' ' if(limcode(i).ne.0) dflag='>' write(*,1139) dflag,distmod(i),modcode(i) 1139 format('model d: ',2x,a1,f6.2,' (model',i2,')') if(pdot(i).gt.pdote(i)) then write(*,1140) lum(i) 1140 format('L: ',f7.2) write(*,1142) age(i) 1142 format('age: ',f7.2) write(*,1144) edot(i) 1144 format('Edot: ',f7.2) write(*,1146) bsurf(i) 1146 format('B: ',f7.2) endif if(pb(i).gt.0.d0) then write(*,1120) a1(i),pm,a1e(i) 1120 format('x: ',f13.7,2x,a4,f13.7) write(*,1122) e(i),pm,ee(i) 1122 format('e: ',f15.9,2x,a4,f15.9) write(*,1124) t0(i),pm,t0e(i) 1124 format('T0: ',f15.8,2x,a4,f15.8) write(*,1126) 86400*pb(i),pm,86400*pbe(i) 1126 format('Pb (s):',f18.7,2x,a4,f18.7) write(*,11261) pb(i),pm,pbe(i) 11261 format('Pb (d):',f18.12,2x,a4,f18.12) write(*,1128) om(i),pm,ome(i) 1128 format('Om: ',f12.6,2x,a4,f12.7) if(omdote(i).gt.0.d0) write(*,1130) omdot(i),pm,omdote(i) 1130 format('Omd: ',f12.6,2x,a4,f12.6) endif if(pb2(i).gt.0.d0) then write(*,2120) a12(i),pm,a12e(i) 2120 format('x2: ',f13.7,2x,a4,f13.7) write(*,2122) e2(i),pm,e2e(i) 2122 format('e2: ',f15.9,2x,a4,f15.9) write(*,2124) t02(i),pm,t02e(i) 2124 format('T02: ',f15.8,2x,a4,f15.8) write(*,2126) 86400*pb2(i),pm,86400*pb2e(i) 2126 format('Pb2(s):',f18.7,2x,a4,f18.7) write(*,21261) pb2(i),pm,pb2e(i) 21261 format('Pb2(d):',f18.12,2x,a4,f18.12) write(*,2128) om2(i),pm,om2e(i) 2128 format('Om2: ',f12.6,2x,a4,f12.7) if(omdote(i).gt.0.d0) write(*,2130) omdot2(i),pm,omdot2e(i) 2130 format('Omd2: ',f12.6,2x,a4,f12.6) endif if(loop) go to 10 999 end C include 'cra.for' C include 'rdascat.for' C include '\tempo\src\iargc.for'