;----------------------------------------------------------------- ; scale.pro ; ; written by Andreas Reigber ;------------------------------------------------------------------ ; Resize any 1,2 and 3-D array with congrid. Just to lasy to ; type always cubic=0.5. ;------------------------------------------------------------------ ; This software has been released under the terms of the GNU Public ; license. See http://www.gnu.org/copyleft/gpl.html for details. ;------------------------------------------------------------------ function scale,arr,xres,yres,zres s=size(arr) if s[0] eq 1 then arr2=congrid(arr,xres,cubic=-.5) if s[0] eq 2 then arr2=congrid(arr,xres,yres,cubic=-.5) if s[0] eq 3 then arr2=congrid(arr,xres,yres,zres,cubic=-.5) return,arr2 end