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

Update naming of methods for Coulomb logarithms #962

Merged
merged 55 commits into from
Jan 21, 2021

Conversation

Tiger-Du
Copy link
Contributor

@Tiger-Du Tiger-Du commented Dec 16, 2020

  • I have added a changelog entry for this pull request.
  • If adding new functionality, I have added tests and
    docstrings.
  • I have fixed any newly failing tests.

-| Part of Issue #931.
-| Renames the methods for Coulomb logarithms to "LS", "LS_min_I", "LS_full_I", "LS_clamp", "hyp_LS", "hyp_LS_max_I", and "hyp_LS_full_I". Underscores could be removed, "hyp" could be shortened to "H", and "I" could be changed to "i", "interp", or something similar.
-| Other minor updates.

@namurphy namurphy self-requested a review December 16, 2020 19:08
Copy link
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this! Right now I'm mostly wondering about the balance between abbreviation and readability. The more abbreviated the method names, the harder they are to read and understand without going into the documentation. It'll be necessary to update the tests for Coulomb logarithm too. Thank you again!

@Tiger-Du
Copy link
Contributor Author

Tiger-Du commented Dec 17, 2020

From helpful discussion with @namurphy, @svincena, and @rocco8773, I think the following should be done.

  • Each method should retain its original name for now, and the proposed names should be made aliases. In the future (perhaps before this pull request is done), we may decide to break backward compatibility by removing the "GMS" names.

  • The documentation should be expanded to include the formula for each method, a more direct explanation of the use cases of each one, and a more direct explanation overall of PlasmaPy's stance on these methods.

  • A Jupyter Notebook should be made in a new pull request to illustrate the differences among these methods.

@lemmatum
Copy link
Contributor

Thanks for cleaning this up!

Copy link
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again, thank you for working on this! Coulomb logarithms turned out to be a lot more complicated than I had originally thought when we first worked on this function.

  • My preference at the moment would be to have the abbreviations be "LS" for classical and "GMS-1" through "GMS-6" for the rest because that's a lot easier to remember. I'm also thinking that if the function will still accept "GMS-1" through "GMS-6", it'd be better to keep that in the documentation.
  • I think I'd also find it more readable to have underscores like you originally did, like "ls_full_interp". My suggestions at the moment are:
    2. `"ls_min_interp"` or `"GMS-1"`
    3. `"ls_full_interp"` or `"GMS-2"`
    4. `"ls_clamp_mininterp"` or `"GMS-3"`
    5. `"hls_min_interp"` or `"GMS-4"`
    6. `"hls_max_interp"` or `"GMS-5"`
    7. `"hls_full_interp"` or `"GMS-6"`

Thank you again!

Copy link
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just took a quick look at it, and it's looking pretty close to ready. I had a few small suggested changes. I'll take a closer look at it this week but I don't expect to suggest anything major. Thank you again!

@namurphy namurphy self-assigned this Jan 5, 2021
Copy link
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few final minor formatting suggestions, but other than that I'd say it's ready. @Tiger-Du — is there anything else you'd like to do with this before we merge it? And thank you again!

@Tiger-Du
Copy link
Contributor Author

Hi, Nick. Thank you for your helpful suggestions! I realize now that this PR must have been difficult to review since I made out-of-scope changes. (Sometimes I would get distracted and fix random things.) But yes, I think that this PR is just about done. One question about the unit tests: Should parametrization, rather than separate unit tests, be used for the abbreviations of the methods? @namurphy

@namurphy
Copy link
Member

One question about the unit tests: Should parametrization, rather than separate unit tests, be used for the abbreviations of the methods? @namurphy

It would be good to have the tests be parametrized, but I'd hold off on refactoring tests until #928 is done since that will add some test helper functionality. I'll go ahead and merge this. Thank you once again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plasmapy.formulary Related to the plasmapy.formulary subpackage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants