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

Absorption correction #649

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft

Absorption correction #649

wants to merge 27 commits into from

Conversation

psavery
Copy link
Collaborator

@psavery psavery commented Jun 21, 2024

This adds a physics package class along with code to perform absorption corrections due to components of the physics package or components on the detectors.

saransh13 and others added 25 commits June 21, 2024 15:32
…ormula and density. Tested and fixed absorption correction for filterpack and sample+window layer.
…er correction tested. physics package correction needs to be tested.
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@pep8speaks
Copy link

pep8speaks commented Jun 21, 2024

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

Line 324:80: E501 line too long (84 > 79 characters)
Line 718:34: E231 missing whitespace after ','
Line 718:49: E231 missing whitespace after ','
Line 719:17: E128 continuation line under-indented for visual indent
Line 719:31: E231 missing whitespace after ','
Line 719:43: E231 missing whitespace after ','
Line 720:17: E128 continuation line under-indented for visual indent
Line 720:29: E231 missing whitespace after ','
Line 720:42: E231 missing whitespace after ','
Line 721:17: E128 continuation line under-indented for visual indent
Line 721:30: E231 missing whitespace after ','
Line 721:48: E231 missing whitespace after ','
Line 722:17: E128 continuation line under-indented for visual indent
Line 722:33: E231 missing whitespace after ','
Line 722:47: E231 missing whitespace after ','
Line 723:17: E128 continuation line under-indented for visual indent
Line 723:28: E231 missing whitespace after ','
Line 723:41: E231 missing whitespace after ','
Line 724:17: E128 continuation line under-indented for visual indent
Line 724:29: E231 missing whitespace after ','
Line 724:42: E231 missing whitespace after ','
Line 725:17: E128 continuation line under-indented for visual indent
Line 725:29: E231 missing whitespace after ','
Line 725:42: E231 missing whitespace after ','
Line 726:17: E128 continuation line under-indented for visual indent
Line 726:32: E231 missing whitespace after ','
Line 726:45: E231 missing whitespace after ','
Line 727:17: E128 continuation line under-indented for visual indent
Line 727:30: E231 missing whitespace after ','
Line 727:43: E231 missing whitespace after ','
Line 728:17: E128 continuation line under-indented for visual indent
Line 728:29: E231 missing whitespace after ','
Line 728:41: E231 missing whitespace after ','
Line 729:17: E128 continuation line under-indented for visual indent
Line 729:28: E231 missing whitespace after ','
Line 729:41: E231 missing whitespace after ','
Line 730:17: E128 continuation line under-indented for visual indent
Line 730:30: E231 missing whitespace after ','
Line 730:42: E231 missing whitespace after ','
Line 731:17: E128 continuation line under-indented for visual indent
Line 731:29: E231 missing whitespace after ','
Line 731:44: E231 missing whitespace after ','
Line 732:17: E128 continuation line under-indented for visual indent
Line 732:30: E231 missing whitespace after ','
Line 732:43: E231 missing whitespace after ','
Line 733:17: E128 continuation line under-indented for visual indent
Line 733:29: E231 missing whitespace after ','
Line 733:44: E231 missing whitespace after ','
Line 734:17: E128 continuation line under-indented for visual indent
Line 734:30: E231 missing whitespace after ','
Line 734:43: E231 missing whitespace after ','
Line 735:17: E128 continuation line under-indented for visual indent
Line 735:28: E231 missing whitespace after ','
Line 735:43: E231 missing whitespace after ','
Line 736:17: E128 continuation line under-indented for visual indent
Line 736:34: E231 missing whitespace after ','
Line 736:48: E231 missing whitespace after ','
Line 737:17: E128 continuation line under-indented for visual indent
Line 737:30: E231 missing whitespace after ','
Line 737:46: E231 missing whitespace after ','
Line 738:17: E128 continuation line under-indented for visual indent
Line 738:28: E231 missing whitespace after ','
Line 738:41: E231 missing whitespace after ','
Line 739:17: E128 continuation line under-indented for visual indent
Line 739:29: E231 missing whitespace after ','
Line 739:45: E231 missing whitespace after ','
Line 740:17: E128 continuation line under-indented for visual indent
Line 740:32: E231 missing whitespace after ','
Line 740:46: E231 missing whitespace after ','
Line 741:17: E128 continuation line under-indented for visual indent
Line 741:30: E231 missing whitespace after ','
Line 741:45: E231 missing whitespace after ','
Line 742:17: E128 continuation line under-indented for visual indent
Line 742:32: E231 missing whitespace after ','
Line 742:44: E231 missing whitespace after ','
Line 743:17: E128 continuation line under-indented for visual indent
Line 743:29: E231 missing whitespace after ','
Line 743:43: E231 missing whitespace after ','
Line 744:17: E128 continuation line under-indented for visual indent
Line 744:33: E231 missing whitespace after ','
Line 744:46: E231 missing whitespace after ','
Line 745:17: E128 continuation line under-indented for visual indent
Line 745:28: E231 missing whitespace after ','
Line 745:43: E231 missing whitespace after ','
Line 746:17: E128 continuation line under-indented for visual indent
Line 746:28: E231 missing whitespace after ','
Line 746:40: E231 missing whitespace after ','
Line 746:52: E231 missing whitespace after ','
Line 747:17: E128 continuation line under-indented for visual indent
Line 747:28: E231 missing whitespace after ','
Line 747:43: E231 missing whitespace after ','
Line 748:17: E128 continuation line under-indented for visual indent
Line 748:31: E231 missing whitespace after ','
Line 748:43: E231 missing whitespace after ','
Line 749:17: E128 continuation line under-indented for visual indent
Line 749:28: E231 missing whitespace after ','
Line 749:40: E231 missing whitespace after ','
Line 750:17: E128 continuation line under-indented for visual indent
Line 755:25: E231 missing whitespace after ','
Line 755:41: E231 missing whitespace after ','
Line 755:53: E231 missing whitespace after ','
Line 756:21: E231 missing whitespace after ','
Line 756:31: E231 missing whitespace after ','
Line 756:45: E231 missing whitespace after ','
Line 757:25: E231 missing whitespace after ','
Line 757:38: E231 missing whitespace after ','
Line 757:50: E231 missing whitespace after ','
Line 758:21: E231 missing whitespace after ','
Line 758:32: E231 missing whitespace after ','
Line 758:43: E231 missing whitespace after ','
Line 758:53: E231 missing whitespace after ','
Line 759:26: E231 missing whitespace after ','
Line 759:37: E231 missing whitespace after ','
Line 759:48: E231 missing whitespace after ','
Line 760:23: E231 missing whitespace after ','
Line 760:33: E231 missing whitespace after ','
Line 760:44: E231 missing whitespace after ','
Line 760:55: E231 missing whitespace after ','
Line 761:21: E231 missing whitespace after ','
Line 761:33: E231 missing whitespace after ','
Line 761:44: E231 missing whitespace after ','
Line 761:55: E231 missing whitespace after ','
Line 762:23: E231 missing whitespace after ','
Line 762:35: E231 missing whitespace after ','
Line 762:47: E231 missing whitespace after ','
Line 762:58: E231 missing whitespace after ','
Line 763:23: E231 missing whitespace after ','
Line 763:34: E231 missing whitespace after ','
Line 763:45: E231 missing whitespace after ','
Line 764:22: E231 missing whitespace after ','
Line 764:34: E231 missing whitespace after ','
Line 764:45: E231 missing whitespace after ','
Line 765:23: E231 missing whitespace after ','
Line 765:36: E231 missing whitespace after ','
Line 765:48: E231 missing whitespace after ','
Line 766:22: E231 missing whitespace after ','
Line 766:33: E231 missing whitespace after ','
Line 766:45: E231 missing whitespace after ','
Line 767:21: E231 missing whitespace after ','
Line 767:34: E231 missing whitespace after ','
Line 767:46: E231 missing whitespace after ','
Line 768:23: E231 missing whitespace after ','
Line 768:35: E231 missing whitespace after ','
Line 768:46: E231 missing whitespace after ','
Line 769:23: E231 missing whitespace after ','
Line 769:35: E231 missing whitespace after ','
Line 769:47: E231 missing whitespace after ','
Line 770:23: E231 missing whitespace after ','
Line 770:35: E231 missing whitespace after ','
Line 770:47: E231 missing whitespace after ','
Line 771:23: E231 missing whitespace after ','
Line 771:34: E231 missing whitespace after ','
Line 771:46: E231 missing whitespace after ','
Line 772:23: E231 missing whitespace after ','
Line 772:34: E231 missing whitespace after ','
Line 772:46: E231 missing whitespace after ','
Line 773:23: E231 missing whitespace after ','
Line 773:35: E231 missing whitespace after ','
Line 773:46: E231 missing whitespace after ','
Line 774:23: E231 missing whitespace after ','
Line 774:35: E231 missing whitespace after ','
Line 774:46: E231 missing whitespace after ','
Line 775:22: E231 missing whitespace after ','
Line 775:36: E231 missing whitespace after ','
Line 775:47: E231 missing whitespace after ','
Line 776:23: E231 missing whitespace after ','
Line 776:36: E231 missing whitespace after ','
Line 776:48: E231 missing whitespace after ','
Line 777:23: E231 missing whitespace after ','
Line 777:36: E231 missing whitespace after ','
Line 777:48: E231 missing whitespace after ','
Line 778:23: E231 missing whitespace after ','

