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

Wedge/Annulus-Sector Slicer #2550

Closed
ehewins opened this issue Jul 11, 2023 · 1 comment · Fixed by #2566
Closed

Wedge/Annulus-Sector Slicer #2550

ehewins opened this issue Jul 11, 2023 · 1 comment · Fixed by #2566
Labels
Enhancement Feature requests and/or general improvements

Comments

@ehewins
Copy link
Contributor

ehewins commented Jul 11, 2023

Is your feature request related to a problem? Please describe.

The issue will be the first step to enhance the slicer options as discussed in the post https://github.com/orgs/SasView/discussions/2198 . The new slicer shape defines a region of interest in 2D data with a four sided shape described by two radii and two concentric arcs (annular sector). As the geometric name "annular sector" might lead to confusion with the already existing sector and annulus slicer, it was proposed to call it "wedge" slicer. Further discussion of what to name it would be welcome.

Describe the solution you'd like

The wedge is a combination of a sector with an annulus. The implementation would be similar to "Box Interactor X" and "Box Interactor Y", averaging over either Q or Phi within the selected region to produce a 1D plot of intensity against the other variable.
Much of the code involved will be taken from AnnulusSlicer.py and SectorSlicer.py and the classes they define. The proposed region of interest could be constructed using these classes.
Each is missing two parameters which the other specifies - AnnulusSlicer needs a start and end angle to produce a 1D plot against a finite angular region < 360 Degrees. The default being a full circle, when first plotted. SectorSlicer is missing a minimum and maximum radius to select a q range.

Describe alternatives you've considered

Alternatively, one can refactor the code and define a new "Wedge" slicer class. The two pre-existing slicers sector and annulus could be rewritten as simplified cases of this one. If I went for this second option, I'd take the opportunity to prune some repeated code from the classes in SectorSlicer.py (though this pruning will likely happen anyway sooner or later).

@ehewins ehewins added the Enhancement Feature requests and/or general improvements label Jul 11, 2023
@ehewins
Copy link
Contributor Author

ehewins commented Jul 12, 2023

Having seen @butlerpd 's work on the 2482-problem-with-dragging-slicer-elements-on-plot branch, in this PR, I've realised from the updated docstrings that the basis of what I'm trying to achieve here already exists in the unused AzimutSlicer.py file. Its seems a little unfinished, but it looks like there's less work to do than I thought.

@ehewins ehewins mentioned this issue Jul 27, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature requests and/or general improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant