semantique.processor.operators.during_

Contents

semantique.processor.operators.during_#

semantique.processor.operators.during_(x, y, track_types=True, **kwargs)[source]#

Test if x is during interval y.

This is a specific temporal relational operator meant to be evaluated with a temporal coordinate as left-hand side operand, and a semantique.time_interval() as right-hand side operand. It will evaluate if the specified temporal coordinate fall inside the given time interval.

Parameters:
  • x (xarray.DataArray) – Array containing the operands at the left-hand side of each expression, which should be temporal coordinates.

  • y – Time interval to be used as the right-hand side of each expression. May also be another array with temporal coordinates. In the latter case, when evaluating the expression for a coordinate in array x the second operand is the temporal bounding box of all coordinates in array y.

  • track_types (bool) – Should the operator promote the value type of the output object, based on the value type of the input objects?

  • **kwargs – Ignored.

Returns:

xarray.DataArray – An array with the same shape as x containing the results of all evaluated expressions.

Note

The timezones of x and y are expected to be equal.

Note

When tracking value types, this operator uses the following type promotion manual, with the first layer of keys being the supported value types of x, the second layer of keys being the supported value types of y given the value type of x, and the corresponding value being the promoted value type of the output.

{'datetime': {'datetime': 'binary'}}