Math¶
Functions

Elementwise arc tangent of 

Elementwise cosine of an 

Elementwise natural log of an 

Elementwise base 2 log of an 

Elementwise base 10 log of an 

Normalized difference helper function for computing an index such as NDVI. 

Elementwise sine of an 

Elementwise square root of an 

Elementwise tangent of an 

arctan2
(y, x)[source]¶ Elementwise arc tangent of
y/x
choosing the quadrant correctly.The quadrant (i.e., branch) is chosen so that
arctan2(y, x)
is the signed angle in radians between the ray ending at the origin and passing through the point (1,0), and the ray ending at the origin and passing through the point (x, y). (Note the role reversal: the “ycoordinate” is the first function parameter, the “xcoordinate” is the second.) By IEEE convention, this function is defined for x = +/0 and for either or both of y and x = +/inf (see Notes for specific values). Parameters
 Returns
x – Angle(s) in radians, in the range
[pi, pi]
, of the type that results from broadcastingy
tox
, (exceptInt
is promoted toFloat
) Return type
Float, Image, ImageCollection
Notes
arctan2 is identical to the
atan2
function of the underlying C library. The following special values are defined in the C standard: 1y
x
arctan2(y,x)
+/ 0
+0
+/ 0
+/ 0
0
+/ pi
> 0
+/inf
+0 / +pi
< 0
+/inf
0 / pi
+/inf
+inf
+/ (pi/4)
+/inf
inf
+/ (3*pi/4)
Note that +0 and 0 are distinct floating point numbers, as are +inf and inf.
References
 1
ISO/IEC standard 9899:1999, “Programming language C.”

cos
(obj)[source]¶ Elementwise cosine of an
Image
orImageCollection
.

log
(obj)[source]¶ Elementwise natural log of an
Image
orImageCollection
.

log2
(obj)[source]¶ Elementwise base 2 log of an
Image
orImageCollection
.

log10
(obj)[source]¶ Elementwise base 10 log of an
Image
orImageCollection
.

normalized_difference
(x, y)[source]¶ Normalized difference helper function for computing an index such as NDVI.
Example
>>> import descarteslabs.workflows as wf >>> col = wf.ImageCollection.from_id("landsat:LC08:01:RT:TOAR") >>> nir, red = col.unpack_bands(["nir", "red"]) >>> ndvi = wf.normalized_difference(nir, red)

sin
(obj)[source]¶ Elementwise sine of an
Image
orImageCollection
.

sqrt
(obj)[source]¶ Elementwise square root of an
Image
orImageCollection
.