pro up2,data,x,y,noscale=noscale,interp=interp
;+
;  pro up2,data,x,y,noscale=noscale,interp= interp
;
;	program to rebin (x2) and display easily
;	lwa,  1/30/92
;	Modified 5/10/92 to include interp keyword
;-

a = size(data)

;  See if we should turn off the tvscl option:

if keyword_set(noscale) then nosc = 0 else nosc = 2
if keyword_set(interp) then nosamp = 2 else nosamp = 0
if n_elements(x) eq 0 then x=0
if n_elements(y) eq 0 then y=0

if (nosc eq 0 and nosamp eq 0) then begin
    tv,rebin(data,a(1)*2,a(2)*2,/sample),x,y  ;nosc=0, nosamp=0
endif

if (nosc eq 0 and nosamp eq 2) then begin
    tv,rebin(data,a(1)*2,a(2)*2),x,y  ;nosc=0, nosamp=2
endif

if (nosc eq 2 and nosamp eq 0) then begin
    tvscl,rebin(data,a(1)*2,a(2)*2,/sample),x,y  ;nosc=2, nosamp=0
endif

if (nosc eq 2 and nosamp eq 2) then begin
    tvscl,rebin(data,a(1)*2,a(2)*2),x,y  ;nosc=2, nosamp=2
endif

end
