program arcsec implicit real*8(a-h,o-z) c Version of June 9, 1992. Call R.E. Wilson (904-392-1182) about any problems. 4 format(1x,i5,2f10.3,f9.3) 8 format(1h ) 9 format(' a(AU) d(input) d(est.) Mv L/Lsun R(km) $ R(sec) a(sec)') 7 format('id im mv temp. d(pc) period mass 1 q f(m) $ incl. log g') 1 format(i1,1x,i1,f7.2,i7,f8.1,f10.4,3f7.3,f5.1,f6.3,3a4) 2 format(2(1x,i1),f7.2,i7,f8.1,f10.4,3f7.3,f5.1,f7.3,3a4) 3 format(1x,f8.4,2f10.4,f7.3,f9.4,d12.4,2f10.5) pi=3.141592653589793d0 dtr=pi/180.d0 tt=2.d0/3.d0 ot=1.d0/3.d0 c1=3.7403d-5 c2=1.43868d0 G=6.668d-8 sunm=1.991d33 c c The star characteristics to be entered are those of the "input" c star, which usually will be the more luminous and better known c component. The input magnitude refers to the "input" star only, c so it will be somewhat dimmer than the directly observed magnitude c of the entire system. c c id=1, use known distance to calculate radius and log g of c "input" star. c id=2, estimate distance from mass, log g, temp., & apparent mag. c c im=1, use input mass 1 and mass ratio to get masses c im=2, use mass function, inclination, and mass ratio to get masses c rsun=6.960d5 tsun=5.800d3 sunabs=4.77 aukm=1.496d8 do 23 i=1,10000 read(5,1) id,im,apmag,kt,d,p,smass1,rm,fofm,xincl,glog,as1,as2,as3 c 1/2, 1/2, app. mag, temp, dist, period, mass1, mass ratio, mass function, c inclination,log(g), if(id.eq.9) stop smass2=rm*smass1 if(im.eq.2) smass2=fofm*((1.d0+rm)/rm)**2/dsin(dtr*xincl)**3 if(im.eq.2) smass1=smass2/rm t=dfloat(kt) sm=sunm*smass1 xlam=0.55d-4 esufac=dexp(c2/(xlam*tsun))-1.d0 esfac=dexp(c2/(xlam*t))-1.d0 r=1.d-5*dsqrt(G*sm/10.d0**glog) ratlum=(r/rsun)**2*esufac/esfac absmag=sunabs-2.5d0*dlog10(ratlum) dist=10.d0**(.2d0*(apmag-absmag)+1.d0) aau=(p/365.2422)**tt*(smass1+smass2)**ot asec=aau/d if(id.eq.2) asec=aau/dist if(id.ne.1) goto 16 absmag=apmag+5.d0-5.d0*dlog10(d) ratlum=10.d0**(.4d0*(sunabs-absmag)) r=rsun*dsqrt(ratlum*esfac/esufac) glog=dlog10(G*1.d-10*sm/r**2) 16 continue write(6,8) write(6,8) write(6,7) write(6,2)id,im,apmag,kt,d,p,smass1,rm,fofm,xincl,glog,as1,as2,as3 write(6,8) rsec=r/(aukm*d) if(id.eq.2) rsec=r/(aukm*dist) write(6,9) write(6,3) aau,d,dist,absmag,ratlum,r,rsec,asec 23 continue stop end