Skip to content

Pygmt surface module feature request #1660

Closed

Description

@pragyantpradab

Description of the desired feature
pygmt surface function has been missing some important arguments from gmt like -Ll , -Lu , -C, -M, which are vary important when using surface function to create grid data from xyz data.

pygmt surface function has been missing some important arguments from gmt like -Ll , -Lu , -C, -M, which are vary important when using surface function to create grid data from xyz data.

-Lllower and -Luupper
Impose limits on the output solution. llower sets the lower bound. lower can be the name of a grid file with lower bound values, a fixed value, d to set to minimum input value, or u for unconstrained [Default]. uupper sets the upper bound and can be the name of a grid file with upper bound values, a fixed value, d to set to maximum input value, or u for unconstrained [Default]. Grid files used to set the limits may contain NaNs. In the presence of NaNs, the limit of a node masked with NaN is unconstrained.

-Cconvergence_limit[%]
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 10^-4 to of the 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.

Are you willing to help implement and maintain this feature? Yes/No
yes

Activity

  1. weiji14 commented on Dec 14, 2021

    @weiji14
    Member

    Hi @pragyantpradab, thanks for opening up this feature request! I agree that those parameters (-L, -C and -M) are often used (I actually use them myself sometimes). Feel free to open a Pull Request to modify the code here:

    @use_alias(
    I="spacing",
    R="region",
    G="outgrid",
    V="verbose",
    a="aspatial",
    b="binary",
    d="nodata",
    e="find",
    f="coltypes",
    h="header",
    i="incols",
    r="registration",
    w="wrap",
    )
    @kwargs_to_strings(R="sequence")
    def surface(data=None, x=None, y=None, z=None, **kwargs):

    Let us know if you need any help, you can check out the contributing guide at https://www.pygmt.org/v0.5.0/contributing.html as a start 😁

  2. added
    enhancement
    good first issue
    help wanted
    and removed
    feature request
    on Jan 10, 2022
  3. yvonnefroehlich commented on Feb 26, 2023

    @yvonnefroehlich
    Member

    @pragyantpradab after merging @JingHuiTong's PR #2321, aliases for -C, -L, and -M are now available. To install the development version of PyGMT you may want to have a look in the installation guide at https://www.pygmt.org/dev/install.html.
    I feel, we can close this issue as completed.

  4. added this to the 0.9.0 milestone on Feb 26, 2023
  5. removed
    good first issue
    help wanted
    on Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions