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

Convert AWIPS 2 Color Table for use with Python #3524

Open
DirkMPetersen opened this issue May 31, 2024 · 1 comment
Open

Convert AWIPS 2 Color Table for use with Python #3524

DirkMPetersen opened this issue May 31, 2024 · 1 comment
Labels
Type: Feature New functionality

Comments

@DirkMPetersen
Copy link

DirkMPetersen commented May 31, 2024

What should we add?

Hello!

Creating color curves in Python can be rather cumbersome, and often use AWIPS 2 at work to visualize meteorological data. I wrote a short script that takes color curves pulled from the AWIPS directory and converts them to R G B A .txt files that Python can use. AWIPS often saves these color curves in batches of 256 lines so they tend to be broken up in that way (just something to keep in mind. Hopefully, this can help beef up the repository of MetPy color curves, as making them in AWIPS is much easier than creating them by hand in a text editor or in code :)

Here is an example file pulled from the Unidata version of AWIPS 2

colormap_convert.txt

@DirkMPetersen DirkMPetersen added the Type: Feature New functionality label May 31, 2024
@DirkMPetersen
Copy link
Author

DirkMPetersen commented May 31, 2024

I should also note that this works regardless of the order of R G B and A values, as long as they are labelled. For some reason, I found some were in a backward order within the line, listing A B G R instead. Additionally, AWIPS can very how it plots data to scale uniformly or logarithmically, which can cause the color curves to be called either too quickly or not quickly enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New functionality
Projects
None yet
Development

No branches or pull requests

1 participant