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

Clarify xcorr_max() docstring #2862

Merged
merged 2 commits into from Sep 1, 2021
Merged

Clarify xcorr_max() docstring #2862

merged 2 commits into from Sep 1, 2021

Conversation

Lewis-Khan
Copy link
Contributor

@Lewis-Khan Lewis-Khan commented Aug 4, 2021

What does this PR do?

Clarifies the ambiguity in the meaning of the Boolean abs_max in
xcorr_max() by editing docstring.

Why was it initiated? Any relevant Issues?

Resolves #2820.

PR Checklist

  • Correct base branch selected? master for new features, maintenance_... for bug fixes
  • This PR is not directly related to an existing issue (which has no PR yet).
  • If the PR is making changes to documentation, docs pages can be built automatically.
    Just remove the space in the following string after the + sign: "+DOCS"
  • If any network modules should be tested for the PR, add them as a comma separated list
    (e.g. clients.fdsn,clients.arclink) after the colon in the following magic string: "+TESTS:"
    (you can also add "ALL" to just simply run all tests across all modules)
  • All tests still pass.
  • Any new features or fixed regressions are be covered via new tests.
  • Any new or changed features have are fully documented.
  • Significant changes have been added to CHANGELOG.txt .
  • First time contributors have added your name to CONTRIBUTORS.txt .

Clarified the ambiguity in the meaning of the Boolean abs_max in
xcorr_max() by editing docstring.
@ThomasLecocq
Copy link
Contributor

not sure the new text is clearer. What about something like : ?

    :param bool abs_max: Determines if the largest value of the correlation function
        is returned, independent of it being the maximum (largest positive value: correlation)
        or minimum (largest negative value: anticorrelation), defaults to `True`.
        If `False`, the maximum returned is determined in the positive side (correlation only).

    :return: **shift, value** - Shift and value of maximum of
        cross-correlation.

``

@ThomasLecocq ThomasLecocq added the docs issues that only affect the content of documentation pages, docstrings etc label Aug 12, 2021
@Lewis-Khan
Copy link
Contributor Author

@ThomasLecocq @trichter I have updated the docstring with further clarification as per recommendations. Does that sound a bit clearer?

@trichter trichter merged commit 576d781 into obspy:master Sep 1, 2021
@trichter
Copy link
Member

trichter commented Sep 1, 2021

Thanks @Lewis-Khan @ThomasLecocq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs issues that only affect the content of documentation pages, docstrings etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ambiguity in xcorr_max()
3 participants