Skip to content

Commit 1a1c8e8

Browse files
committed
updated readme example
1 parent 081c06e commit 1a1c8e8

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

README.md

+3-12
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,14 @@ from ukis_pysat.raster import Image, Platform
3232

3333
# read Level-1C image from file, convert digital numbers to TOA reflectance
3434
# and make sure resolution is 30 m to get best performance
35+
# NOTE: band_order must match the order of bands in the input image. it does not have to be in this explicit order.
3536
band_order = ["blue", "green", "red", "nir", "swir16", "swir22"]
3637
img = Image(data="sentinel2.tif", dimorder="last")
3738
img.dn2toa(platform=Platform.Sentinel2, wavelength=band_order)
38-
img.warp(
39-
resampling_method=0,
40-
resolution=30,
41-
dst_crs=img.dataset.crs
42-
)
39+
img.warp(resampling_method=0,resolution=30,dst_crs=img.dataset.crs)
4340

4441
# compute cloud and cloud shadow mask
45-
# NOTE: band_order must match the order of bands in the input image. it does not have to be in this explicit order.
46-
# make sure to use these six spectral bands to get best performance
47-
csmask = CSmask(
48-
img=img.arr,
49-
band_order=band_order,
50-
nodata_value=0,
51-
)
42+
csmask = CSmask(img=img.arr, product_level="l1c", band_order=band_order, nodata_value=0)
5243

5344
# access cloud and cloud shadow mask
5445
csmask_csm = csmask.csm

0 commit comments

Comments
 (0)