Last active
August 29, 2015 14:07
-
-
Save mraspaud/e4a623e417d01970aacf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ir108_temp(self): | |
"""Make a black and white image of the IR 10.8um channel, with | |
information to retreive the brightnesse temperature. | |
""" | |
self.check_channels(10.8) | |
img = geo_image.GeoImage(self[10.8].data, | |
self.area, | |
self.time_slot, | |
fill_value=0, | |
mode="L") | |
img.crude_stretch(0) | |
offset = self[10.8].data.max() | |
scale = (self[10.8].data.min() - self[10.8].data.max()) / 255.0 | |
img.invert() | |
tags = {"scale": str(scale), "offset": str(offset)} | |
img.tags.update(tags) | |
return img | |
ir108_temp.prerequisites = set([10.8]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment