viz.plot_cloud_pair
viz.plot_cloud_pair(
name,
arr,
descs,
intensity_band,
qa_band,
decode_qa,
class_names=None,
)Three-panel cloud diagnostic: imagery / raw QA / decoded mask.
The leftmost panel renders intensity_band percentile-stretched so you can see what was actually captured. The middle panel shows the raw QA band as a categorical colour map so you can see the class structure. The rightmost panel shows the boolean mask produced by decode_qa(qa) (typically :func:decode_scl or :func:decode_bqa) with the percent of masked pixels in the title.
class_names maps integer QA codes to labels. When given (and by default for Sentinel-2 SCL), the middle panel gets a legend of the classes present in the scene, each marked “masked” if decode_qa flags it.
Returns the decoded mask so the caller can downstream-use it without re-running the decoder.