def __preprocess_image(self, sensor):
        image = sensor.image
        if self.sensor.log_scale:
            image = image.log10()
        # clamp bands to specified water range
        for b in sensor.band_names:
            if 'range' in sensor.water_distributions[b]:
                other_bands = list(sensor.band_names)
                other_bands.remove(b)
                r     = sensor.water_distributions[b]['range']
                image = image.select([b], [b]).clamp(r[0], r[1]).addBands(image.select(other_bands, other_bands))
        return image
dataset/ETHPy150Open nasa/CrisisMappingToolkit/cmt/radar/histogram.py/RadarHistogram.__preprocess_image/original