PRO plotorb, dum ; plotorb plots the orbital ".in" file ; ULTRIX IDL version, written by Edmund G. Dombrowski, 12/1989, ; modified by W. Hartkopf 01/1990, 07/1990. ; Based on VMS fortran programs written by W. Hartkopf and adapted to IDL by D. Gies. ; menu version by WIH 08/1999, 09/1999, 03/2000, 06/2000 ; 050824: added black+white option for journal figures, etc. ; 110708: added new method codes and plot symbol for CCD ; 110708: plotorb_cat and plotorb_cat_subs made identical to plotorb and plotorb_subs plotorb_subs ; compile subroutines !p.background=255 common orbpar,pm,p,a,xi,xnode,t0,ecc,omega,c_black,c_red,c_green,c_dkblue,c_rayin,c_rayout,c_fuchsia,c_white set_plot,'ps' device, /encapsulated device, /inches, xoffset=0.75, yoffset=2.0 ; set offsets for bottom left corner device, /inches, xsize=7.0, ysize=7.0 ; set x and y size for plot on 8 1/2 x 11 !p.font=0 ; activate font selector to hardware option set_plot,'x' device,decomposed=1 window,xsize=600,ysize=600,title='Astrometric Orbit' ; define initial conditions pubfile1=' ' & pubfile2=' ' & pubfile3=' ' period=' ' & semi=' ' & lnode='YES' ominusc='YES' & infile=' ' & rvplot='NO' zoom=' 1' & qfill='NO' & htype='WDS ' multi='YES' & tcode=' ' & izoom=1 zfactor=1. & orb=' ' & norb=0 oldpos=' ' & psout=' ' & rx=[0.] ry=[0.] & xl=[0.] & yl=[0.] iexten=0 & psfile='NO' & pngfile='YES' pngout=' ' & orbflag='YES' & batch='YES' wedge='NO ' & colorflag='YES' loadct,12 ; load color table tvlct,r,g,b,/get ; define colors for ct=12 c_black=0 & c_red=200 & c_green=30 c_dkblue=108 & c_wedge1=230 & c_wedge2=126 c_fuchsia=135 & c_white=255 c_rayin=215 & c_rayout=230 exten=strarr(52) exten=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p', $ 'q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F', $ 'G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V', $ 'W','X','Y','Z'] MAIN: set_plot,'x' imain = wmenu([ ' PLOTORB MENU ', ' File = '+infile, $ ' Orbital elements? '+orbflag, ' P,a = '+period+' , '+semi,$ ' Pub1 = '+pubfile1, ' Pub2 = '+pubfile2, $ ' Pub3 = '+pubfile3, ' Plot Nodes? '+lnode, $ ' Plot O-C? '+ominusc, ' Zoom factor = '+zoom, $ ' RVplot? '+rvplot, ' Rayleigh limits? '+qfill, $ ' Wedge? '+wedge, ' Header type = '+htype, $ ' Multiple plots = '+multi, ' Write EPS file? '+psfile, $ ' Write PNG file? '+pngfile, ' Color plots? '+colorflag, $ ' - - - - - - - - - - - ', ' REPLOT THIS ORBIT ', $ ' PLOT NEXT ORBIT ', ' Batch mode = '+batch, $ ' EXIT '], title=0,init=18) ;________________________________________________________________________________________ if (imain eq 1) then begin ; READ NEW PLOT FILE close,10 read,' Enter new plot file name: ',infile openr,10,infile ref=' ' & refa=' ' pubfile1=' ' & pubfile2=' ' & pubfile3=' ' orbget,star,pos,rx,ry,x,y,nsymbol,ssize,npt,xl,yl,xcalc,ycalc,wt,orb, $ htype,multi,ref,refa,orbflag,xwedge1,ywedge1,xwedge2,ywedge2 period=' ' & semi=' ' & zoom=' 1' izoom=1 & norb=1 endif ;________________________________________________________________________________________ if (imain eq 2) then begin ; CHANGE ORBFLAG tcode=orbflag if (tcode eq 'YES') then orbflag='NO' if (tcode eq 'NO') then orbflag='MAYBE' if (tcode eq 'MAYBE') then orbflag='YES' endif ;________________________________________________________________________________________ if (imain eq 3) then begin ; ENTER PERIOD read,' Enter period for display on plot : ',period read,' Enter semi-major axis for display : ',semi endif ;________________________________________________________________________________________ if (imain eq 4) then begin ; ENTER PUBORB1 read,' Enter name for 1st published orbit : ',pubfile1 endif ;________________________________________________________________________________________ if (imain eq 5) then begin ; ENTER PUBORB2 read,' Enter name for 2nd published orbit : ',pubfile2 endif ;________________________________________________________________________________________ if (imain eq 6) then begin ; ENTER PUBORB3 read,' Enter name for 3rd published orbit : ',pubfile3 endif ;________________________________________________________________________________________ if (imain eq 7) then begin ; CHANGE NODES OPTION tcode=lnode if (tcode eq 'YES') then lnode='NO' if (tcode eq 'NO') then lnode='YES' endif ;________________________________________________________________________________________ if (imain eq 8) then begin ; CHANGE O-C OPTION tcode=ominusc if (tcode eq 'YES') then ominusc='NO' if (tcode eq 'NO') then ominusc='YES' endif ;________________________________________________________________________________________ if (imain eq 9) then begin ; CHANGE ZOOM FACTOR izoom=wmenu(['ZOOM',' 1',' 2',' 4',' 8','16','32'], title=0, init=1) if (izoom eq 1) then zoom=' 1' if (izoom eq 2) then zoom=' 2' if (izoom eq 3) then zoom=' 4' if (izoom eq 4) then zoom=' 8' if (izoom eq 5) then zoom='16' if (izoom eq 6) then zoom='32' endif ;__________________________________________________________________________________________________________________________ if (imain eq 10) then begin ; CHANGE RVPLOT OPTION tcode=rvplot if (tcode eq 'YES') then rvplot='NO' if (tcode eq 'NO') then rvplot='YES' endif ;________________________________________________________________________________________ if (imain eq 11) then begin ; CHANGE RAY LIM OPTION tcode=qfill if (tcode eq 'YES') then qfill='NO' if (tcode eq 'NO') then begin qfill='YES' iaper1=wmenu(['Aperture 1','none','26-inch','82-inch','100-inch','4-meter','Other'], title=0, init=1) if (iaper1 eq 1) then aper1=999. if (iaper1 eq 2) then aper1=0.66 if (iaper1 eq 3) then aper1=2.08 if (iaper1 eq 4) then aper1=2.54 if (iaper1 eq 5) then aper1=4.0 if (iaper1 eq 6) then read,' Enter aperture in meters : ',aper1 iaper2=wmenu(['Aperture 2','none','26-inch','82-inch','100-inch','4-meter','Other'], title=0, init=1) if (iaper2 eq 1) then aper2=999. if (iaper2 eq 2) then aper2=0.66 if (iaper2 eq 3) then aper2=2.08 if (iaper2 eq 4) then aper2=2.54 if (iaper2 eq 5) then aper2=4.0 if (iaper2 eq 6) then read,' Enter aperture in meters : ',aper2 endif endif ;________________________________________________________________________________________ if (imain eq 12) then begin ; CHANGE WEDGE OPTION tcode=wedge if (tcode eq 'NO ') then wedge='YES' if (tcode eq 'YES') then wedge='NO ' endif ;________________________________________________________________________________________ if (imain eq 13) then begin ; CHANGE HEADER STYLE tcode=htype if (tcode eq 'SPECKLE') then htype='WDS ' if (tcode eq 'WDS ') then htype='SPECKLE' endif ;________________________________________________________________________________________ if (imain eq 14) then begin ; CHANGE MULTIPLE-PLOT OPTION tcode=multi if (tcode eq 'NO ') then multi='YES' if (tcode eq 'YES') then multi='NO ' endif ;________________________________________________________________________________________ if (imain eq 15) then begin ; CHANGE EPS WRITE OPTION tcode=psfile if (tcode eq 'YES') then psfile='NO' if (tcode eq 'NO') then psfile='YES' endif ;________________________________________________________________________________________ if (imain eq 16) then begin ; CHANGE PNG WRITE OPTION tcode=pngfile if (tcode eq 'YES') then pngfile='NO' if (tcode eq 'YES') then device,decomposed=0 if (tcode eq 'NO') then pngfile='YES' if (tcode eq 'NO') then device,decomposed=1 endif ;________________________________________________________________________________________ if (imain eq 17) then begin ; CHANGE COLOR OPTION tcode=colorflag if (tcode eq 'YES') then colorflag='NO' if (tcode eq 'NO') then colorflag='YES' if (colorflag eq 'YES') then begin loadct,12 ; load color table tvlct,r,g,b,/get ; define colors for ct=12 c_black=0 & c_red=200 & c_green=30 c_dkblue=108 & c_rayin=215 & c_rayout=230 c_fuchsia=135 & c_white=255 endif if (colorflag eq 'NO') then begin loadct,0 ; load color table tvlct,r,g,b,/get ; define colors for ct=0 c_black=0 & c_red=120 & c_green=15 c_dkblue=65 & c_rayin=136 & c_rayout=148 c_fuchsia=85 & c_white=255 endif endif ;________________________________________________________________________________________ if (imain eq 18) then goto, MAIN ;________________________________________________________________________________________ if (imain eq 19) then goto, REPLOTIT ; REPLOT SAME ORBIT ;________________________________________________________________________________________ if (imain eq 20) then goto, PLOTIT ; PLOT NEXT ORBIT ;________________________________________________________________________________________ if (imain eq 21) then begin ; CHANGE BATCH MODE OPTION tcode=batch if (tcode eq 'YES') then batch='NO' if (tcode eq 'NO') then batch='YES' endif ;________________________________________________________________________________________ if (imain eq 22) then goto, ENDIT ;________________________________________________________________________________________ goto,MAIN ; RETURN TO MAIN MENU ;________________________________________________________________________________________ PLOTIT: print,multi,norb if ((multi eq 'YES') and (norb ne 1)) then orbget,star,pos,rx,ry,x,y,nsymbol,ssize, $ npt,xl,yl,xcalc,ycalc,wt,orb,htype,multi,ref,refa,orbflag,xwedge1,ywedge1, $ xwedge2,ywedge2 izoom=1 REPLOTIT: ; determine file names for ps and png files if (pos ne oldpos) then iexten=0 if (pos eq oldpos) then iexten=iexten+1 psout='wds'+pos+exten(iexten)+'.eps' pngout='wds'+pos+exten(iexten)+'.png' oldpos=pos if (psfile eq 'YES') then begin set_plot,'ps' device,/close_file device, filename=psout device,/color endif ;read data from published orbits px1=[0.] & px2=[0.] & px3=[0.] py1=[0.] & py2=[0.] & py3=[0.] if (pubfile1 ne ' ') then orbpub,pubfile1,px1,py1 if (pubfile2 ne ' ') then orbpub,pubfile2,px2,py2 if (pubfile3 ne ' ') then orbpub,pubfile3,px3,py3 ;................................................................... ; find the maximum data range xmax=max([rx,x,px1,px2,px3]) & xmin=min([rx,x,px1,px2,px3]) ymax=max([ry,y,py1,py2,py3]) & ymin=min([ry,y,py1,py2,py3]) ylen=ymax-ymin & xlen=xmax-xmin ; calculate the y to x axis ratio to determine an even range yxratio=ylen/xlen ; check the ratio for cases >=1 and <1 and add an appropriate width to ; xmin, xmax, ymin, and ymax to center the plot in the window. ; this width (= xymargin) is set smaller if the orbit is largely horizontal ; or vertical, since these plots are more likely to be crowded. ; conversely, it's set somewhat larger for near circular orbits to ; avoid the NE arrows and the semi-major axis legend. xymargin=0.2 if((yxratio lt 0.5) or (yxratio gt 2.0)) then xymargin=0.1 if((yxratio gt 0.9) and (yxratio lt 1.1)) then xymargin=0.25 if(yxratio ge 1.0000) then begin yfactor=xymargin*ylen xfactor=yfactor+(ylen-xlen)/2.0 endif if(yxratio lt 1.0000) then begin xfactor=xymargin*xlen yfactor=xfactor+(xlen-ylen)/2.0 endif newxmin=xmin-xfactor & newxmax=xmax+xfactor newymin=ymin-yfactor & newymax=ymax+yfactor zfactor=1. if (izoom ne 1) then begin print,' Place cursor at center of region to be zoomed' set_plot,'x' cursor,x0,y0 zfactor=1. if (izoom eq 2) then zfactor= 2. if (izoom eq 3) then zfactor= 4. if (izoom eq 4) then zfactor= 8. if (izoom eq 5) then zfactor=16. if (izoom eq 6) then zfactor=32. delta = (newxmax-newxmin)/zfactor newxmin=x0-delta/2. & newxmax=x0+delta/2. newymin=y0-delta/2. & newymax=y0+delta/2. endif occxmax=xmax+xfactor*0.3 & occxmin=xmin-xfactor*0.3 occymax=ymax+yfactor*0.3 & occymin=ymin-yfactor*0.3 ; set up other plotting variables. !x.minor=-1 & !y.minor=-1 ; suppress minor ticks. STARTPLOT: ; set up the x and y range !x.margin=[0,0] & !y.margin=[0,0] !x.style=1 & !y.style=1 !x.range=[newxmin,newxmax] & !y.range=[newymin,newymax] ;plot origin as a large plus sign, based on size of new axes. plus=0.025*(newxmax-newxmin) set_plot,'x' plot, [-plus,plus],[0,0],thick=2,charsize=1.5,xcharsize=0.8,ycharsize=0.8, $ ticklen=0.01,xtickname=REPLICATE(' ',10),ytickname=REPLICATE(' ',10), $ background=255,/isotropic,color=c_black,/nodata axis,0.0,yaxis=1,ticklen=-0.01,color=c_black,/normal axis,0.0,xaxis=1,ticklen=-0.01,color=c_black,/normal if (psfile eq 'YES') then begin set_plot,'ps' plot, [-plus,plus], [0,0], thick=2,charsize=1.25,xcharsize=0.75,ycharsize=0.75,ticklen=0.01, $ xtickname=REPLICATE(' ',10),ytickname=REPLICATE(' ',10),/isotropic,/nodata axis,0.0,yaxis=1,ticklen=-0.01,/normal axis,0.0,xaxis=1,ticklen=-0.01,/normal endif if (qfill eq 'YES') then begin ; shade in larger Rayleigh limit region ray1=0.1258/aper1 > 0.1258/aper2 xlim=fltarr(361) & ylim=fltarr(361) A=fltarr(361) for i=0,360 do A(i)=i A=A*(!pi *2/360.) xlim=cos(A)*ray1 > newxmin < newxmax ylim=sin(A)*ray1 > newymin < newymax set_plot,'x' & polyfill,xlim,ylim,color=c_rayout set_plot,'ps' & if (psfile eq 'YES') then polyfill,xlim,ylim,color=c_rayout ; shade in smaller Rayleigh limit region ray2=0.1258/aper1 < 0.1258/aper2 xlim=fltarr(361) & ylim=fltarr(361) A=fltarr(361) for i=0,360 do A(i)=i A=A*(!pi *2/360.) xlim=cos(A)*ray2 > newxmin < newxmax ylim=sin(A)*ray2 > newymin < newymax set_plot,'x' & polyfill,xlim,ylim,color=c_rayin set_plot,'ps' & if (psfile eq 'YES') then polyfill,xlim,ylim,color=c_rayin endif diff1=(newxmax-newxmin) & diff2=(newymax-newymin) xt1=newxmin+0.08*diff1 & xt2=newxmax-0.08*diff1 yt1=newymin+0.930*diff2 & yt2=newymin+0.975*diff2 set_plot,'x' oplot, [-plus,plus], [0,0], thick=2,color=c_black oplot, [0,0], [-plus,plus], thick=2,color=c_black xyouts,0.1,0.95,'WDS '+pos, charsize=4,alignment=0.0,color=c_black,/normal xyouts,0.5,0.95,star, charsize=4,alignment=0.5,color=c_black,/normal if ((ref ne ' ') and (refa eq ' ')) then xyouts,0.9,0.95,'('+ref+')',charsize=4,alignment=1.0,color=c_black,/normal if ((ref ne ' ') and (refa ne ' ')) then xyouts,0.9,0.95,'('+ref+refa+')',charsize=4,alignment=1.0,color=c_black,/normal if (psfile eq 'YES') then begin set_plot,'ps' oplot, [-plus,plus], [0,0], thick=2 oplot, [0,0], [-plus,plus], thick=2 polyfill,[xt1,xt2,xt2,xt1,xt1],[yt1,yt1,yt2,yt2,yt1],color=255 xyouts,0.06,0.94,'WDS '+pos, charsize=1.5,alignment=0.0,/normal xyouts,0.55,0.94,star, charsize=1.5,alignment=0.5,/normal if (refa eq ' ') then xyouts,0.94,0.94,'('+ref+')',charsize=1.5,alignment=1.0,color=c_black,/normal if (refa ne ' ') then xyouts,0.94,0.94,'('+ref+refa+')',charsize=1.5,alignment=1.0,color=c_black,/normal endif ;plot the north-east bars in lower right corner. nesetx1=newxmax-(0.15*diff1) & nesetx2=newxmax-(0.10*diff1) nesety2=newymin+(0.15*diff2) & nesety1=newymin+(0.10*diff2) nletx=nesetx1-(0.006*diff1) & nlety=nesety1-(0.025*diff2) eletx=nesetx2+(0.0125*diff1) & elety=nesety2-(0.006*diff2) set_plot,'x' oplot, [nesetx1,nesetx2], [nesety2,nesety2],color=c_black oplot, [nesetx1,nesetx1], [nesety2,nesety1],color=c_black xyouts, nletx, nlety, 'N', size=1.0,color=c_black xyouts, eletx, elety, 'E', size=1.0,color=c_black if (psfile eq 'YES') then begin set_plot,'ps' oplot, [nesetx1,nesetx2], [nesety2,nesety2],color=c_black oplot, [nesetx1,nesetx1], [nesety2,nesety1],color=c_black xyouts, nletx, nlety, 'N', size=0.9,color=c_black xyouts, eletx, elety, 'E', size=0.9,color=c_black endif ; plot a bold frame around axis oplot, [newxmin*0.995,newxmin*0.995], [newymin,newymax],color=c_black, thick=2 oplot, [newxmin,newxmax], [newymin*0.995,newymin*0.995],color=c_black, thick=2 oplot, [newxmax*0.995,newxmax*0.995], [newymin,newymax],color=c_black, thick=2 oplot, [newxmin,newxmax], [newymax*0.995,newymax*0.995],color=c_black, thick=2 if (psfile eq 'YES') then begin set_plot,'ps' oplot, [newxmin*0.999,newxmin*0.999], [newymin,newymax],color=c_black, thick=5 oplot, [newxmin,newxmax], [newymin*0.999,newymin*0.999],color=c_black, thick=5 oplot, [newxmax*0.999,newxmax*0.999], [newymin,newymax],color=c_black, thick=5 oplot, [newxmin,newxmax], [newymax*0.999,newymax*0.999],color=c_black, thick=5 endif if ((orb eq 'Y') or (orbflag eq 'YES')) then begin ; plot CW or CCW arc bx=fltarr(17) & by=fltarr(17) A=fltarr(17) for i=0,16 do A(i)=i A=A*(!pi *1/32.) + !pi*1.5 xarc=newxmax-(0.124*diff1) & yarc=newymin+(0.125*diff2) bx=cos(A)*0.043*diff1 & by=sin(A)*0.043*diff2 set_plot,'x' oplot,bx+xarc,by+yarc,thick=1.5,color=c_black if (xi le !pi/2.) then oplot, $ [xarc+0.038*diff1,xarc+0.043*diff1,xarc+0.048*diff1,xarc+0.043*diff1,xarc+0.043*diff1], $ [yarc,yarc+0.010*diff2,yarc,yarc+0.010*diff2,yarc],thick=1.5,color=c_black if (xi le !pi/2.) then oplot,[xarc,xarc-0.010*diff1],[yarc-0.043*diff1,yarc-0.043*diff1], $ thick=1.5,color=c_black if (xi gt !pi/2.) then oplot, $ [xarc,xarc-0.010*diff1,xarc,xarc-0.010*diff1,xarc], $ [yarc-0.048*diff2,yarc-0.043*diff1,yarc-0.038*diff2,yarc-0.043*diff1,yarc-0.043*diff1], $ thick=1.5,color=c_black if (xi gt !pi/2.) then oplot,[xarc+0.043*diff1,xarc+0.043*diff1],[yarc,yarc+0.010*diff2], $ thick=1.5,color=c_black if (psfile eq 'YES') then begin set_plot,'ps' oplot,bx+xarc,by+yarc,thick=1.5 if (xi le !pi/2.) then oplot, $ [xarc+0.038*diff1,xarc+0.043*diff1,xarc+0.048*diff1,xarc+0.043*diff1,xarc+0.043*diff1], $ [yarc,yarc+0.010*diff2,yarc,yarc+0.010*diff2,yarc],thick=1.5,color=c_black if (xi le !pi/2.) then oplot,[xarc,xarc-0.010*diff1],[yarc-0.043*diff1,yarc-0.043*diff1],thick=1.5,color=c_black if (xi gt !pi/2.) then oplot, $ [xarc,xarc-0.010*diff1,xarc,xarc-0.010*diff1,xarc], $ [yarc-0.048*diff2,yarc-0.043*diff1,yarc-0.038*diff2,yarc-0.043*diff1,yarc-0.043*diff1],thick=1.5,color=c_black if (xi gt !pi/2.) then oplot,[xarc+0.043*diff1,xarc+0.043*diff1],[yarc,yarc+0.010*diff2],thick=1.5,color=c_black endif endif ; plot P and a in upper left hand corner. psetx=0.90*(newxmax-newxmin) & psetx=newxmax-psetx psety=0.10*(newymax-newymin) & psety=newymax-psety asetx=psetx asety=0.14*(newymax-newymin) & asety=newymax-asety set_plot,'x' if (period ne ' ') then xyouts, psetx, psety, 'P = '+period+' yr', size=1.0 if (semi ne ' ') then xyouts, asetx, asety, 'a = '+semi+' arcsec', size=1.0 if (psfile eq 'YES') then begin set_plot,'ps' if (period ne ' ') then xyouts, psetx, psety, 'P = '+period+' yr', size=0.9 if (semi ne ' ') then xyouts, asetx, asety, 'a = '+semi+' arcsec', size=0.9 endif ;................................................................ ; new plotting routine. sym=intarr(10) sym(1)=6 ;open circle (eyepiece interferometry - plotted in routine plotcirc) sym(2)=3 ;filled circle (speckle, etc - plotted in routine plotcirc) sym(3)=1 ;plus sign (micrometry) sym(4)=2 ;asterisk (photography) sym(5)=5 ;triangle (CCD) sym(6)=4 ;filled "H" (Hipparcos - plotted in routine plothip) sym(7)=7 ;filled star (USNO - plotted in routine plotstar) sym(8)=8 ;filled "T" (Tycho - plotted in routine plottyc) sym(9)=9 ;filled square (multi-aper. int. - plotted in routine plotsqr) if (orb eq 'y') then orb='Y' set_plot,'x' ; shade in wedge if desired if (wedge eq 'YES') then begin polyfill,xwedge1,ywedge1,color=c_wedge1 polyfill,xwedge2,ywedge2,color=c_wedge2 oplot, [-plus,plus], [0,0], thick=2,color=c_black oplot, [0,0], [-plus,plus], thick=2,color=c_black if (psfile eq 'YES') then begin set_plot,'ps' polyfill,xwedge1,ywedge1,color=c_wedge1 polyfill,xwedge2,ywedge2,color=c_wedge2 oplot, [-plus,plus], [0,0], thick=2,color=c_black oplot, [0,0], [-plus,plus], thick=2,color=c_black endif endif ;plot O-C lines if desired if ((ominusc eq 'YES') and (orb eq 'Y')) then begin xx=fltarr(2) & yy=fltarr(2) for i=0,npt do begin xx(0)=x(i) & xx(1)=xcalc(i) yy(0)=y(i) & yy(1)=ycalc(i) if (wt(i) ne 0.) then begin set_plot,'x' if (nsymbol(i) eq 1) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 2) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 3) then oplot,xx,yy,linestyle=0,color=c_green if (nsymbol(i) eq 4) then oplot,xx,yy,linestyle=0,color=c_fuchsia if (nsymbol(i) eq 6) then oplot,xx,yy,linestyle=0,color=c_red if (nsymbol(i) eq 7) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 8) then oplot,xx,yy,linestyle=0,color=c_red if (nsymbol(i) eq 9) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 10) then oplot,xx,yy,linestyle=0,color=c_fuchsia if (psfile eq 'YES') then begin set_plot,'ps' if (nsymbol(i) eq 1) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 2) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 3) then oplot,xx,yy,linestyle=0,color=c_green if (nsymbol(i) eq 4) then oplot,xx,yy,linestyle=0,color=c_fuchsia if (nsymbol(i) eq 6) then oplot,xx,yy,linestyle=0,color=c_red if (nsymbol(i) eq 7) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 8) then oplot,xx,yy,linestyle=0,color=c_red if (nsymbol(i) eq 9) then oplot,xx,yy,linestyle=0,color=c_dkblue if (nsymbol(i) eq 10) then oplot,xx,yy,linestyle=0,color=c_fuchsia endif endif if (wt(i) eq 0.) then begin set_plot,'x' if (nsymbol(i) eq 1) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 2) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 3) then oplot,xx,yy,linestyle=1,color=c_green if (nsymbol(i) eq 4) then oplot,xx,yy,linestyle=1,color=c_fuchsia if (nsymbol(i) eq 6) then oplot,xx,yy,linestyle=1,color=c_red if (nsymbol(i) eq 7) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 8) then oplot,xx,yy,linestyle=1,color=c_red if (nsymbol(i) eq 9) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 10) then oplot,xx,yy,linestyle=1,color=c_fuchsia if (psfile eq 'YES') then begin set_plot,'ps' if (nsymbol(i) eq 1) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 2) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 3) then oplot,xx,yy,linestyle=1,color=c_green if (nsymbol(i) eq 4) then oplot,xx,yy,linestyle=1,color=c_fuchsia if (nsymbol(i) eq 6) then oplot,xx,yy,linestyle=1,color=c_red if (nsymbol(i) eq 7) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 8) then oplot,xx,yy,linestyle=1,color=c_red if (nsymbol(i) eq 9) then oplot,xx,yy,linestyle=1,color=c_dkblue if (nsymbol(i) eq 10) then oplot,xx,yy,linestyle=1,color=c_fuchsia endif endif endfor endif ;plot observations for i=0,npt do begin temp=nsymbol(i) set_plot,'x' if (temp eq 3) then oplot,[x(i)],[y(i)],psym=sym(temp), $ symsize=ssize(i)*sqrt(zfactor),color=c_green if (temp eq 4) then oplot,[x(i)],[y(i)],psym=sym(temp), $ symsize=ssize(i)*sqrt(zfactor),color=c_fuchsia if (psfile eq 'YES') then begin set_plot,'ps' if (temp eq 3) then oplot,[x(i)],[y(i)],psym=sym(temp), $ symsize=ssize(i)*sqrt(zfactor),color=c_green if (temp eq 4) then oplot,[x(i)],[y(i)],psym=sym(temp), $ symsize=ssize(i)*sqrt(zfactor),color=c_fuchsia endif endfor ;sssize=ssize*0.010*(newxmax-newxmin)*sqrt(zfactor) ; scale symbol size for plotcirc, sssize=ssize*0.008*(newxmax-newxmin)*sqrt(zfactor) ; scale symbol size for plotcirc, ; plothip, plottyc, plotstar plotcirc, x, y, nsymbol, sssize ; plot open and filled circles plothip, x, y, nsymbol, sssize ; plot filled "H" plottyc, x, y, nsymbol, sssize ; plot filled "T" plotstar, x, y, nsymbol, sssize ; plot stars plotsqr, x, y, nsymbol, sssize ; plot filled squares plottri, x, y, nsymbol, sssize ; plot triangles ; plot line of nodes if desired if(lnode eq 'YES') then begin set_plot,'x' & oplot,xl,yl,linestyle=3,thick=2,color=c_black set_plot,'ps' & if (psfile eq 'YES') then oplot,xl,yl,linestyle=3,thick=2,color=c_black endif ; plot occultation vectors xx=fltarr(2) & yy=fltarr(2) for i=0,npt do begin xx(0)=x(i) & xx(1)=xcalc(i) yy(0)=y(i) & yy(1)=ycalc(i) if ((nsymbol(i) eq 5) and (orb ne 'Y') and (orb ne 'y')) then begin aaa=-x(i)/y(i) & bbb=y(i)-aaa*x(i) xx(0)=occxmin & yy(0)=aaa*xx(0)+bbb xx(1)=occxmax & yy(1)=aaa*xx(1)+bbb if (yy(0) gt occymax) then begin yy(0)=occymax & xx(0)=(yy(0)-bbb)/aaa endif if (yy(1) gt occymax) then begin yy(1)=occymax & xx(1)=(yy(1)-bbb)/aaa endif if (yy(0) lt occymin) then begin yy(0)=occymin & xx(0)=(yy(0)-bbb)/aaa endif if (yy(1) lt occymin) then begin yy(1)=occymin & xx(1)=(yy(1)-bbb)/aaa endif set_plot,'x' & oplot,xx,yy,linestyle=0,color=85 set_plot,'ps' & if (psfile eq 'YES') then oplot,xx,yy,linestyle=0,color=85 endif if ((nsymbol(i) eq 5) and (orb ne 'N') and (orb ne 'n')) then begin aaa1=y(i)/x(i) & bbb1=ycalc(i)-aaa1*xcalc(i) aaa2=-x(i)/y(i) & bbb2=y(i)-aaa2*x(i) xx(1)=x(i) & xx(0)=(bbb2-bbb1)/(aaa1-aaa2) yy(1)=y(i) & yy(0)=aaa1*xx(0)+bbb1 set_plot,'x' & oplot,xx,yy,linestyle=0,color=85 set_plot,'ps' & if (psfile eq 'YES') then oplot,xx,yy,linestyle=0,color=85 xx(1)=xcalc(i) & yy(1)=ycalc(i) set_plot,'x' if (wt(i) ne 0) then oplot,xx,yy,linestyle=0,color=85 if (wt(i) eq 0) then oplot,xx,yy,linestyle=1,color=85 if (psfile eq 'YES') then begin set_plot,'ps' if (wt(i) ne 0) then oplot,xx,yy,linestyle=0,color=85 if (wt(i) eq 0) then oplot,xx,yy,linestyle=1,color=85 endif endif endfor ; plot published orbits if (pubfile1 ne ' ') then begin pxx=fltarr(2) pyy=fltarr(2) for i=0,179 do begin pxx(0)=px1(i+i) & pxx(1)=px1(i+i+1) pyy(0)=py1(i+i) & pyy(1)=py1(i+i+1) set_plot,'x' & oplot,pxx,pyy,color=c_black set_plot,'ps' & if (psfile eq 'YES') then oplot,pxx,pyy,color=c_black endfor endif if (pubfile2 ne ' ') then begin pxx=fltarr(2) pyy=fltarr(2) for i=0,179 do begin pxx(0)=px2(i+i) & pxx(1)=px2(i+i+1) pyy(0)=py2(i+i) & pyy(1)=py2(i+i+1) set_plot,'x' & oplot,pxx,pyy,color=c_black set_plot,'ps' & if (psfile eq 'YES') then oplot,pxx,pyy,color=c_black endfor endif if (pubfile3 ne ' ') then begin pxx=fltarr(2) pyy=fltarr(2) for i=0,179 do begin pxx(0)=px3(i+i) & pxx(1)=px3(i+i+1) pyy(0)=py3(i+i) & pyy(1)=py3(i+i+1) set_plot,'x' & oplot,pxx,pyy,color=c_black set_plot,'ps' & if (psfile eq 'YES') then oplot,pxx,pyy,color=c_black endfor endif set_plot,'x' ; plot calculated orbit over the data. oplot, rx,ry,thick=2,color=c_black if (psfile eq 'YES') then begin set_plot,'ps' oplot, rx,ry,thick=5,color=c_black ; oplot, [-plus,plus], [0,0], thick=2 ; oplot, [0,0], [-plus,plus], thick=2 endif if (rvplot eq 'YES') then begin ; plot RV curves set_plot,'x' window,2,xsize=500,ysize=400,title='Estimated Spectroscopic Orbit' plotorb_rv,star,pos endif norb=norb+1 set_plot,'x' ; write png file if desired if (pngfile eq 'YES') then write_png,pngout, tvrd(),r,g,b if (psfile eq 'YES') then begin set_plot,'ps' device,/close_file endif if (batch eq 'YES') then goto, PLOTIT goto, MAIN ENDIT: ; close down shop return end