From 1a1c8e8ca5e43b409b4c7b13c4569ba36290ec25 Mon Sep 17 00:00:00 2001 From: "Wieland, Marc" Date: Tue, 19 Nov 2024 16:50:03 +0100 Subject: [PATCH] updated readme example --- README.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8ba82f6..491a457 100755 --- a/README.md +++ b/README.md @@ -32,23 +32,14 @@ from ukis_pysat.raster import Image, Platform # read Level-1C image from file, convert digital numbers to TOA reflectance # and make sure resolution is 30 m to get best performance +# NOTE: band_order must match the order of bands in the input image. it does not have to be in this explicit order. band_order = ["blue", "green", "red", "nir", "swir16", "swir22"] img = Image(data="sentinel2.tif", dimorder="last") img.dn2toa(platform=Platform.Sentinel2, wavelength=band_order) -img.warp( - resampling_method=0, - resolution=30, - dst_crs=img.dataset.crs -) +img.warp(resampling_method=0,resolution=30,dst_crs=img.dataset.crs) # compute cloud and cloud shadow mask -# NOTE: band_order must match the order of bands in the input image. it does not have to be in this explicit order. -# make sure to use these six spectral bands to get best performance -csmask = CSmask( - img=img.arr, - band_order=band_order, - nodata_value=0, -) +csmask = CSmask(img=img.arr, product_level="l1c", band_order=band_order, nodata_value=0) # access cloud and cloud shadow mask csmask_csm = csmask.csm