Changeset 226 for trunk/SRC/Interpolation/extrapsmooth.pro
- Timestamp:
- 03/16/07 10:22:26 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/extrapsmooth.pro
r202 r226 46 46 ;- 47 47 FUNCTION extrapsmooth, in, mskin, x_periodic = x_periodic, MINVAL = minval, MAXVAL = maxval, GE0 = ge0 48 ;49 compile_opt strictarr, strictarrsubs50 48 ; 51 sz = size(reform(in)) 52 IF sz[0] NE 2 THEN BEGIN 49 compile_opt strictarr, strictarrsubs 50 ; 51 sz = size(reform(in)) 52 IF sz[0] NE 2 THEN BEGIN 53 53 print, 'Input arrays must have 2 dimensions' 54 54 return, -1 … … 57 57 ny = sz[2] 58 58 IF n_elements(mskin) EQ 1 AND mskin[0] EQ -1 THEN mskin = replicate(1b, nx, ny) 59 IF n_elements(mskin) NE nx*ny THEN BEGIN 59 IF n_elements(mskin) NE nx*ny THEN BEGIN 60 60 print, 'input grid mask do not have the good size' 61 61 return, -1 … … 65 65 whmsk = where(mskin EQ 0, nbr) 66 66 IF nbr NE 0 THEN out[temporary(whmsk)] = !values.f_nan 67 ; add values on each side of the array to avoid bo ndary effects67 ; add values on each side of the array to avoid boundary effects 68 68 nx2 = nx/2 69 69 ny2 = ny/2 … … 74 74 add2 = out[nx-nx2:nx-1, *] 75 75 out = [add2, [temporary(out)], add1] 76 ENDIF ELSE BEGIN 76 ENDIF ELSE BEGIN 77 77 add = replicate(!values.f_nan, nx2, ny+2*ny2) 78 78 out = [add, [temporary(out)], add]
Note: See TracChangeset
for help on using the changeset viewer.