From 1742a6def1f6b99055164e38c562535456214c11 Mon Sep 17 00:00:00 2001 From: smk78 Date: Sat, 16 Sep 2023 13:48:22 +0100 Subject: [PATCH 1/4] Fix doc build errors --- .../ParticleEditor/helper_functions.py | 2 +- .../ParticleEditor/sampling/chunking.py | 48 +++++++++---------- src/sas/qtgui/Plotting/Slicers/BoxSlicer.py | 4 +- src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py | 4 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/sas/qtgui/Perspectives/ParticleEditor/helper_functions.py b/src/sas/qtgui/Perspectives/ParticleEditor/helper_functions.py index d32689edc6..c4d2fbd01d 100644 --- a/src/sas/qtgui/Perspectives/ParticleEditor/helper_functions.py +++ b/src/sas/qtgui/Perspectives/ParticleEditor/helper_functions.py @@ -16,7 +16,7 @@ def step(x: np.ndarray): def rect(x: np.ndarray): - """ Rectangle function, zero if |input| > 1, 1 otherwise""" + """ Rectangle function, zero if mod(input) > 1, 1 otherwise""" out = np.zeros_like(x) out[np.abs(x) <= 1] = 1.0 return out diff --git a/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py b/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py index 9bc4adec0f..64da370521 100644 --- a/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py +++ b/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py @@ -8,30 +8,30 @@ - First Point - - 1 2 3 | 4 5 6 | 7 8 9 | 0 - 1 | | | -S | | | -e 2 CHUNK 1 | CHUNK 2 | CHUNK 3 | CHUNK 4 -c | | | -o 3 | | | -n ---------------+-----------+-----------+------------ -d 4 | | | - | | | -P 5 CHUNK 5 | CHUNK 6 | CHUNK 7 | CHUNK 8 -o | | | -i 6 | | | -n ---------------+-----------+-----------+------------ -t 7 | | | - | | | - 8 CHUNK 9 | CHUNK 10 | CHUNK 11 | CHUNK 12 - | | | - 9 | | | - ---------------+-----------+-----------+------------ - 0 | | | - CHUNK 13 | CHUNK 14 | CHUNK 15 | CHUNK 16 - | | | +. First Point + +. 1 2 3 | 4 5 6 | 7 8 9 | 0 +. 1 | | | +.S | | | +.e 2 CHUNK 1 | CHUNK 2 | CHUNK 3 | CHUNK 4 +.c | | | +.o 3 | | | +.n ---------------+-----------+-----------+------------ +.d 4 | | | +. | | | +.P 5 CHUNK 5 | CHUNK 6 | CHUNK 7 | CHUNK 8 +.o | | | +.i 6 | | | +.n ---------------+-----------+-----------+------------ +.t 7 | | | +. | | | +. 8 CHUNK 9 | CHUNK 10 | CHUNK 11 | CHUNK 12 +. | | | +. 9 | | | +. ---------------+-----------+-----------+------------ +. 0 | | | +. CHUNK 13 | CHUNK 14 | CHUNK 15 | CHUNK 16 +. | | | """ diff --git a/src/sas/qtgui/Plotting/Slicers/BoxSlicer.py b/src/sas/qtgui/Plotting/Slicers/BoxSlicer.py index 00e26b91e8..2c9047a687 100644 --- a/src/sas/qtgui/Plotting/Slicers/BoxSlicer.py +++ b/src/sas/qtgui/Plotting/Slicers/BoxSlicer.py @@ -494,7 +494,7 @@ class BoxInteractorX(BoxInteractor): """ Average in Qx direction. The data for all Qy at a constant Qx are averaged together to provide a 1D array in Qx (to be plotted as a function - of Qx) + of Qx) """ def __init__(self, base, axes, item=None, color='black', zorder=3): @@ -528,7 +528,7 @@ class BoxInteractorY(BoxInteractor): """ Average in Qy direction. The data for all Qx at a constant Qy are averaged together to provide a 1D array in Qy (to be plotted as a function - of Qy) + of Qy) """ def __init__(self, base, axes, item=None, color='black', zorder=3): diff --git a/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py b/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py index 38fc9f9918..8017e5171c 100644 --- a/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py +++ b/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py @@ -333,7 +333,7 @@ class WedgeInteractorQ(WedgeInteractor): """ Average in Q direction. The data for all phi at a constant Q are averaged together to provide a 1D array in Q (to be plotted as a function - of Q) + of Q) """ def __init__(self, base, axes, item=None, color='black', zorder=3): @@ -350,7 +350,7 @@ class WedgeInteractorPhi(WedgeInteractor): """ Average in phi direction. The data for all Q at a constant phi are averaged together to provide a 1D array in phi (to be plotted as a function - of phi) + of phi) """ def __init__(self, base, axes, item=None, color='black', zorder=3): From 626974da9079ab687b6db68eb52d43fb9cd3c745 Mon Sep 17 00:00:00 2001 From: smk78 Date: Sat, 16 Sep 2023 15:29:27 +0100 Subject: [PATCH 2/4] Fix doc build error --- docs/sphinx-docs/source/dev/gl/opengl.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx-docs/source/dev/gl/opengl.rst b/docs/sphinx-docs/source/dev/gl/opengl.rst index 010c6a25c1..80c1c4d983 100644 --- a/docs/sphinx-docs/source/dev/gl/opengl.rst +++ b/docs/sphinx-docs/source/dev/gl/opengl.rst @@ -1,5 +1,5 @@ Open GL Subsystem -============== +================= The SasView openGL subsystem is quite minimal, and works in the standard way though a scenegraph From 8ca82bf389b067124a98b03344e046965acfe532 Mon Sep 17 00:00:00 2001 From: smk78 Date: Sat, 16 Sep 2023 15:30:19 +0100 Subject: [PATCH 3/4] Fix doc build errors --- .../ParticleEditor/sampling/chunking.py | 2 -- src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py | 15 +++++++++------ src/sas/sascalc/realspace/VolumeCanvas.py | 3 ++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py b/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py index 64da370521..4a2b18c34b 100644 --- a/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py +++ b/src/sas/qtgui/Perspectives/ParticleEditor/sampling/chunking.py @@ -6,8 +6,6 @@ Something like this - - . First Point . 1 2 3 | 4 5 6 | 7 8 9 | 0 diff --git a/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py b/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py index 8017e5171c..fe5e4c871f 100644 --- a/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py +++ b/src/sas/qtgui/Plotting/Slicers/WedgeSlicer.py @@ -140,12 +140,15 @@ def _post_data(self, new_sector=None, nbins=None): :param new_sector: slicer used for directional averaging in Q or Phi :param nbins: the number of point plotted when averaging - :TODO - Unlike other slicers, the two sector types are sufficiently - different that this method contains three instances of If (check class name) do x. - The point of post_data vs _post_data I think was to avoid this kind of thing and - suggests that in this case we may need a new method in the WedgeInteracgtorPhi - and WedgeInteracgtorQ to handle these specifics. Probably by creating the 1D plot - object in those top level classes along with the specifc attributes. + + :TODO + + Unlike other slicers, the two sector types are sufficiently different + that this method contains three instances of If (check class name) do x. + The point of post_data vs _post_data I think was to avoid this kind of + thing and suggests that in this case we may need a new method in the WedgeInteracgtorPhi and WedgeInteractorQ to handle these specifics. + Probably by creating the 1D plot object in those top level classes along + with the specifc attributes. """ # Data to average data = self.data diff --git a/src/sas/sascalc/realspace/VolumeCanvas.py b/src/sas/sascalc/realspace/VolumeCanvas.py index 36765c6894..3272ae22e7 100644 --- a/src/sas/sascalc/realspace/VolumeCanvas.py +++ b/src/sas/sascalc/realspace/VolumeCanvas.py @@ -437,9 +437,10 @@ def getParam(self, name): def getParamList(self, shapeid=None): """ - return a full list of all available parameters from +.... return a full list of all available parameters from self.params.keys(). If a key in self.params is a instance of ShapeDescriptor, extend the return list to: + [param1,param2,shapeid.param1,shapeid.param2.......] If shapeid is provided, return the list of parameters that From 313a462bec1ee5cd4da9977d370dbd87fe7f3d54 Mon Sep 17 00:00:00 2001 From: smk78 Date: Sat, 16 Sep 2023 15:58:45 +0100 Subject: [PATCH 4/4] Fix doc build warning (not in toctree) --- docs/sphinx-docs/source/dev/dev.rst | 1 + docs/sphinx-docs/source/dev/gl/opengl.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sphinx-docs/source/dev/dev.rst b/docs/sphinx-docs/source/dev/dev.rst index 3f6ded94c9..04e9e0f09b 100644 --- a/docs/sphinx-docs/source/dev/dev.rst +++ b/docs/sphinx-docs/source/dev/dev.rst @@ -12,6 +12,7 @@ Contents SasView API sasmodels overview sasmodels API + OpenGL subsystem Indices and Search ------------------ diff --git a/docs/sphinx-docs/source/dev/gl/opengl.rst b/docs/sphinx-docs/source/dev/gl/opengl.rst index 80c1c4d983..d46ba0c1d5 100644 --- a/docs/sphinx-docs/source/dev/gl/opengl.rst +++ b/docs/sphinx-docs/source/dev/gl/opengl.rst @@ -8,6 +8,6 @@ a way of checking the rendering, and catalogue the available functions Class Hierarchy -=============== +^^^^^^^^^^^^^^^ TODO - data currently in PR. \ No newline at end of file