-
Notifications
You must be signed in to change notification settings - Fork 10
/
pygeonet_defaults.py
76 lines (62 loc) · 2.57 KB
/
pygeonet_defaults.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#! /usr/bin/env python
# Set default parameters for GeoNet
# Setting up Geonet grass location
from __future__ import division
import shutil
import os
import pygeonet_prepare as Parameters
# Reporting, plotting and file handling
doFileOutput = 1
doReport = 1
doPlot = 1
doResetFiguresOnStart = 1
# **** Default Parameters for Perona-Malik nonlinear diffusion
# ... could be: PeronaMalik1, PeronaMalik2, Tukey, rampPreserving
#diffusionMethod = 'PeronaMalik1'
diffusionMethod = 'PeronaMalik2'
diffusionTimeIncrement = 0.1 # this makes the explicit scheme stable
diffusionSigmaSquared = 0.05
nFilterIterations = 50 # Nonlinear filtering iterations
# Flow routing options and sub basin indexing
thresholdAreaSubBasinIndexing = 1500
# Define the cost function
# areaArray=D8 accumulation area
# flowArray=Dinf accumulation area
# slopeDemArray=local (scalar, modulus) slope
# curvatureDemArray=geometric curvature
# areaMean=mean D8 accumulation area
# flowMean=mean Dinf accumulation area
# skeletonFromFlowArray=skeleton based on Dinf flow
# skeletonFromCurvatureArray=skeleton based on curvature
# skeletonFromFlowAndCurvatureArray=skeleton based on Dinf flow and curvature
# reciprocalLocalCostFn='(flowArray.^(1/3.0)).*(slopeDemArray.^(-1/3.0))+20'
# reciprocalLocalCostFn = 'flowArray + '+\
# '30*skeletonFromFlowAndCurvatureArray + '+ \
# 'exp(curvatureDemArray*3)'
# doNormalizeCurvature = 0
reciprocalLocalCostFn = 'flowArray + ' + \
'flowMean*skeletonFromFlowAndCurvatureArray' + \
' + flowMean*curvatureDemArray'
#reciprocalLocalCostFn = 'flowArray + ' + \
# 'flowMean*curvatureDemArray'
doNormalizeCurvature = 1
reciprocalLocalCostMinimum = 'nan'
# What proportion of the DEM should we track drainage?
thresholdPercentAreaForDelineation = 0.1
demNanFlag = -9998.0
demErrorFlag = -9998.0
#demNanFlag = -3.402823e+038
#demErrorFlag = -3.402823e+038
# The demSmoothingQuantile is the quantile of landscape we want to smooth and
# (1-demSmoothingQuantile) is the quantile of landscape we want to enhance.
# A good range of demSmoothingQuantile is 0.5 to 0.9
demSmoothingQuantile = 0.9
#curvatureCalcMethod = 'laplacian'
curvatureCalcMethod = 'geometric'
thresholdQqCurvature = 0
flowThresholdForSkeleton = 3000
channelheadPredefined = 0
# Channel head search box size applied on skeleton image
endPointSearchBoxSize = 30 # Median hillslope of the input DEM, i.e. the distance between each pixel and the first channelized downslope pixel.
# Option used in discrete geodesic path finding from channel heads to outlets
doTrueGradientDescent = 1