Support angularly replicated 'symmetric' slicers#3832
Conversation
|
I have played around with this on my macbook. The symmetric slicers seem to be working as intended, nice work! Notes: Comments: Also, do we want to make a warning window every time someone wants to make more than a few slicers? It could be annoying to always be clicking "ok" whenever I want to make a symmetric set of slicers. Maybe it is better to just have a little warning in the "Slice Parameters" GUI that adding more than 4 slicers could be slow. Future Work: |
|
@smk78, I added docs for the wedge slicers as well as screenshots for each slicer as you stated in your issue. Please let me know if this is all okay. |
Would it be faster if, above a certain number of slicers, you can only update via the GUI interface? i.e., is the major slowdown happening in the interactive plot elements, the rendering, or the calculations? If it is the interactive plot elements slowing things down, a GUI-only control may be better. |
Read the documentation generated by CI build #5326 . Looks good to me. |
ffcbebf to
f3da2ec
Compare
|
Properly rebased to main, removing duplicate commits from the merged parent branch. |
DrPaulSharp
left a comment
There was a problem hiding this comment.
I've a few suggestions on the code here, I'll leave the functionality testing to @butlerpd as discussed.
f3da2ec to
0c610f5
Compare
JoGaudet
left a comment
There was a problem hiding this comment.
I have tested the symmetric slicer option on a PC. The features seem to work as intended for both wedges and sector cuts. I have two suggestions:
-
I believe one should have the option to fold the data or not.
-
Incorporating Box interactors would be very useful. For this, one would build symmetric box interactors with various X and Y interactors. One would need to constraint each Box interactors to (qx,qy)=(0,0) in this case. Does that sound reasonable?
Hi @JoGaudet. Thank you for your review. RE your suggestions:
|
|
Hi @jellybean2004, I agree that implementing box interactors into symmetric slicers would not be easy, as it would involve creating a new object that can perform averaging that involves both Qx and Qy. What I have in mind is schematized in the following images with real SANS data. Due to the resolution effect when collimation is not dominating, you can see that the shape of Bragg peaks is elongated along Q, while being sharpened along the perpendicular direction. This is very common. In this case, it would be appropriate to use slicers as the one shown in those figures (gray rectangles). For the 4-fold image (on the left), it only requires an independent Box along Qx and another Box along Qy. However, higher symmetry involves a more complicated averaging direction (right image, for example), and is most likely outside the scope of this branch. Note that I still cannot unfold the different slicers. Let me know when to try. |
28c5c37 to
9a6a6dc
Compare
|
Hi @JoGaudet, thank you for the detailed visual explanation — the images make it very clear what you have in mind. This type of analysis is exactly what motivated this feature addition. I had a deeper look into adding box slicer support, and here is what I think: You're right that the 4-fold case (one X-box and one Y-box centred at the origin) is relatively straightforward, as it only requires combining two existing slicer types. However, the general case — symmetric boxes at arbitrary angles, as shown in your higher-symmetry example — would require a new rotated-slab averaging that doesn't currently exist, as well as new interactor geometry to display and interact with the rotated boxes. This represents a substantial amount of new work beyond the scope of this PR, which focuses specifically on angular replication of the existing slicer types (wedge and sector). In the meantime, for the analysis you're describing, would symmetric wedge slicers be a reasonable substitute? They can target the same elongated peak regions, though along a curved rather than rectangular boundary. Also, I have incorporated the recent changes with the fold parameter into this. Please let me know if it is all right. Thank you! |
|
Why has this pull request been merged without an approving review? |
|
More importantly HOW was that possible?! I am assuming the merge was meant as an approval and merge? But I thought we locked github from merging without an approval? |
|
@DrPaulSharp, I am not able to see this option.
|
|
Righto, thanks @jellybean2004. I'm not certain how it was done in that case then. Any thoughts are welcome, as @butlerpd says, this shouldn't be possible. |
|
I asked @JoGaudet to do another review, and I guess it was okay by him and went ahead and merged it. I'm wondering, since he had already reviewed (though with a rejection) that GitHub assumed his merge was an implicit approval. I'm going to submit a different PR with only a single change to a code comment and ask @jellybean2004 to reject it and then see if merging is an option. |
|
Based on a discussion with @bmaranville, a merge from the command line and then a push will override the branch protections. This is not ideal... |
Yikes. Yeah, definitely not ideal. |
|
Ah ha! so we learned something today. ...Can force all changes to be made through pull requests? does locking a branch still allow pull request merges? |
|
I found a setting that will hopefully protect the main branch that I've enabled in Settings -> Branches -> main. Admins and Owners will still be able to push to the branch. This setting does not restrict Owners and Admins.
My one question, which isn't clear, is will this setting allow non admins to merge pull requests? |
|
I confirm that my neophyte self created this mayhem, and the scenario described by @krzywon is correct. I had previously reviewed the functionality and requested a few changes, which were partially implemented and subsequently verified by me. I then agreed that the remaining changes I suggested should not be addressed within this issue. As a result, I tried to find a way to approve the PR without requiring those additional changes—hence the bypass. |
|
No worries @JoGaudet -- the point is github should have prevented you from doing this .. precisely so neophytes can't mess it up. I also saw what Jeff is suggesting but my impression was that nobody could then merge? I hope I'm wrong. Nothing like old fashioned experiments to find out I guess. |



Description
This PR introduces symmetry-linked wedge and sector slicers for 2D data.
Users can now specify a number of slicers (N), which are automatically generated as congruent slicers, evenly distributed in angle around the plot centre. One of these will be the 'master' slicer, which is the only directly modifiable slicer, and the others will change automatically based on this.
This also adds the documentation for #3758 and #3806
Fixes #3807 #3794 #3802
To add symmetric slicers:
Slicers>Slicer ParametersSymmetric Slicersat the bottom of the first tabManually tested functionality using 2D data. Verified:
Review Checklist:
[if using the editor, use
[x]in place of[ ]to check a box]Documentation (check at least one)
Installers
Licensing (untick if necessary)