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

Thomson Scattering Module Initial Commit #831

Merged
merged 138 commits into from
Jun 23, 2020
Merged

Conversation

pheuer
Copy link
Member

@pheuer pheuer commented Jun 3, 2020

This PR adds a file plasmapy/diagnostics/thomson.py which contain a code for simulating Thomson scattering spectra for Maxwellian plasmas in both the collective and non-collective regimes.

An associated file of tests is also added: plasmapy/diagnostics/tests/test_thomson.py. This file contains two tests that run the program in two regimes (collective and non-collective) and make sure the results match their current output values.

@pep8speaks
Copy link

pep8speaks commented Jun 3, 2020

Hello @pheuer! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 141:91: E501 line too long (128 > 90 characters)

Comment last updated at 2020-06-10 18:28:38 UTC

@rocco8773 rocco8773 self-requested a review June 3, 2020 22:34
@rocco8773 rocco8773 added plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage needs changelog entry See: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html labels Jun 3, 2020
@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #831 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
+ Coverage   95.94%   95.99%   +0.05%     
==========================================
  Files          56       58       +2     
  Lines        5126     5195      +69     
==========================================
+ Hits         4918     4987      +69     
  Misses        208      208              
Impacted Files Coverage Δ
plasmapy/diagnostics/__init__.py 100.00% <100.00%> (ø)
plasmapy/diagnostics/thomson.py 100.00% <100.00%> (ø)
plasmapy/formulary/parameters.py 98.89% <0.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8e358f...74ca375. Read the comment docs.

@rocco8773
Copy link
Member

Hi @pheuer, thanks again for doing this. Like I said in our emails, I'll try to give a proper review by the end of the week. To get started, look into...

  1. Replacing the use of quantity_input with validate_quantities.
  2. The documentation page for diagnostics will need to be updated.
  3. It might be useful to create a jupyter notebook to show how the package works. This would go in ./docs/notebooks and we could add it to the nbgallery you see on the documentation page.

@StanczakDominik StanczakDominik self-requested a review June 4, 2020 07:30
@StanczakDominik
Copy link
Member

I'd definitely like to also take a look at this functionality :)

Copy link
Member

@StanczakDominik StanczakDominik left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, @pheuer! Looks great. Here's my initial look-through with a bunch of suggestions.

I fully agree with @rocco8773 that an example notebook analysis could be very helpful for showcasing what this can do :)

changelog/831.feature.rst Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Show resolved Hide resolved
pheuer and others added 7 commits June 4, 2020 10:35
@pheuer
Copy link
Member Author

pheuer commented Jun 4, 2020

Thanks for the comments! In addition to the changes noted above, I have also created an example Jupyter notebook and attempted to edit the diagnostics page in the documentation (although I'm not sure if there's more I need to do in the actual function docstrings to make that work properly?).

@StanczakDominik StanczakDominik self-requested a review June 5, 2020 03:33
@pheuer pheuer marked this pull request as ready for review June 22, 2020 17:56
Copy link
Member

@rocco8773 rocco8773 left a comment

Choose a reason for hiding this comment

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

This looks really good. Thank you for doing this! There are just a few spelling/format fixes and then this will be the final review.

docs/diagnostics/thomson.rst Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
plasmapy/diagnostics/thomson.py Outdated Show resolved Hide resolved
docs/notebooks/thomson.ipynb Outdated Show resolved Hide resolved
docs/notebooks/thomson.ipynb Outdated Show resolved Hide resolved
docs/notebooks/thomson.ipynb Outdated Show resolved Hide resolved
docs/notebooks/thomson.ipynb Outdated Show resolved Hide resolved
pheuer and others added 16 commits June 22, 2020 15:57
@pheuer
Copy link
Member Author

pheuer commented Jun 22, 2020

@rocco8773 Great, thank you for catching the spelling/formatting errors!

pheuer and others added 4 commits June 22, 2020 16:35
somehow we missed formatting the weakly_collective dictionary
reformat caption list so it looks nice on RTD and in a notebook cell
@rocco8773 rocco8773 merged commit 5080c25 into PlasmaPy:master Jun 23, 2020
@StanczakDominik
Copy link
Member

Woo! Thanks @pheuer for this PR, and thanks @rocco8773 for carrying the review :D

@namurphy
Copy link
Member

Yes, thank you! This is really exciting!

@pheuer
Copy link
Member Author

pheuer commented Jun 23, 2020

Thank you all for your help! Looking forward to adding more in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs changelog entry See: https://docs.plasmapy.org/en/latest/contributing/changelog_guide.html plasmapy.diagnostics Related to the plasmapy.diagnostics subpackage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants