geetools.Image.ImageAccessor.repeat#

geetools.Image.ImageAccessor.repeat(band, repeats)#

Repeat a band of the image.

Parameters:
  • band – The band to repeat

  • repeats (geetools.types.ee_int) – The number of times to repeat the band

Returns:

The image with the band repeated

Return type:

ee.image

Examples

import ee, geetools

ee.Initialize()

image = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED").first()
image = image.geetools.repeat('B1', 2)
print(image.bandNames().getInfo())