-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update how CPT hinges are handled (#2416)
* Update how CPT hinges are done Separate between soft and hard hinges. Hard hinges are data driven like those for bathymetry or magnetics, while soft hinges are ignored unless +h[hinge] is given. * Updates so far - in progress * Add warning that +h cannot affect hard hinges * Update scripts and PS to show short and hard hinges * Update GMT_tut_17.ps * Update docs Explain soft and hard hinges * Add include files explaining CPT syntax for creation and use * Polish cpt docs * Fix handing of soft hinge assignment * Improve hinge documentationand CPT * Update list of CPTs to indicate hard or soft hinge * Update world.cpt * Update haxby.cpt * Turn wysiwig, haxby, no_green, and world into continuous CPTs Update a few PS files that changed. * Restrict CPT resampling to continuous CPTs We ban the resampling of discrete CPTs to another set of nodes. Only stretching of the range is allowed. * Allow colorlists to pass as discrete input CPT * Strengthening handling of color lists and categorical tables * Update std_opts_classic.rst typo * Add new CPT section on color-lists Adds a new script figure as well * Improve colorlist figure and discussion * Update features.rst * Check hinge and warn if outside data range (and ignore) * Add new CPT test for hinges * Update common_SYN_OPTs.rst_ * Update common_SYN_OPTs.rst_ * Deal with distcalc ref * Better reporting for hinge violations in CPTs * Allow slow or zhigh to equal hinge Not fully working yet. If hinge == zlow or hinge == zhigh we need to eliminate one entry in the resulting CPT (not done yet). * Update doc/rst/source/cookbook/features.rst Co-Authored-By: Dongdong Tian <[email protected]> * Update src/gmt_support.c Co-Authored-By: Dongdong Tian <[email protected]> * Update gmt_api.c * Improve GMT_colorlist.sh script to show options * Update gmt_api.c * Fix CPT stretching with hinges Needed to update tut 19 and its PS. * Fix discrete resampling of CPTs with hinges Trim the CPT if needed before resampling. * Address soft hinge and fix -T parsing check I had labeled a CPT with soft hinge as a hard hinge if +h was given, but it should stay a soft hinge internally. Also, add validation of possible modifiers for parse_array. * Fix print message in validate_cpt function * Leave user zmin/zmax selection as is * Add new test, update cpthinges to new behavior * Avoid freeing same array twice Co-authored-by: Dongdong Tian <[email protected]>
- Loading branch information
1 parent
8462336
commit b8106c1
Showing
76 changed files
with
683 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
**-C**\ [*cpt*\ \|\ *master*\ [**+h**\ [*hinge*]][**+i**\ *zinc*][**+u**\ \|\ **U**\ *unit*] \|\ *color1,color2*\ [,\ *color3*\ ,...]] | ||
Name of the CPT. If given a GMT Master soft-hinge CPT (see :ref:`Of Colors and Color Legends`) then | ||
you can enable the hinge at data value *hinge* [0] via **+h**, whereas for hard-hinge CPTs you | ||
can adjust the location of the hinge [0]. For other CPTs, you may convert their *z*-values | ||
from meter to another distance unit (append **+U**\ *unit*) or from another unit to meter (append **+u**\ *unit*), | ||
with *unit* taken from **e**\ \|\ **f**\ \|\ **k**\ \|\ **M**\ \|\ **n**\ \|\ **u**. | ||
Alternatively, give *color1,color2*\ [*,color3*\ ,...] | ||
to build a linear continuous CPT from those colors automatically, | ||
where *z* starts at 0 and is incremented by one for each color. | ||
In this case *color*\ **n** can be a r/g/b triplet, a color name, | ||
or an HTML hexadecimal color (e.g. #aabbcc). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
**-je**\ \|\ **f**\ \|\ **g** :ref:`(more ...) <distcalc_full>` | ||
**-je**\ \|\ **f**\ \|\ **g** :ref:`(more ...) <-distcalc_full>` | ||
Determine how spherical distances are calculated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.