HEXRD / hexrd

A cross-platform, open-source library for the analysis of X-ray diffraction data.
Other
54 stars 26 forks source link

Absorption correction #649

Open psavery opened 3 weeks ago

psavery commented 3 weeks ago

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.

pep8speaks commented 3 weeks ago

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 142:1: E302 expected 2 blank lines, found 1 Line 157:55: W291 trailing whitespace Line 160:58: W291 trailing whitespace Line 179:1: E302 expected 2 blank lines, found 1 Line 184:1: E302 expected 2 blank lines, found 1 Line 189:1: E302 expected 2 blank lines, found 1 Line 226:1: E302 expected 2 blank lines, found 1 Line 230:18: W291 trailing whitespace Line 257:30: E221 multiple spaces before operator Line 258:29: E221 multiple spaces before operator Line 309:30: E221 multiple spaces before operator Line 310:29: E221 multiple spaces before operator Line 336:1: E302 expected 2 blank lines, found 1 Line 354: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-07-03 16:08:54 UTC
codecov[bot] commented 1 week ago

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 :warning:
hexrd/instrument/detector.py 38.61% 62 Missing :warning:
hexrd/material/utils.py 21.66% 47 Missing :warning:
hexrd/instrument/cylindrical_detector.py 5.40% 35 Missing :warning:
hexrd/instrument/planar_detector.py 5.26% 18 Missing :warning:
hexrd/instrument/hedm_instrument.py 11.11% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #649 +/- ## ========================================= Coverage ? 30.29% ========================================= Files ? 141 Lines ? 22947 Branches ? 0 ========================================= Hits ? 6952 Misses ? 15995 Partials ? 0 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.