Skip to content

Commit

Permalink
Updates according to PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Jan 5, 2024
1 parent d19039a commit 281584a
Show file tree
Hide file tree
Showing 33 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion absolute.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "absolute",
"summary": "Absolute value",
"description": "Computes the absolute value of a real number `x`, which is the \"unsigned\" portion of `x` and often denoted as *|x|*.\n\nNo-data values are passed through and therefore get propagated.",
"description": "Computes the absolute value of a real number `x`, which is the \"unsigned\" portion of `x` and often denoted as *|x|*.\n\nNo-data values are passed through.",
"categories": [
"math"
],
Expand Down
2 changes: 1 addition & 1 deletion all.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "all",
"summary": "Are all of the values true?",
"description": "Checks if **all** of the values in `data` are true. If no value is given (i.e. the array is empty) the process returns `null`.\n\nBy default all no-data values are ignored so that the process returns the no-data value (or `null`) if all values are no-data, `true` if all values are true and `false` otherwise. Setting the `ignore_nodata` flag to `false` takes no-data values into account and the array values are reduced pairwise according to the following truth table:\n\n```\n || no-data | false | true\n------- || ------- | ----- | -------\nno-data || no-data | false | no-data\nfalse || false | false | false\ntrue || no-data | false | true\n```\n\n**Remark:** The process evaluates all values from the first to the last element and stops once the outcome is unambiguous. A result is ambiguous unless a value is `false` or all values have been taken into account.",
"description": "Checks if **all** of the values in `data` are true. If no value is given (i.e. the array is empty) the process returns the no-data value (or `null`).\n\nBy default all no-data values are ignored so that the process returns the no-data value (or `null`) if all values are no-data, `true` if all values are true and `false` otherwise. Setting the `ignore_nodata` flag to `false` takes no-data values into account and the array values are reduced pairwise according to the following truth table:\n\n```\n || no-data | false | true\n------- || ------- | ----- | -------\nno-data || no-data | false | no-data\nfalse || false | false | false\ntrue || no-data | false | true\n```\n\n**Remark:** The process evaluates all values from the first to the last element and stops once the outcome is unambiguous. A result is ambiguous unless a value is `false` or all values have been taken into account.",
"categories": [
"logic",
"reducer"
Expand Down
2 changes: 1 addition & 1 deletion any.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "any",
"summary": "Is at least one value true?",
"description": "Checks if **any** (i.e. at least one) value in `data` is `true`. If no value is given (i.e. the array is empty) the process returns `null`.\n\nBy default all no-data values are ignored so that the process returns the no-data value (or `null`) if all values are no-data, `true` if at least one value is true and `false` otherwise. Setting the `ignore_nodata` flag to `false` takes no-data values into account and the array values are reduced pairwise according to the following truth table:\n\n```\n || no-data | false | true\n------- || ------- | ------- | ----\nno-data || no-data | no-data | true\nfalse || no-data | false | true\ntrue || true | true | true\n```\n\n**Remark:** The process evaluates all values from the first to the last element and stops once the outcome is unambiguous. A result is ambiguous unless a value is `true`.",
"description": "Checks if **any** (i.e. at least one) value in `data` is `true`. If no value is given (i.e. the array is empty) the process returns the no-data value (or `null`).\n\nBy default all no-data values are ignored so that the process returns the no-data value (or `null`) if all values are no-data, `true` if at least one value is true and `false` otherwise. Setting the `ignore_nodata` flag to `false` takes no-data values into account and the array values are reduced pairwise according to the following truth table:\n\n```\n || no-data | false | true\n------- || ------- | ------- | ----\nno-data || no-data | no-data | true\nfalse || no-data | false | true\ntrue || true | true | true\n```\n\n**Remark:** The process evaluates all values from the first to the last element and stops once the outcome is unambiguous. A result is ambiguous unless a value is `true`.",
"categories": [
"logic",
"reducer"
Expand Down
2 changes: 1 addition & 1 deletion arccos.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arccos",
"summary": "Inverse cosine",
"description": "Computes the arc cosine of `x`. The arc cosine is the inverse function of the cosine so that *`arccos(cos(x)) = x`*.\n\nWorks on radians only.\nNo-data values are passed through and therefore get propagated. `NaN` is returned for values outside of the allowed range.",
"description": "Computes the arc cosine of `x`. The arc cosine is the inverse function of the cosine so that *`arccos(cos(x)) = x`*.\n\nWorks on radians only.\nNo-data values are passed through. `NaN` is returned for values < -1 and > 1.",
"categories": [
"math > trigonometric"
],
Expand Down
2 changes: 1 addition & 1 deletion arcosh.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arcosh",
"summary": "Inverse hyperbolic cosine",
"description": "Computes the inverse hyperbolic cosine of `x`. It is the inverse function of the hyperbolic cosine so that *`arcosh(cosh(x)) = x`*.\n\nNo-data values are passed through and therefore get propagated. `NaN` is returned for values outside of the allowed range.",
"description": "Computes the inverse hyperbolic cosine of `x`. It is the inverse function of the hyperbolic cosine so that *`arcosh(cosh(x)) = x`*.\n\nNo-data values are passed through. `NaN` is returned for values outside of the allowed range.",
"categories": [
"math > trigonometric"
],
Expand Down
2 changes: 1 addition & 1 deletion arcsin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arcsin",
"summary": "Inverse sine",
"description": "Computes the arc sine of `x`. The arc sine is the inverse function of the sine so that *`arcsin(sin(x)) = x`*.\n\nWorks on radians only.\nNo-data values are passed through and therefore get propagated. `NaN` is returned for values < -1 and > 1.",
"description": "Computes the arc sine of `x`. The arc sine is the inverse function of the sine so that *`arcsin(sin(x)) = x`*.\n\nWorks on radians only.\nNo-data values are passed through. `NaN` is returned for values < -1 and > 1.",
"categories": [
"math > trigonometric"
],
Expand Down
2 changes: 1 addition & 1 deletion arctan.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arctan",
"summary": "Inverse tangent",
"description": "Computes the arc tangent of `x`. The arc tangent is the inverse function of the tangent so that *`arctan(tan(x)) = x`*.\n\nWorks on radians only.\nNo-data values are passed through and therefore get propagated.",
"description": "Computes the arc tangent of `x`. The arc tangent is the inverse function of the tangent so that *`arctan(tan(x)) = x`*.\n\nWorks on radians only.\nNo-data values are passed through.",
"categories": [
"math > trigonometric"
],
Expand Down
4 changes: 2 additions & 2 deletions array_find.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "array_find",
"summary": "Get the index for a value in an array",
"description": "Returns the zero-based index of the first (or last) occurrence of the value specified by `value` in the array specified by `data` or `null` if there is no match. Use the parameter `reverse` to switch from the first to the last match.\n\n**Remarks:**\n\n* Use ``array_contains()`` to check if an array contains a value regardless of the position.\n* Use ``array_find_label()`` to find the index for a label.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. A no-data return value from ``eq()`` is handled as `false` (no match).\n* Data types MUST be checked strictly. For example, a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating-point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating-point numbers due to floating-point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.\n* If the specified value is an array, object or null, the process always returns `null`. See the examples to find no-data values.",
"description": "Returns the zero-based index of the first (or last) occurrence of the value specified by `value` in the array specified by `data` or the no-data value (or `null`) if there is no match. Use the parameter `reverse` to switch from the first to the last match.\n\n**Remarks:**\n\n* Use ``array_contains()`` to check if an array contains a value regardless of the position.\n* Use ``array_find_label()`` to find the index for a label.\n* All definitions for the process ``eq()`` regarding the comparison of values apply here as well. A no-data return value from ``eq()`` is handled as `false` (no match).\n* Data types MUST be checked strictly. For example, a string with the content *1* is not equal to the number *1*.\n* An integer *1* is equal to a floating-point number *1.0* as `integer` is a sub-type of `number`. Still, this process may return unexpectedly `false` when comparing floating-point numbers due to floating-point inaccuracy in machine-based computation.\n* Temporal strings are treated as normal strings and MUST NOT be interpreted.\n* If the specified value is an array, object or null, the process always returns the no-data value (or `null`). See the examples to find no-data values.",
"categories": [
"arrays",
"reducer"
Expand Down Expand Up @@ -35,7 +35,7 @@
}
],
"returns": {
"description": "The index of the first element with the specified value. If no element was found, `null` is returned.",
"description": "The index of the first element with the specified value. If no element was found, the no-data value (or `null`) is returned.",
"schema": [
{
"type": "null"
Expand Down
2 changes: 1 addition & 1 deletion arsinh.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arsinh",
"summary": "Inverse hyperbolic sine",
"description": "Computes the inverse hyperbolic sine of `x`. It is the inverse function of the hyperbolic sine so that *`arsinh(sinh(x)) = x`*.\n\nNo-data values are passed through and therefore get propagated.",
"description": "Computes the inverse hyperbolic sine of `x`. It is the inverse function of the hyperbolic sine so that *`arsinh(sinh(x)) = x`*.\n\nNo-data values are passed through.",
"categories": [
"math > trigonometric"
],
Expand Down
2 changes: 1 addition & 1 deletion artanh.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "artanh",
"summary": "Inverse hyperbolic tangent",
"description": "Computes the inverse hyperbolic tangent of `x`. It is the inverse function of the hyperbolic tangent so that *`artanh(tanh(x)) = x`*.\n\nNo-data values are passed through and therefore get propagated. `NaN` is returned for values outside of the allowed range. The computations follow [IEEE Standard 754](https://ieeexplore.ieee.org/document/8766229) whenever the processing environment supports it. Therefore, `x` = 1 results in +infinity and `x` = 0 results in -infinity. Otherwise, an exception is thrown.",
"description": "Computes the inverse hyperbolic tangent of `x`. It is the inverse function of the hyperbolic tangent so that *`artanh(tanh(x)) = x`*.\n\nNo-data values are passed through. `NaN` is returned for values outside of the allowed range. The computations follow [IEEE Standard 754](https://ieeexplore.ieee.org/document/8766229) whenever the processing environment supports it. Therefore, `x` = 1 results in +infinity and `x` = 0 results in -infinity. Otherwise, an exception is thrown.",
"categories": [
"math > trigonometric"
],
Expand Down
2 changes: 1 addition & 1 deletion between.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"parameters": [
{
"name": "x",
"description": "The value to check.\n\nNo-data values are passed through and therefore get propagated.",
"description": "The value to check.\n\nNo-data values are passed through.",
"schema": {
"description": "Any data type is allowed."
}
Expand Down
2 changes: 1 addition & 1 deletion ceil.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "ceil",
"summary": "Round fractions up",
"description": "The least integer greater than or equal to the number `x`.\n\nNo-data values are passed through and therefore get propagated.",
"description": "The least integer greater than or equal to the number `x`.\n\nNo-data values are passed through.",
"categories": [
"math > rounding"
],
Expand Down
2 changes: 1 addition & 1 deletion clip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "clip",
"summary": "Clip a value between a minimum and a maximum",
"description": "Clips a number between specified minimum and maximum values. A value larger than the maximum value is set to the maximum value, a value lower than the minimum value is set to the minimum value. If the maximum value is smaller than the minimum number, the process throws a `MinMaxSwapped` exception.\n\nNo-data values are passed through and therefore get propagated.",
"description": "Clips a number between specified minimum and maximum values. A value larger than the maximum value is set to the maximum value, a value lower than the minimum value is set to the minimum value. If the maximum value is smaller than the minimum number, the process throws a `MinMaxSwapped` exception.\n\nNo-data values are passed through.",
"categories": [
"math"
],
Expand Down
2 changes: 1 addition & 1 deletion cos.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "cos",
"summary": "Cosine",
"description": "Computes the cosine of `x`.\n\nWorks on radians only.\nNo-data values are passed through and therefore get propagated.",
"description": "Computes the cosine of `x`.\n\nWorks on radians only.\nNo-data values are passed through.",
"categories": [
"math > trigonometric"
],
Expand Down
2 changes: 1 addition & 1 deletion cosh.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "cosh",
"summary": "Hyperbolic cosine",
"description": "Computes the hyperbolic cosine of `x`.\n\nNo-data values are passed through and therefore get propagated.",
"description": "Computes the hyperbolic cosine of `x`.\n\nNo-data values are passed through.",
"categories": [
"math > trigonometric"
],
Expand Down
2 changes: 1 addition & 1 deletion exp.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "exp",
"summary": "Exponentiation to the base e",
"description": "Exponential function to the base *e* raised to the power of `p`.\n\nNo-data values are passed through and therefore get propagated.",
"description": "Exponential function to the base *e* raised to the power of `p`.\n\nNo-data values are passed through.",
"categories": [
"math > exponential & logarithmic"
],
Expand Down
2 changes: 1 addition & 1 deletion floor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "floor",
"summary": "Round fractions down",
"description": "The greatest integer less than or equal to the number `x`.\n\nThis process is *not* an alias for the ``int()`` process as defined by some mathematicians, see the examples for negative numbers in both processes for differences.\n\nNo-data values are passed through and therefore get propagated.",
"description": "The greatest integer less than or equal to the number `x`.\n\nThis process is *not* an alias for the ``int()`` process as defined by some mathematicians, see the examples for negative numbers in both processes for differences.\n\nNo-data values are passed through.",
"categories": [
"math > rounding"
],
Expand Down
2 changes: 1 addition & 1 deletion int.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "int",
"summary": "Integer part of a number",
"description": "The integer part of the real number `x`.\n\nThis process is *not* an alias for the ``floor()`` process as defined by some mathematicians, see the examples for negative numbers in both processes for differences.\n\nNo-data values are passed through and therefore get propagated.",
"description": "The integer part of the real number `x`.\n\nThis process is *not* an alias for the ``floor()`` process as defined by some mathematicians, see the examples for negative numbers in both processes for differences.\n\nNo-data values are passed through.",
"categories": [
"math",
"math > rounding"
Expand Down
2 changes: 1 addition & 1 deletion linear_scale_range.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "linear_scale_range",
"summary": "Linear transformation between two ranges",
"description": "Performs a linear transformation between the input and output range.\n\nThe given number in `x` is clipped to the bounds specified in `inputMin` and `inputMax` so that the underlying formula *`((x - inputMin) / (inputMax - inputMin)) * (outputMax - outputMin) + outputMin`* never returns a value outside of the range defined by `outputMin` and `outputMax`.\n\nPotential use case include\n\n* scaling values to the 8-bit range (0 - 255) often used for numeric representation of values in one of the channels of the [RGB colour model](https://en.wikipedia.org/wiki/RGB_color_model#Numeric_representations) or\n* calculating percentages (0 - 100).\n\nNo-data values are passed through and therefore get propagated.",
"description": "Performs a linear transformation between the input and output range.\n\nThe given number in `x` is clipped to the bounds specified in `inputMin` and `inputMax` so that the underlying formula *`((x - inputMin) / (inputMax - inputMin)) * (outputMax - outputMin) + outputMin`* never returns a value outside of the range defined by `outputMin` and `outputMax`.\n\nPotential use case include\n\n* scaling values to the 8-bit range (0 - 255) often used for numeric representation of values in one of the channels of the [RGB colour model](https://en.wikipedia.org/wiki/RGB_color_model#Numeric_representations) or\n* calculating percentages (0 - 100).\n\nNo-data values are passed through.",
"categories": [
"math"
],
Expand Down
2 changes: 1 addition & 1 deletion ln.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "ln",
"summary": "Natural logarithm",
"description": "The natural logarithm is the logarithm to the base *e* of the number `x`, which equals to using the *log* process with the base set to *e*. The natural logarithm is the inverse function of taking *e* to the power x.\n\nNo-data values are passed through and therefore get propagated.\n\nThe computations follow [IEEE Standard 754](https://ieeexplore.ieee.org/document/8766229) whenever the processing environment supports it. Therefore, *`ln(0)`* results in -infinity if the processing environment supports it or otherwise an exception is thrown. `NaN` is returned for values outside of the allowed range.",
"description": "The natural logarithm is the logarithm to the base *e* of the number `x`, which equals to using the *log* process with the base set to *e*. The natural logarithm is the inverse function of taking *e* to the power x.\n\nNo-data values are passed through.\n\nThe computations follow [IEEE Standard 754](https://ieeexplore.ieee.org/document/8766229) whenever the processing environment supports it. Therefore, *`ln(0)`* results in -infinity if the processing environment supports it or otherwise an exception is thrown. `NaN` is returned for values outside of the allowed range.",
"categories": [
"math > exponential & logarithmic"
],
Expand Down
1 change: 1 addition & 0 deletions meta/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ In the context of data cube operations (e.g. in `reduce_dimension`), `null` valu
by the array processes shall be replaced with the no-data value of the data cube.
As the processes may be used outside of data cubes where the no-data values are undefined,
most processes fall back to `null` in this case (reflected through the mention of "(or `null`)" in the process description).
This effectively means that `null` is the default value for an undefined no-data value in openEO.

## Optimizations for conditions (e.g. `if`)

Expand Down
2 changes: 1 addition & 1 deletion not.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "not",
"summary": "Inverting a boolean",
"description": "Inverts a single boolean so that `true` gets `false` and `false` gets `true`.\n\nNo-data values are passed through and therefore get propagated.",
"description": "Inverts a single boolean so that `true` gets `false` and `false` gets `true`.\n\nNo-data values are passed through.",
"categories": [
"logic"
],
Expand Down
Loading

0 comments on commit 281584a

Please sign in to comment.