Project

General

Profile

« Previous | Next » 

Revision 6871bc85

Added by Jim Regetz over 12 years ago

  • ID 6871bc85f176c65ace8b90dd22593c13dbb5184f

fixed vwg step

View differences:

terrain/research/oregon/arcgis/v2/multiscalesmooth9a_clean.R
38 38
# bbox can be either a grid name or the 'xmin ymin xmax ymax' parameters
39 39
# for setwindow
40 40

  
41
# REGETZ NOTES
42
# - it looks like Ming used sd=0.001 (based on the Arc 'log' file in the
43
#   topo experimental directory)
44

  
41 45
library(raster)
42 46

  
43 47
#&type NB - using standard deviation as noise specification now, not variance!
......
126 130
        h[[i]] <- aggregate(w.prev * h[[i-1]], 3, sum) / w
127 131
        hdiff <- h[[i-1]] - disaggregate(h[[i]], 3)
128 132
        vbg <- aggregate(w.prev * hdiff^2, 3, sum) / w
129
        if (i==1) {
133
        if (i==2) {
130 134
            vwg <- n - n # zero, but with window and cell size set for us
131 135
        } else {
132 136
            vwg <- aggregate(w.prev * vg.prev, 3, sum) / w

Also available in: Unified diff