I am making a project in python for which I need to know the values like maximum radiance, minimum radiance, maximum pixel value, minimum pixel value from metadata for different bands from Sentinel 2 dataset. Could you please tell me the commands in snappy for the same.
You can get statistical information by call getStx() on a band.
band_b1 = product.getBand("B01)
stx = band_b1.getStx() // gives statistics on a coarse resolution
stx_accurate = band_b1.getStx(true, ProgressMonitor.NULL) // gives accurate statistics
median = stx.getMedian()
On this Stx object, you can call various methods like getMinimum(), getMaximum(), getMean()
.
See also the API Doc