Line 124:53: W291 trailing whitespace
Line 152:58: W291 trailing whitespace
Line 157:55: W291 trailing whitespace
Line 160:25: E221 multiple spaces before operator
Line 170:10: E221 multiple spaces before operator
Line 182:28: E221 multiple spaces before operator
Line 184:56: W291 trailing whitespace
Line 185:21: E128 continuation line under-indented for visual indent
Line 185:80: E501 line too long (80 > 79 characters)
Line 187:28: E221 multiple spaces before operator
Line 190:80: E501 line too long (83 > 79 characters)

Line 582:1: W293 blank line contains whitespace
Line 593:1: W293 blank line contains whitespace
Line 610:17: E128 continuation line under-indented for visual indent
Line 611:17: E128 continuation line under-indented for visual indent
Line 1662:43: E231 missing whitespace after ','
Line 1662:46: E231 missing whitespace after ','
Line 1679:60: E261 at least two spaces before inline comment
Line 1680:72: E261 at least two spaces before inline comment
Line 1680:80: E501 line too long (87 > 79 characters)
Line 1687:60: E261 at least two spaces before inline comment
Line 1688:72: E261 at least two spaces before inline comment
Line 1688:80: E501 line too long (87 > 79 characters)
Line 1699:19: E128 continuation line under-indented for visual indent
Line 1702:23: E231 missing whitespace after ','
Line 1708:15: E128 continuation line under-indented for visual indent
Line 1714:34: E261 at least two spaces before inline comment

