Skip to content
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

Default name and modifiers properties for modifiers #2334

Open
BENR0 opened this issue Dec 20, 2022 · 2 comments
Open

Default name and modifiers properties for modifiers #2334

BENR0 opened this issue Dec 20, 2022 · 2 comments
Labels
component:compositors enhancement code enhancements, features, improvements

Comments

@BENR0
Copy link
Collaborator

BENR0 commented Dec 20, 2022

Feature Request

Even though manual application of a modifier for example the SunZenithCorrector might be an unusual use case, the name and modifiers init kwargs should be set by default for modifiers (normally these get set during loading from the yaml configs) . This would make attributes more consistent.

Currently this has to be set by the user like so:

from satpy.modifiers import SunZenithCorrector

szen_corrector = SunZenithCorrector(name="szen_corrector", modifiers=("sunz_corrected",))

Ideally the user can just initialize it like this (also because the above behaviour is not documented)

szen_corrector = SunZenithCorrector()

Describe any changes to existing user workflow
As far as I can see there are not changes.

@djhoese
Copy link
Member

djhoese commented Dec 20, 2022

Sounds good to me. I'm sure there will be annoying edge cases, but this seems like it would be going in the right direction. I also assume that modifiers[0] should be equal to the value of name right? That should maybe be checked in the __init__.

@djhoese djhoese added enhancement code enhancements, features, improvements component:compositors labels Dec 20, 2022
@BENR0
Copy link
Collaborator Author

BENR0 commented Dec 20, 2022

Ok I will make a PR then. Should be straight forward I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:compositors enhancement code enhancements, features, improvements
Projects
None yet
Development

No branches or pull requests

2 participants