GenericMappingTools / gmt

The Generic Mapping Tools
https://www.generic-mapping-tools.org
Other
843 stars 352 forks source link

Scientific color map (cpt) files are incorrect #3640

Closed MarkWieczorek closed 4 years ago

MarkWieczorek commented 4 years ago

The scientific color maps that are provided as cpt files with gmt do not represent the original color maps created by Fabio Crameri. This is easily verified by looking at the colorbars in the gmt documentation and on his web site.

As an example, here are the relevant color bars for ‘Vik’

from gmt:

Screen Shot 2020-07-09 at 23 29 43

And from Fabio Crameri's web site

Screen Shot 2020-07-09 at 23 29 34

I have verified that this issue is not simply something simple like a conversion from RGB to CYM

welcome[bot] commented 4 years ago

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!

Please make sure you read our Contributing Guide and abide by our Code of Conduct.

PaulWessel commented 4 years ago

What happened is that Fabio has updated his colormaps and we have not thought of a mechanism for us to learn this, hence we are a few versions behind. I am working on a PR now that will bring us up to the latest 6.0.4 released in June. However, what you see above is actual changes in the RGB values in vik.cpt due to his revisions. Maybe @seisman can think of a way for us to learn that his site has been updated and alert us (e.g, a CI job running once a week or moth?)

seisman commented 4 years ago

Maybe @seisman can think of a way for us to learn that his site has been updated and alert us (e.g, a CI job running once a week or moth?)

It's doable. Please leave this issue open even after you fix it, so that I won't forget it.

PaulWessel commented 4 years ago

OK, I've emailed Fabio to see if he as some sort of notifications (email list) or if there is a particular ascii or html file we could curl and grep on in a CI.

MarkWieczorek commented 4 years ago

It appears that Fabio's colormaps have not been updated in GMT 6.1.1 (macOS, installed via brew). My maps are still being plotted with the old washed out colors as in the original post.

PaulWessel commented 4 years ago

Yes, unfortunately it looks like those were not merged back to the 6.1 branch. They were fixed in master only. We wrote scripts to automate lots of these steps so that we will be notified when Fabio changes anything, but we forgot to merge those changes back to 6.1. Sorry.

seisman commented 4 years ago

Yes, PR #3649 did many things, so we decided not to backport that PR into 6.1 branch.

@MarkWieczorek A workaround for you is to download the CPT files in the master branch (https://github.com/GenericMappingTools/gmt/tree/master/share/cpt) and override the CPT files from GMT 6.1.1.

joa-quim commented 4 years ago

Well, they were not GMT bugs.

MarkWieczorek commented 4 years ago

Yes, PR #3649 did many things, so we decided not to backport that PR into 6.1 branch.

@MarkWieczorek A workaround for you is to download the CPT files in the master branch (https://github.com/GenericMappingTools/gmt/tree/master/share/cpt) and override the CPT files from GMT 6.1.1.

No problem. I can wait until 6.2.0 comes out. The only reason I caught this is that I have a notebook that compares projections using pygmt and Cartopy.