Description Usage Arguments Details Examples
View source: R/write_setting.R
Write TIMESAT setting file.
1 | write_setting(options, file = "TSM.set")
|
options |
List object, parameters of TIMESAT. |
file |
A character string naming a file |
The global paremteres are as follows:
TIMESAT Version: 3.3.
Character string that will be used to label output files from TIMESAT.
1 = image mode, 0 = ASCII file with time-series.
1 = STL trend fitting activated. Overrules choice of fitting method (row 32)
1 = use quality data, 0 = do not use quality data.
Running in image mode the user should prepare a file that on the first row gives the totalnumber N of vegetation index images and then the path and name of each of the N images.
Relevant if quality data are used (specifications on rows 14–16). Running in image mode the user should prepare a file that on the first row gives the total number N of quality images and then the paths and names of the quality images. The file has the same structure as the file listing vegetation index images. The name, followed by be supplied on row 7. Running sequential data the user should specify the ASCII file containing the quality data. If quality data are not used the user should simply input any dummy name.
Relevant if in image mode. Please specify the data types of the images where 1 = 8-bit unsigned integer, 2 = 16-bit signed integer, 3 = 32-bit real (see also section 10.15). If not in image mode the user may simply input the value 0.
Relevant if in image mode. Please specify the byte order where 0 = little endian byte order, 1 = big endian byte order (for 16-bit signed integers). If not in image mode the user may simply input the value 0.
Relevant if in image mode. Please specify the byte order where 0 = little endian byte order, 1 = big endian byte order (for 16-bit signed integers). If not in image mode the user may simply input the value 0.
Processing window (start row end row start col end col).
No. years and no. points per year.
lower and upper boundary. Data outside the specified range will be assigned weight 0. By choosing these values carefully one may for example avoid that water pixels are processed.
c(qc_min, qc_max, w_value)
c(qc_min, qc_max, w_value)
c(qc_min, qc_max, w_value)
Amplitude cutoff value. Amplitude lower than A will be ignored.
Debug flag.
do not print debug data (recommended).
print certain debug parameters to the screen.
print certain debug parameters to file debug2_jobname.
if a crash occurs the position of the problematic time-series as well as the time-series itself is written to debug3_jobname.
(1/0 1/0 1/0), "1" means return, "0" means not. 1: seasonality data, 2: smoothed time-series, 3: original time-series.
Boolean, Whether use land cover data?
Character, the file path of land cover.
Numeric, the methods of spike remove.
no spike detection.
method based on median filtering as described in TIMESAT manual section 3.3.
weights from STL-decomposition.
weights from STL-decomposition (the full time-series is divided into a seasonal- and a trend component, data values that do not fit this pattern are assigned low weights, see Cleveland et al. 1990 for detailed information) multiplied with original weights.
Numeric, data values that differ from the median value by
more than the spike_sd
multiplied with the standard deviation of y and that
are different from the left and right neighbors are removed (assigned weight 0).
A normal setting of the spike value is 2.
STL stiffness value. This value regulates the stiffness of the STL trend variable. The default is 3.0. A smaller value decreases stiffness, and a larger value increases stiffness.
No. of land cover classes. Number of land cover classes. Relevant only if a land cover map is used. If a land cover map is not used the user may put 1 in this entry.
Land cover code for class 1. Land cover code for class 1.If there is no land cover file or if processing sequential data in an ASCII file all time- series will be processed with the parameter settings in rows 28–38, i.e. as if they belonged to land cover class 1.
Seasonality parameter. This parameter guides how the secondary maximum in the determination of the number of seasons is treated (see section 3.5). A value 1 of the parameter will force the program to treat all data as if there is one season per year. A small value of the parameter will attempt to fit two seasons a year. If there are images covering areas with both one and two vegetation seasons, as may be the case for images on continental scale, it is advisable to separate these areas in two different land cover classes using a high value of the seasonality parameter for the class with one vegetation season and a low value for the class with two vegetation seasons.
No. of envelope iterations. The function fits can be made to approach the upper envelope of the time-series in an iterative procedure (see section 3.4). Specifying 1 for the number of envelope fits there is only one fit to data and no adaptation to the envelope. Specifying 2 or 3 there are, respectively, one and two additional fits where the weights of the values below the fitted curve is decreased forcing the fitted function toward the upper envelope.
Adaptation strength. The adaptation strength is a number between 1 and 10 indicating the strength of the upper envelope adaptation. 10 gives the strongest adaptation to the upper envelope and 1 gives no adaptation. Strong adaptation, especially combined with 3 envelope iterations, may put too much emphasis on single high data values leading to bad results. The adaptation strength needs to be fine tuned for given data, but a normal adaptation value is around 2 and 3.
Force to minimum (1/0) and value of minimum. At northern or southern latitudes time-series may during the dark season be affected by high sun zenith angles and/or pertinent clouds, giving unphysically low values during long periods of time. In these cases it may sometimes be useful to force the fitted function to a user specified minimum (or off-season) value. This is done by giving 1 for the first entry followed by the minimum value. If the user specifies 0 for the first entry there will be no forcing to the minimum value.
Fitting method (3/2/1). Indicate fitting method. Which method to use is determined by the properties of the time-series. Different methods can be used for different land cover classes. If STL trend fitting is activated (row 4), this overrides the fitting method setting.
SavitzkyGolay filtering
asymmetric Gaussian
double logistic function
Weight update method. Weight update method; not in use. The user may simply input 1.
Window size for Savitzky-Golay If Savitzky-Golay filtering is used (see section 3.6) the half-window n needs to be set. This integer value should be seen in relation to the total number data values during the year. A rough guide value is around floor(nptperyear=4). A large value of the window gives a high degree of smoothing, but affects the possibility to follow a rapid change in data in the beginning of the growth season.
Reserved
Reserved
Season start/end method (1/2/3/4). Method for defining the start/end of seasons (see further explanations in section 4.3). For methods 3, 2 and 1, the threshold values for start and end respectively are specified on row 38.
seasonal amplitude
absolute value
relative amplitude
STL trend
Season start/end values. For start / end methods 3 and 1 please supply the threshold values as a proportion of amplitude, ranging between 0 and 1. For method 2 specify absolute values in data units. Not used for method 4 (supply any values).
1 2 | opt <- rTIMESAT:::options_TSM
write_setting(opt, 'TSM.set')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.