Skip to content

Incorrect parameter in Figure.meca() #1094

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

Closed
maxrjones opened this issue Mar 21, 2021 · 2 comments · Fixed by #1255
Closed

Incorrect parameter in Figure.meca() #1094

maxrjones opened this issue Mar 21, 2021 · 2 comments · Fixed by #1255
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@maxrjones
Copy link
Member

Description of the problem

Figure.meca defines an alias as C = offset. Based on the description of the offset parameter, I think this alias should be for the -A option in GMT's meca (https://docs.generic-mapping-tools.org/dev/supplements/seis/meca.html#a); -C is for giving a cmap for the compressive part of the beachball.

This is both a code and documentation issue, since there are these two checks for -C in kwargs (which should not be required for meca):

            # Add in plotting options, if given, otherwise add 0s
            for arg in plot_longitude, plot_latitude:
                if arg is None:
                    spec.append(0)
                else:
                    if "C" not in kwargs:
                        kwargs["C"] = True
                    spec.append(arg)

Relates to the proposed refactoring in #1002

@maxrjones maxrjones added the bug Something isn't working label Mar 21, 2021
@seisman
Copy link
Member

seisman commented Mar 21, 2021

GMT made some changes to the -C option recently (GenericMappingTools/gmt#4873), although it's still backward-compatible.

We should upgrade the Figure.meca() syntax to match the GMT 6.2.0 syntax.

@maxrjones
Copy link
Member Author

GMT made some changes to the -C option recently (GenericMappingTools/gmt#4873), although it's still backward-compatible.

We should upgrade the Figure.meca() syntax to match the GMT 6.2.0 syntax.

Thanks for pointing this out - lesson learned to check the 'latest' documentation in addition to the 'dev' documentation before posting.

@weiji14 weiji14 added the documentation Improvements or additions to documentation label Apr 28, 2021
@seisman seisman added this to the 0.4.0 milestone May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants