pytroll / pytroll-examples

Collection of examples for pytroll satellite data processing
GNU General Public License v3.0
76 stars 34 forks source link

Sentinel-1 false color composite #1

Closed mitkin closed 7 years ago

mitkin commented 7 years ago

PR for Sentinel false color composite.

There are some issues I experience now:

djhoese commented 7 years ago

When things get "complicated" like this you have to go an extra step to specify what you want. I believe when you use the keywords during loading the way you have that it finds the first and "best" match it can find. To get what you want, you could try:

from satpy import DatasetID
scn.load([DatasetID(name='measurement', polarization='hh'), DatasetID(name='measurement', polarization='hv')])

You may want to create these IDs before so that you can use them to retrieve the datasets later scn[ds1]. Could you also please change your Scene import to from satpy import Scene. I'd like the most generic versions of the imports to be used in examples.

mitkin commented 7 years ago

@davidh-ssec ok, thanks! Specifying datasets explicitly works fine.

mitkin commented 7 years ago

@mraspaud @davidh-ssec ready to merge?

djhoese commented 7 years ago

I know @mraspaud merged this already, but maybe we should consider making all examples use reader and filenames keyword arguments to the Scene instead of the "discovery" keyword arguments. Especially since the latter will be separate in to its own function in the near future.

mitkin commented 7 years ago

@davidh-ssec , yeah, that would be my preference actually. This is exactly what I wanted to put in the example, but reading the data like Scene(reader='safe_sar_c', filenames=filelist) where a single file name in the filelist is the full path to a folder like S1A_EW_GRDM_1SDH_20170830T174814_20170830T174914_018156_01E80F_29CF.SAFE will not find supported files. I wish I had more time to dig into it right now, but it will have to wait a little.