Skip to content

Normalise wedge slicer phi to (-180,180]#3928

Open
jellybean2004 wants to merge 1 commit intomainfrom
wedge_phi
Open

Normalise wedge slicer phi to (-180,180]#3928
jellybean2004 wants to merge 1 commit intomainfrom
wedge_phi

Conversation

@jellybean2004
Copy link
Copy Markdown
Member

Description

This change updates WedgeSlicer.py, so the wedge phi parameter field in the slicer parameters window follows the same display convention as the plotted slice.

Generally, phi is restricted to (-180, 180]. When phi > 180 (negative value), but delta phi brings the wedge below 180 (positive value), the plot range shows values > 180 to show an unbroken plot. To this end, checks are implemented to match the field value to the range displayed on the plot.
For example, if phi = 190 (-170) but delta_phi = 15, the plot range will be 175-205, and the phi value displayed will be 190, not -170.

Fixes #3914

How Has This Been Tested?

Manually tested on Windows 11.

Review Checklist:

Documentation

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing

  • The introduced changes comply with SasView license (BSD 3-Clause)

@jellybean2004
Copy link
Copy Markdown
Member Author

@pkienzle would you be willing to review this PR?

Please let me know if you are happy with the normalisation method used here.

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.

Wedge slicer φ axis range is inconsistent with slice (phi, delta_phi) parameters.

1 participant