-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parameterised composite naming #2644
Comments
Another case like this would be different resolutions of dependencies going into a composite (I'm a user and I want this composite to use the 500m band 2 even though the 250m band 2 is available) or even the "corrections" applied to those individual dependencies. Theoretically this situation is supposed to be covered by the ability to specify "modifiers" scn.load([DataQuery(name="my_rgb", modifiers=("sunz_corrected",))]) But I don't think this works in any sense because the RGB doesn't have those corrections/modifiers, its dependencies do. And there are some composites where corrections only apply to some dependencies (ex. rayleigh doesn't make sense for certain wavelengths) so it is "accurate" to say that a composite is "rayleigh_corrected" if it isn't applied to all inputs? So back to theory: I'm not saying the above is the best solution and it doesn't handle all cases (described below), but it gives us a way forward. I think theoretically (yep, I'm using that word again) with a few code updates in the dependency tree and composite YAML loading stuff you'd be able to do the above line of code and have variants of the composite defined in the YAML with a Cases not handled: In the best case users would be able to customize low-level kwargs like sunz correction angle thresholds. With the above suggestion you'd have to have a different defined modifier in YAML for each variation you want to support (88 degrees, 90 degrees, 92 degrees, etc). One other complication: I forget what the Scene (or rather the DatasetDict) does when you request a generic product name (ex. "C01") but there exists modified version and unmodified versions in the same collection/Scene. Like if there's C01 with no modifiers, C01 with sunz, and C01 with sunz + rayleigh and you say |
Feature Request
Is your feature request related to a problem? Please describe.
Several composites in Satpy exist in several variants with labels such as "raw", "corrected", or "uncorrected" attached to the name. Some examples:
satpy/satpy/etc/composites/vii.yaml
Line 26 in 5ecf1ab
(this one nevertheless has
sza_correction
enabled)satpy/satpy/etc/composites/fci.yaml
Line 70 in 5ecf1ab
satpy/satpy/etc/composites/fci.yaml
Line 81 in 5ecf1ab
satpy/satpy/etc/composites/fci.yaml
Line 92 in 5ecf1ab
satpy/satpy/etc/composites/ahi.yaml
Line 296 in 5ecf1ab
satpy/satpy/etc/composites/visir.yaml
Line 221 in 5ecf1ab
Some problems with this approach:
true_color_reproduction
is different from bothtrue_color_reproduction_uncorr
andtrue_color_reproduction_corr
.true_color_uncorrected
the same astrue_color_nocorr
?There are several corrections or modifications that might be applied to composites, so "uncorrected" or "corrected" is inherently ambiguous. Does this refer to Rayleigh correction, hybrid green correction, SZA correction, limb correction? Naively, one might think that "uncorrected" means none of those corrections have been applied, but as the
true_color_uncorrected
above shows, this is not the case. And even then, "uncorrected" is about as meaningful as an "unfiltered" photo (looking at you, Instagram™), in that there is no such thing as an uncorrected satellite image when we use L1.5 data as input.Describe the solution you'd like
I'm not sure what the best solution would look like exactly, but maybe we need a way to load parameterised composites, such that the user can do:
or maybe using DataIDs is better:
and then Satpy would use a well-defined and well-documented system to find the corresponding YAML definitions.
The unparameterised versions such as a basic
.load(["true_color"])
would map to defined default parameters, just like today.Describe any changes to existing user workflow
Existing names would map to specific definitions that would be identical to the status quo, so backward compatibility can be maintained.
Additional context
In the documentation, we could then automatically generate all composite combinations with their definitions, so that it's transparent for users what's going on.
The text was updated successfully, but these errors were encountered: