You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Description


Calculates for each timestep in the output time series the time (in minutes) to/from the nearest data point in the input time series, which typically is the result of any one of the other selection transformations.

If the nearest value is in the past, the resulting value is negative, in the future the resulting value is positive. Whenever the time since the last value and the time to to future value are the same, the positive (future) value will be returned.


Input


Non-equidistant Timeseries, which typically is the output of any one of the other selection transformations.



Output


Equidistant Timeseries containing the time to/from the nearest time in the input time series.


Configuration example


TimeToSelectionFunctionTest 1.00 default.xml
<transformationModule ...>
	<transformation id="time to selection function test">
		<selection>
			<timeToSelection>
				<inputVariable>
					<timeSeriesSet>
						<moduleInstanceId>SelectionPeaksFunctionTest</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>H.tidal</parameterId>
						<locationId>H-2010</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="nonequidistant"/>
						<relativeViewPeriod unit="day" start="0" end="7"/>
						<readWriteMode>editing visible to all future task runs</readWriteMode>
					</timeSeriesSet>
				</inputVariable>
				<outputVariable>
					<timeSeriesSet>
						<moduleInstanceId>SelectionPeaksFunctionTest</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>H.updated</parameterId>
						<locationId>H-2010</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="minute" multiplier="15"/>
						<aggregationPeriod start="-7" end="7" unit="hour"/>
						<relativeViewPeriod unit="day" start="0" end="7"/>
						<readWriteMode>add originals</readWriteMode>
					</timeSeriesSet>
				</outputVariable>
			</timeToSelection>
		</selection>
	</transformation>
</transformationModule>



In this example:


  • Only the last three peaks before T0 and the first four peaks after T0 are considered.
  • The first two peaks of the last three lows just before T0 are skipped, leaving only the third last one.
  • Similarly the first two peaks just after T0 are skipped, leaving the third and fourth ones.
  • No labels