-
Notifications
You must be signed in to change notification settings - Fork 2
Sourcery Starbot ⭐ refactored sametz/pydnmr #9
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,8 +121,7 @@ def two_spin(v, va, vb, ka, wa, wb, pa): | |
| R = 2 * pi * Dv * (1 + tau * ((1 / T2a) + (1 / T2b))) | ||
| R += pi * dv * tau * ((1 / T2b) - (1 / T2a)) + pi * dv * (pa - pb) | ||
|
|
||
| I = (P * (1 + tau * ((pb / T2a) + (pa / T2b))) + Q * R) / (P ** 2 + R ** 2) | ||
| return I | ||
| return (P * (1 + tau * ((pb / T2a) + (pa / T2b))) + Q * R) / (P ** 2 + R ** 2) | ||
|
|
||
|
|
||
| def d2s_func(va, vb, ka, wa, wb, pa): | ||
|
|
@@ -241,5 +240,4 @@ def dnmr_AB(v, v1, v2, J, k, w): | |
| n2 = r_minus * b_minus - s * a_minus | ||
| d2 = a_minus ** 2 + b_minus ** 2 | ||
|
|
||
| I = (n1 / d1) + (n2 / d2) | ||
| return I | ||
| return (n1 / d1) + (n2 / d2) | ||
|
Comment on lines
-244
to
+243
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function dnmr_AB refactored with the following changes:
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,16 +147,13 @@ def test_find_two_singlets_widget(self): | |
| def test_find_two_singlets_layout(self): | ||
|
|
||
| foundLayout = self.ui.findChild(QGridLayout, 'twosingletslayout') | ||
| if foundLayout: | ||
| print('Found layout named', foundLayout.objectName()) | ||
| print('Found layout has parent:', foundLayout.parent(), | ||
| foundLayout.parent().objectName()) | ||
| else: | ||
| if not foundLayout: | ||
| foundLayout = self.ui.centralWidget().layout() | ||
| print('Did not find QGridLayout child named "twosingletlayout"') | ||
| print('Found layout named', foundLayout.objectName()) | ||
| print('Found layout has parent:', foundLayout.parent(), | ||
| foundLayout.parent().objectName()) | ||
|
|
||
| print('Found layout named', foundLayout.objectName()) | ||
| print('Found layout has parent:', foundLayout.parent(), | ||
| foundLayout.parent().objectName()) | ||
|
Comment on lines
-150
to
+156
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function TestDefaultGUi.test_find_two_singlets_layout refactored with the following changes:
|
||
|
|
||
| def test_find_AB_widget(self): | ||
| foundABWidget = self.ui.findChild(QWidget, 'abwidget') | ||
|
|
@@ -361,7 +358,7 @@ def test_twiddle_buttons(self): | |
|
|
||
| for widget in main.ab_vars: | ||
| print(widget.value, 'vs. ', self.widgetdict[widget.key].value()) | ||
| if widget.key == 'k_ab' or widget.key == 'wa': | ||
| if widget.key in ['k_ab', 'wa']: | ||
|
Comment on lines
-364
to
+361
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function TestABGUi.test_twiddle_buttons refactored with the following changes:
|
||
| assert self.widgetdict[widget.key].value() == 20.01 | ||
| # k and wa widgets should not go below 0.01 | ||
| elif widget.key == 'j_ab': | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function two_spin refactored with the following changes: