Last active
February 25, 2020 10:26
-
-
Save mraspaud/ab4060cd5074ef5d20100634d02dc4f4 to your computer and use it in GitHub Desktop.
Sand over canaries with sentinel 3
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
from datetime import datetime | |
from satpy import Scene, find_files_and_readers | |
if __name__ == '__main__': | |
files = find_files_and_readers(start_time=datetime(2020, 2, 22, 11, 0), | |
end_time=datetime(2020, 2, 22, 12, 0), | |
base_dir="/data/Sentinel-3/", | |
reader='olci_l1b') | |
scn = Scene(filenames=files) | |
composite = 'true_color' | |
scn.load([composite]) | |
scn.show(composite) | |
scn.save_dataset(composite, filename="sand.png") |
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
# credits @simonrp84 | |
from satpy import Scene, find_files_and_readers | |
from glob import glob | |
from datetime import datetime | |
import numpy as np | |
files = find_files_and_readers(start_time=datetime(2020, 2, 22, 11, 0), | |
end_time=datetime(2020, 2, 22, 11, 15), | |
base_dir='/data/Sentinel-3/SLSTR/', | |
reader='slstr_l1b') | |
scn = Scene(files, reader='slstr_l1b') | |
scn.load(['natural_color', 'natural_color_oblique']) | |
scn2 = scn.resample(scn['natural_color'].area) | |
scn2.save_dataset('natural_color', filename='SLSTR_Nadir_Sand.png') | |
scn2.save_dataset('natural_color_oblique', filename='SLSTR_Oblique_Sand.png') |
Author
mraspaud
commented
Feb 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment