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

pygmt.surface: Add aliases for "C", "L", "M", and "T" #2321

Merged
merged 30 commits into from
Feb 7, 2023
Merged
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9007170
alias surface.py T=tensor
jhtong33 Jan 11, 2023
4b62f0e
surface.py add tension documnets
jhtong33 Jan 13, 2023
803a278
surface add -L -M -C:
jhtong33 Jan 13, 2023
fc0ba08
Apply suggestions from code review
jhtong33 Jan 14, 2023
fbe59e2
surface add document: limit upper & lower
jhtong33 Jan 14, 2023
6cf98c8
Apply suggestions from code review
jhtong33 Jan 14, 2023
f917d9d
Apply suggestions from code review
jhtong33 Jan 15, 2023
add6d0a
/format
Jan 15, 2023
5c77c5f
format
Jan 15, 2023
ae90cc3
format bold and space
jhtong33 Jan 16, 2023
9d19405
Apply suggestions from code review
jhtong33 Jan 21, 2023
38e80c0
Apply suggestions from code review
jhtong33 Jan 21, 2023
68f7fbf
add Unit links
jhtong33 Jan 21, 2023
78f721c
add Unit links with :
jhtong33 Jan 21, 2023
15680a7
add Unit links
jhtong33 Jan 21, 2023
d05a7a5
Merge branch 'GenericMappingTools:main' into main
jhtong33 Jan 21, 2023
c6fcf49
adding grdgradient_shading
jhtong33 Jan 21, 2023
bffc4c2
[format-command] fixes
actions-bot Jan 23, 2023
8c9505a
Apply suggestions from code review
jhtong33 Jan 27, 2023
e5f5c54
code finish
jhtong33 Jan 27, 2023
1fdc625
Merge branch 'GenericMappingTools:main' into mini_branch
jhtong33 Jan 27, 2023
2897d2f
Merge branch 'main' into main
weiji14 Feb 6, 2023
3256f2b
Apply suggestions from code review
jhtong33 Feb 6, 2023
2d433b0
add tension more infomation
jhtong33 Feb 6, 2023
1492de9
Merge branch 'main' of github.com:JingHuiTong/pygmt into main
jhtong33 Feb 6, 2023
3c8fd2c
mini_branch/ surface.py T=tension more information
jhtong33 Feb 6, 2023
968bda3
Fix conflicts
jhtong33 Feb 6, 2023
6136b8a
Merge remote-tracking branch 'origin/main' into main
jhtong33 Feb 6, 2023
5653ef1
[format-command] fixes
actions-bot Feb 6, 2023
8da18ee
Apply suggestions from code review
jhtong33 Feb 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions pygmt/src/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@

@fmt_docstring
@use_alias(
C="convergence",
I="spacing",
L="limit",
R="region",
G="outgrid",
M="max_radius",
jhtong33 marked this conversation as resolved.
Show resolved Hide resolved
T="tension",
weiji14 marked this conversation as resolved.
Show resolved Hide resolved
V="verbose",
a="aspatial",
b="binary",
Expand Down Expand Up @@ -68,6 +72,35 @@ def surface(data=None, x=None, y=None, z=None, **kwargs):
outgrid : str
Optional. The file name for the output netcdf file with extension .nc
to store the grid in.
convergence: float
jhtong33 marked this conversation as resolved.
Show resolved Hide resolved
Optional. Convergence limit. Iteration is assumed to have converged when the maximum
absolute change in any grid value is less than convergence_limit.
(Units same as data z units). Alternatively, give limit in percentage
of rms deviation by appending %. [Default is scaled to of the
jhtong33 marked this conversation as resolved.
Show resolved Hide resolved
root-mean-square deviation of the data from a best-fit (least-squares) plane.].
This is the final convergence limit at the desired grid spacing;
for intermediate (coarser) grids the effective convergence limit
is divided by the grid spacing multiplier.
max_radius: str
jhtong33 marked this conversation as resolved.
Show resolved Hide resolved
Optional. After solving for the surface, apply a mask so that nodes farther than
max_radius away from a data constraint are set to NaN [no masking].
Append a distance unit (see Units) if needed. One can also select the nodes to mask by
using the n_cells**c**\ form. Here n_cells means the number of cells around the node
controlled by a data point. As an example **0c**\ means that only the cell where the point
lies is filled, **1c**\ keeps one cell beyond that
(i.e. makes a 3x3 square neighborhood), and so on.
limit: float

tension: float or str
jhtong33 marked this conversation as resolved.
Show resolved Hide resolved
[**b**\|\ **i**]
jhtong33 marked this conversation as resolved.
Show resolved Hide resolved
Optional. These must be between 0 and 1.
Tension may be used in the interior solution (above equation,
where it suppresses spurious oscillations) and in the boundary conditions
(where it tends to flatten the solution approaching the edges).
Add **i**\ tension to set interior tension, and **b**\ tension to set boundary tension.
If you do not prepend **i**\ or **b**\, both will be set to the same value.
[Default = 0 for both gives minimum curvature solution.]


{verbose}
{aspatial}
Expand Down