-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathparameters.py
48 lines (31 loc) · 1.42 KB
/
parameters.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
import numpy as np
# Set the size of the moving window in which the search for similar pixels
# is performed
windowSize = 31
# Set the path where the results should be stored
path = 'STARFM_demo/'
# Set to True if you want to decrease the sensitivity to the spectral distance
logWeight = False
# If more than one training pairs are used, set to True
temp = False
# The spatial impact factor is a constant defining the relative importance of
# spatial distance (in meters)
# Take a smaller value of the spatial impact factor for heterogeneous regions
# (e.g. A = 150 m)
spatImp = 150
# increasing the number of classes limits the number of similar pixels
numberClass = 4
# Set the uncertainty value for the fine resolution sensor
# https://earth.esa.int/web/sentinel/technical-guides/sentinel-2-msi/performance
uncertaintyFineRes = 0.03
# Set the uncertainty value for the coarse resolution sensor
# https://sentinels.copernicus.eu/web/sentinel/technical-guides/sentinel-3-olci/validation
uncertaintyCoarseRes = 0.03
# Other global variables
mid_idx = (windowSize**2)//2
specUncertainty = np.sqrt(uncertaintyFineRes**2 + uncertaintyCoarseRes**2)
tempUncertainty = np.sqrt(2*uncertaintyCoarseRes**2)
# Set the size of the slices in which to divide the image
# This number should be multiple of the image height and not bigger than it
# Use bigger size for small images
sizeSlices = 150