-
Notifications
You must be signed in to change notification settings - Fork 15
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
Pass platform-dependent arguments to writer #107
Comments
NB, current configuration with sat_id appears confusing. I'm clarifying with NinJo developers what this actually means. |
Apparently, |
Hi @gerritholl, I am trying to pass start_time to decorate image with text. I tried to use your example above that is showing passing a collable. But I am getting this error:
Here is par of my PL:
I' ve so far tried few versions of
But I am still getting the same error. It seems that I am not getting the return value of my function. Can you please show example of how would trollflow2.plugins.get_sat_id that you mentioned look like? |
@nedelceo would you mind creating a new issue for this? I feel it belongs in it's own discussion thread :) |
I am sorry I forget about this problem for a while. I created #161 |
Feature Request
Is your feature request related to a problem? Please describe.
NinJoTIFF needs the satellite ID in the header. The NinJoTIFF writer needs the satellite ID as a keyword argument. The trollflow2
save_datasets
plugin needs to pass the satellite ID to the NinJoTIFF writer. The user needs to write this satellite ID in the trollflow2 configuration file. This is difficult if a single trollflow2 instance is used to process multiple satellites.Describe the solution you'd like
I would like that in
trollflow2.yaml
, there is a way for the value of at arbitrary keyword argument passed to a plugin to change depending on the satellite platform. Specifically, I need the value ofsat_id
passed to the writerninjotiff_nostretch
to depend on theplatform_name
.Some ways I can think of how this might be implemented.
Passing a callable:
trollflow2 would replace the value of
sat_id
by the result of the callable, which it calls using the same arguments it would call the writer.Configuring a translation table with a magic keyword:
when encountering the sentinel, trollflow2 translates the sat_id keyword.
Some other way:
There may be other ways I'm not thinking of.
Describe any changes to existing user workflow
This should be backward compatible.
Additional context
Other solutions, without changing anything in trollflow2:
The text was updated successfully, but these errors were encountered: