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

Rog and beta q #2535

Merged
merged 10 commits into from
Jun 28, 2023
Merged

Rog and beta q #2535

merged 10 commits into from
Jun 28, 2023

Conversation

smalex-z
Copy link
Contributor

@smalex-z smalex-z commented Jun 27, 2023

Description

Adjusted the Generic Scattering Calculator to automatically calculate and display the Radius of Gyration (only for non-element nuclear data). Furthermore, added Beta Q calculations into the Generic Scattering Calculation. A new box has been added to the QComboBox, giving 3 options now- "Fixed Orientation" (2D), "Debye Full Avg." (1D) and "Full Avg. w/ Beta(Q)" (1D). Selecting Full Average w/ Beta Q will perform the same actions as Debye Full Average, but will also plot a second graph of "Q vs Beta(Q)" next to the "Q vs form factor" graph in the main window.

periodictable import has been added as well.

How Has This Been Tested?

  • Import Nuclear Data (ex. PDB File), preferably smaller or else the form factor calculation will take a long time
  • Radius of Gyration should be displayed correctly, rounded to .1 Angstrom (checked against other calculations)
  • Select "Full Avg. w/ Beta(Q)" from the Dropdown list and hit compute
  • After computation is complete, two graphs should show up in the main window- Q vs Form Factor and Q vs Beta Q. (Beta Q Calculation has been checked against other calculations)

NOTE: Have not tested against Magnetic Data or Element Data yet due to a lack of Magnetic or Element Data files. May need to test to ensure the program is not crashed by it. May have to disable Beta Q Calculations for Magnetic Data if that is the case.

Review Checklist (please remove items if they don't apply):

  • Code has been reviewed
  • Functionality has been tested
  • Windows installer (GH artifact) has been tested (installed and worked)
  • MacOSX installer (GH artifact) has been tested (installed and worked)
  • User documentation is available and complete (if required)
  • Developers documentation is available and complete (if required)
  • The introduced changes comply with SasView license (BSD 3-Clause)

Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

I let myself comment a bit on the general style.
Functionality seems to be OK and the code looks good.
No real issues, just some pointers on how to make the code look more "pythonic"

src/sas/qtgui/Calculators/GenericScatteringCalculator.py Outdated Show resolved Hide resolved
src/sas/qtgui/Calculators/GenericScatteringCalculator.py Outdated Show resolved Hide resolved
src/sas/qtgui/Calculators/GenericScatteringCalculator.py Outdated Show resolved Hide resolved
src/sas/qtgui/Calculators/GenericScatteringCalculator.py Outdated Show resolved Hide resolved
src/sas/qtgui/Calculators/GenericScatteringCalculator.py Outdated Show resolved Hide resolved
src/sas/qtgui/Calculators/GenericScatteringCalculator.py Outdated Show resolved Hide resolved
src/sas/qtgui/Calculators/GenericScatteringCalculator.py Outdated Show resolved Hide resolved
Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

lgtm

@smalex-z smalex-z merged commit 53a198e into main Jun 28, 2023
@smalex-z smalex-z deleted the RoG-and-BetaQ branch June 28, 2023 18:50
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.

2 participants