Line 110:58: W291 trailing whitespace
Line 115:55: W291 trailing whitespace
Line 126:10: E221 multiple spaces before operator
Line 139:28: E221 multiple spaces before operator
Line 141:56: W291 trailing whitespace
Line 142:21: E128 continuation line under-indented for visual indent
Line 142:80: E501 line too long (80 > 79 characters)
Line 144:64: E225 missing whitespace around operator

Line 4:5: E128 continuation line under-indented for visual indent
Line 10:14: E203 whitespace before ':'
Line 11:16: E203 whitespace before ':'
Line 11:22: E261 at least two spaces before inline comment
Line 16:14: E203 whitespace before ':'
Line 17:16: E203 whitespace before ':'
Line 17:21: E261 at least two spaces before inline comment
Line 21:15: E203 whitespace before ':'
Line 22:14: E203 whitespace before ':'
Line 22:77: E261 at least two spaces before inline comment
Line 22:80: E501 line too long (83 > 79 characters)
Line 23:16: E203 whitespace before ':'
Line 23:23: E261 at least two spaces before inline comment
Line 24:21: E203 whitespace before ':'
Line 24:28: E261 at least two spaces before inline comment
Line 24:29: E262 inline comment should start with '# '
Line 25:13: E203 whitespace before ':'
Line 31:22: E203 whitespace before ':'
Line 32:21: E203 whitespace before ':'
Line 33:23: E203 whitespace before ':'
Line 33:29: E261 at least two spaces before inline comment
Line 34:22: E203 whitespace before ':'
Line 35:21: E203 whitespace before ':'
Line 36:23: E203 whitespace before ':'
Line 36:30: E261 at least two spaces before inline comment
Line 41:15: E203 whitespace before ':'
Line 42:15: E203 whitespace before ':'
Line 42:22: E261 at least two spaces before inline comment
Line 43:16: E203 whitespace before ':'
Line 43:23: E261 at least two spaces before inline comment
Line 44:14: E203 whitespace before ':'
Line 44:23: E261 at least two spaces before inline comment
Line 56:1: E302 expected 2 blank lines, found 1
Line 154:1: E302 expected 2 blank lines, found 1
Line 169:55: W291 trailing whitespace
Line 172:58: W291 trailing whitespace
Line 199:1: E302 expected 2 blank lines, found 1
Line 204:1: E302 expected 2 blank lines, found 1
Line 209:1: E302 expected 2 blank lines, found 1
Line 246:1: E302 expected 2 blank lines, found 1
Line 250:18: W291 trailing whitespace
Line 277:30: E221 multiple spaces before operator
Line 278:29: E221 multiple spaces before operator
Line 341:30: E221 multiple spaces before operator
Line 342:29: E221 multiple spaces before operator
Line 380:1: E302 expected 2 blank lines, found 1
Line 398:19: W291 trailing whitespace

