TSTool / Command / AdjustExtremes
Overview
The AdjustExtremes
command adjusts extreme values in time series (e.g.,
to remove negative values from a time series that can only have values
greater than or equal to zero), while preserving “mass” (volume).
Currently the only adjust method is Average
, which performs the following logic:
- Find a value beyond the extreme value, for example a negative value if the extreme value is 0.
- Adjust extreme values by considering neighboring values equally on each side of the point in question. When adjusting minimum values, neighboring values are added until the average is above the allowed extreme value, and all values that make up the sum are then set to the average value.
- Missing values remain missing and therefore this command should only be applied to filled data.
- If a satisfactory result cannot be reached within limits, then the original values are not changed.
- Changed values are listed in the time series history, which is viewed with the time series properties.
- Applying the command will result in the time series having periods of constant value, with the length of the period being controlled by the magnitude of the extreme value and the maximum number of values allowed for consideration on each side.
Command Editor
The command is available in the following TSTool menu:
- Commands / Manipulate Time Series
The following dialog is used to edit the command and illustrates the syntax of the command.
AdjustExtremes
Command Editor (see full-size image)
Command Syntax
The command syntax is as follows:
AdjustExtremes(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
TSList |
Indicates the list of time series to be processed, one of:
|
AllTS |
TSID |
The time series identifier or alias for the time series to be processed, using the * wildcard character to match multiple time series. Can be specified using ${Property} . |
Required if TSList=*TSID |
EnsembleID |
The ensemble to be processed, if processing an ensemble. Can be specified using ${Property} . |
Required if TSList=*EnsembleID |
AdjustMethod required |
Currently only Average is supported. | None – must be specified. |
ExtremeToAdjust required |
Indicate whether minimum (AdjustMinimum ) or maximum (AdjustMaximum ) values to be adjusted. |
None – must be specified. |
ExtremeValue required |
The extreme value that is the limit of acceptable values. | None – must be specified. |
MaxIntervals |
Indicates how many values on each side of a point are allowed to be examined. | 0 , indicating no limit. |
AnalysisStart |
The date/time to start analyzing data, can use ${Property} . |
Full period. |
AnalysisEnd |
The date/time to end analyzing data, can use ${Property} . |
Full period. |
Examples
See the automated tests.
The following example shows results using the above command editor values (adjusted on left, original on right):
Results from AdjustExtremes
Command
Troubleshooting
See the main TSTool Troubleshooting documentation.
See Also
AddConstant
commandFillConstant
commandSelectTimeSeries
command