; Plots image and overlays contours, writing to .gif file pro gifplot, imag, nl_xy, nl_info, coords, edpt, fn, nl_xy_2=nl_xy_2, nl_info_2=nl_info_2, coords_2=coords_2, nl_xy_3=nl_xy_3, nl_info_3=nl_info_3, coords_3=coords_3, no_lines=no_lines,t_obs=t_obs if (n_elements(no_lines) eq 0) then no_lines=0 sz=size(imag) & sz=sz*5 ps=(size(imag))*2 if n_elements(fn) eq 0 then begin print, "filename:" fn='' & read, fn endif set_plot,'z' device, set_resolution = [sz(1),sz(2)] r=indgen(256) & g=r & b=g tvlct, r, g, b if n_elements(nl_xy_2) ne 0 then $ tv,bytscl(congrid(imag,sz(1),sz(2)),min=-500,max=500)<252,0,0,xsize=sz(1),ysize=sz(2) $ else $ tv,bytscl(congrid(imag,sz(1),sz(2)),min=-500,max=500)<254,0,0,xsize=sz(1),ysize=sz(2) if (no_lines eq 0) then begin contour,imag,pos=[0,0,sz(1),sz(2)],xstyle=5,ystyle=5,/data,/noerase,/nodata ;for i=0, n_elements(nl_info)-1 do begin ;if nl_info(i).typ lt 2 then if nl_info(i).typ eq 1 then s=[indgen(nl_info(i).n),0] else s=[indgen(nl_info(i).n)] ;if nl_info(i).typ ne 2 then oplot, nl_xy(0,nl_info(i).offset+s),nl_xy(1,nl_info(i).offset+s), color=255, thick=2 $ ;else oplot, [nl_xy(0,nl_info(i).offset), nl_xy(0,nl_info(i).n)],[nl_xy(1,nl_info(i).offset), nl_xy(1,nl_info(i).n)], color=255, thick=2 ;endfor ;if n_elements(nl_xy_2) ne 0 then begin ;for i=0, n_elements(nl_info_2)-1 do begin if nl_info_2(i).typ lt 2 then if nl_info_2(i).typ eq 1 then s=[indgen(nl_info_2(i).n),0] else s=[indgen(nl_info_2(i).n)] ;if nl_info_2(i).typ ne 2 then oplot, nl_xy_2(0,nl_info_2(i).offset+s),nl_xy_2(1,nl_info_2(i).offset+s), color=254, thick=2 $ ;else oplot, [nl_xy_2(0,nl_info_2(i).offset), nl_xy_2(0,nl_info_2(i).n)],[nl_xy_2(1,nl_info_2(i).offset), nl_xy_2(1,nl_info_2(i).n)], color=253, thick=2 ;endfor ;endif if n_elements(nl_xy_3) ne 0 then begin for i=0, n_elements(nl_info_3)-1 do begin if nl_info_3(i).typ lt 2 then if nl_info_3(i).typ eq 1 then s=[indgen(nl_info_3(i).n),0] else s=[indgen(nl_info_3(i).n)] if nl_info_3(i).typ ne 2 then oplot, nl_xy_3(0,nl_info_3(i).offset+s),nl_xy_3(1,nl_info_3(i).offset+s), color=1, thick=2, linestyle=2 $ else oplot, [nl_xy_3(0,nl_info_3(i).offset), nl_xy_3(0,nl_info_3(i).n)],[nl_xy_3(1,nl_info_3(i).offset), nl_xy_3(1,nl_info_3(i).n)], color=245, thick=2, linestyle=2 endfor endif xyouts,sz(1)-425, 30, t_obs, color=0, charsize=3, charthick=3.5, /device endif if n_elements(nl_xy_3) eq 0 and n_elements(nl_xy_2) eq 0 then begin loadct, 8 ;loadct, 3 tvlct, r,g,b,/get ;g(255)=0 & b(255)=0 & r(255)=200 g(255)=100 & b(255)=40 & r(255)=0 endif else begin g(253:255)=[0,255,0] & b(253:255)=[255,0,0] & r(253:255)=[0,0,255] endelse write_gif, (fn+'.gif'), tvrd(), r,g,b device, /close set_plot, 'x' print, format='("neutral line output to ",A)',(fn+'.gif') end