Line 4:1: E122 continuation line missing indentation or outdented
Line 14:1: E302 expected 2 blank lines, found 0
Line 28:1: E302 expected 2 blank lines, found 1
Line 30:49: W291 trailing whitespace
Line 35:10: E231 missing whitespace after ','
Line 40:1: E305 expected 2 blank lines after class or function definition, found 1
Line 46:1: E302 expected 2 blank lines, found 0
Line 46:38: W291 trailing whitespace
Line 52:1: E302 expected 2 blank lines, found 1
Line 52:48: W291 trailing whitespace
Line 75:54: W291 trailing whitespace
Line 87:19: E222 multiple spaces after operator
Line 98:10: E221 multiple spaces before operator
Line 98:18: E231 missing whitespace after ','
Line 99:25: E231 missing whitespace after ','
Line 110:31: E261 at least two spaces before inline comment
Line 111:19: E261 at least two spaces before inline comment
Line 116:1: E302 expected 2 blank lines, found 1
Line 116:48: W291 trailing whitespace
Line 137:54: W291 trailing whitespace
Line 149:19: E222 multiple spaces after operator
Line 160:10: E221 multiple spaces before operator
Line 160:18: E231 missing whitespace after ','
Line 161:25: E231 missing whitespace after ','
Line 172:31: E261 at least two spaces before inline comment
Line 173:19: E261 at least two spaces before inline comment
Line 176:29: W292 no newline at end of file

Comment last updated at 2024-09-06 19:57:48 UTC

Add missing dependency, fix an import, fix attribute name.

Signed-off-by: Brianna Major <brianna.major@taloid.khq.kitware.com>
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 38.68613% with 252 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@2534ec5). Learn more about missing BASE report.

Files Patch % Lines
hexrd/material/sample.py 51.47% 82 Missing ⚠️
hexrd/instrument/detector.py 38.61% 62 Missing ⚠️
hexrd/material/utils.py 21.66% 47 Missing ⚠️
hexrd/instrument/cylindrical_detector.py 5.40% 35 Missing ⚠️
hexrd/instrument/planar_detector.py 5.26% 18 Missing ⚠️
hexrd/instrument/hedm_instrument.py 11.11% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #649   +/-   ##
=========================================
  Coverage          ?   30.29%           
=========================================
  Files             ?      141           
  Lines             ?    22947           
  Branches          ?        0           
=========================================
  Hits              ?     6952           
  Misses            ?    15995           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -12,6 +12,7 @@

install_reqs = [
'appdirs',
'chemparse',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We will need to add chemparse as a conda dependency as well.

Signed-off-by: Brianna Major <brianna.major@taloid.khq.kitware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants