You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue could be either here or in trollimage, as it affects both projects. I'm putting it here because the problem is more apparently in Satpy, however, the solution will probably be primarily in trollimage.
Feature Request
Is your feature request related to a problem? Please describe.
There are at least three different places in Pytroll where colormaps are created:
in the staticmethod satpy.composites.ColormapCompositor.build_colormap
The latter even duplicates some lines from Satpy verbatim.
This split makes the functionality hard to find and hard to maintain.
Describe the solution you'd like
I would like one centralised place for colormap creation, probably as classmethods under trollimage.colormap.Colormap. All other interfaces will be deprecated and will just call the trollimage one, or be thin layers that extract colormaps (for example, from an auxiliary variable) and pass them on to trollimage.
Describe any changes to existing user workflow
We would deprecate some of the existing satpy interfaces as far as they're not handling satpy-specific API, but maintain backward compatibility for the time being.
Additional context
I ran into this while working on #1844, for which I want to create a colormap from an auxiliary data variable read from a file. This is currently implemented in satpy.composites, but not convenient to use in an enhancement. Rather than duplicating the code in satpy.enhancements, we should have a more flexible colormap creation in trollimage and then only a thin shell in Satpy (the part that deals with extracting the colormap data from the auxiliary variable).
The text was updated successfully, but these errors were encountered:
This issue could be either here or in trollimage, as it affects both projects. I'm putting it here because the problem is more apparently in Satpy, however, the solution will probably be primarily in trollimage.
Feature Request
Is your feature request related to a problem? Please describe.
There are at least three different places in Pytroll where colormaps are created:
satpy.composites.ColormapCompositor.build_colormap
satpy/satpy/composites/__init__.py
Lines 521 to 565 in a040a25
satpy.enhancements.create_colormap
:satpy/satpy/enhancements/__init__.py
Lines 358 to 460 in a040a25
trollimage.colormap.Colormap.from_file
:https://github.com/pytroll/trollimage/blob/75e2e8d7967f75a146fe56b48fde9999502b2b67/trollimage/colormap.py#L399-L460
The latter even duplicates some lines from Satpy verbatim.
This split makes the functionality hard to find and hard to maintain.
Describe the solution you'd like
I would like one centralised place for colormap creation, probably as classmethods under
trollimage.colormap.Colormap
. All other interfaces will be deprecated and will just call the trollimage one, or be thin layers that extract colormaps (for example, from an auxiliary variable) and pass them on to trollimage.Describe any changes to existing user workflow
We would deprecate some of the existing satpy interfaces as far as they're not handling satpy-specific API, but maintain backward compatibility for the time being.
Additional context
I ran into this while working on #1844, for which I want to create a colormap from an auxiliary data variable read from a file. This is currently implemented in
satpy.composites
, but not convenient to use in an enhancement. Rather than duplicating the code insatpy.enhancements
, we should have a more flexible colormap creation in trollimage and then only a thin shell in Satpy (the part that deals with extracting the colormap data from the auxiliary variable).The text was updated successfully, but these errors were encountered: