MCPcopy
hub / github.com/google/earthengine-api / normalizedDifference

Method normalizedDifference

python/ee/image.py:2981–3006  ·  view source on GitHub ↗

Computes the normalized difference between two bands. If the bands to use are not specified, uses the first two bands. The normalized difference is computed as (first − second) / (first + second). Note that the returned image band name is 'nd', the input image properties are not ret

(
      self,
      # pylint: disable-next=invalid-name
      bandNames: _arg_types.Any | None = None,
  )

Source from the content-addressed store, hash-verified

2979 return apifunction.ApiFunction.call_(self.name() + '.neq', self, image2)
2980
2981 def normalizedDifference(
2982 self,
2983 # pylint: disable-next=invalid-name
2984 bandNames: _arg_types.Any | None = None,
2985 ) -> Image:
2986 """Computes the normalized difference between two bands.
2987
2988 If the bands to use are not specified, uses the first two bands. The
2989 normalized difference is computed as (first − second) / (first + second).
2990 Note that the returned image band name is 'nd', the input image properties
2991 are not retained in the output image, and a negative pixel value in either
2992 input band will cause the output pixel to be masked. To avoid masking
2993 negative input values, use `ee.Image.expression()` to compute normalized
2994 difference.
2995
2996 Args:
2997 bandNames: A list of names specifying the bands to use. If not specified,
2998 the first and second bands are used.
2999
3000 Returns:
3001 An ee.Image.
3002 """
3003
3004 return apifunction.ApiFunction.call_(
3005 self.name() + '.normalizedDifference', self, bandNames
3006 )
3007
3008 def Not(self) -> Image:
3009 """Returns 0 if the input is non-zero, and 1 otherwise."""

Callers 11

AsyncInspector.jsFile · 0.80
HoughTransform.jsFile · 0.80
QualityMosaic.jsFile · 0.80
cloudScoreFunction · 0.80
addNDVIFunction · 0.80

Calls 2

nameMethod · 0.95
call_Method · 0.80

Tested by 1