From 42065726e9e5f289f193a9c87418d83a063ad18e Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 1 Jul 2024 13:46:43 +0100 Subject: [PATCH 1/7] Fixed things mentioned --- .../Perspectives/Corfunc/media/corfunc-technical.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst b/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst index a14143499a..35449df7ad 100644 --- a/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst +++ b/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst @@ -178,12 +178,12 @@ The structural parameters extracted are: * Average Core Thickness :math:`= D_0` * Average Interface Thickness :math:`\text{} = D_{tr}` * Eekhaut Polydispersity :math:`= \Gamma_{\text{min}}/\Gamma_{\text{max}}` -* Stribeck Polydispersity +* Stribeck Polydispersity :math:`= \frac{L_c}{(L_c - L_p)\Gamma_{\text{max}}}` * Local Crystallinity :math:`= L_c/L_p` which lead to: * Average Soft Block Thickness :math:`= L_p - L_c = L_a` -* Average Chord Length :math:`= ((1/L_c) + (1/L_a)) :sup:`-1`` -* Average Crystalline Chord Length :math:`= ((1/L_c) + (1/L_a)) :sup:`-1` / \Phi_{\text{c}}` -* Non-Ideality :math:`= (L_p – L_p*) :sup:`2` / L_p :sup:`2`` +* Average Chord Length :math:`= ((1/L_c) + (1/L_a))^{-1}` +* Average Crystalline Chord Length :math:`= \frac{L_a L_c}{\Phi_{\text{c}} (L_c + L_a)}` +* Non-Ideality :math:`= \left(\frac{L_p – L_p*}{L_p}\right)^2` From 15cf2293f27b450bafd2ed96247fd7f715e0d916 Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 1 Jul 2024 14:04:03 +0100 Subject: [PATCH 2/7] Removed empty \text tag --- src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst b/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst index 35449df7ad..06a40fb76a 100644 --- a/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst +++ b/src/sas/qtgui/Perspectives/Corfunc/media/corfunc-technical.rst @@ -176,7 +176,7 @@ The structural parameters extracted are: * Long Period :math:`= L_p` * Average Hard Block Thickness :math:`= L_c` * Average Core Thickness :math:`= D_0` -* Average Interface Thickness :math:`\text{} = D_{tr}` +* Average Interface Thickness :math:`= D_{tr}` * Eekhaut Polydispersity :math:`= \Gamma_{\text{min}}/\Gamma_{\text{max}}` * Stribeck Polydispersity :math:`= \frac{L_c}{(L_c - L_p)\Gamma_{\text{max}}}` * Local Crystallinity :math:`= L_c/L_p` From 23a215b651ea7e886c3c562f078811042ef8676e Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 1 Jul 2024 14:39:23 +0100 Subject: [PATCH 3/7] Renamed trapz and cumtrapz --- src/sas/sascalc/corfunc/corfunc_calculator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sas/sascalc/corfunc/corfunc_calculator.py b/src/sas/sascalc/corfunc/corfunc_calculator.py index e6054fee64..782ffc29c5 100644 --- a/src/sas/sascalc/corfunc/corfunc_calculator.py +++ b/src/sas/sascalc/corfunc/corfunc_calculator.py @@ -12,7 +12,7 @@ from scipy.interpolate import interp1d from scipy.signal import argrelextrema from scipy.fftpack import dct -from scipy.integrate import trapz, cumtrapz +from scipy.integrate import trapezoid, cumulative_trapezoid from sas.sascalc.corfunc.calculation_data import (TransformedData, LamellarParameters, @@ -416,7 +416,7 @@ def _calculate_transforms(self): # numerical approximation for increasing R using the trapezium rule # Note: SasView 4.x series limited the range to xs <= 1000.0 - gamma3 = cumtrapz(gamma1, xs) / xs[1:] + gamma3 = cumulative_trapezoid(gamma1, xs) / xs[1:] gamma3 = np.hstack((1.0, gamma3)) # gamma3(0) is defined as 1 # Interface Distribution function @@ -428,7 +428,7 @@ def _calculate_transforms(self): # IDF(x) = int_0^inf q^4 * I(q) * cos(q*x) * dq # => IDF(0) = int_0^inf q^4 * I(q) * dq - idf[0] = trapz(-qs ** 4 * (iqs - background), qs) + idf[0] = trapezoid(-qs ** 4 * (iqs - background), qs) idf /= Q # Normalise using scattering invariant transform1d = Data1D(xs, gamma1) From 0203068e7d672ed51762e891d1062d71f90fb0a7 Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 1 Jul 2024 14:42:30 +0100 Subject: [PATCH 4/7] Pin scipy to 1.14 --- build_tools/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/requirements.txt b/build_tools/requirements.txt index 42b08fa984..f83a6c32c9 100644 --- a/build_tools/requirements.txt +++ b/build_tools/requirements.txt @@ -25,7 +25,7 @@ pytest_qt pytest-mock pytools qtconsole -scipy +scipy==1.14 six sphinx superqt From 98d6b16f409dfe0e98ecbc1ed6cf01e410ed41d5 Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 1 Jul 2024 14:42:58 +0100 Subject: [PATCH 5/7] 1.14.0 --- build_tools/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/requirements.txt b/build_tools/requirements.txt index f83a6c32c9..62993a3306 100644 --- a/build_tools/requirements.txt +++ b/build_tools/requirements.txt @@ -25,7 +25,7 @@ pytest_qt pytest-mock pytools qtconsole -scipy==1.14 +scipy==1.14.0 six sphinx superqt From 26fb7ecea428929b5a265498ba58ee6e57d0f5bf Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 1 Jul 2024 14:46:01 +0100 Subject: [PATCH 6/7] More [cum]trapz --- src/sas/sascalc/corfunc/transform_thread.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sas/sascalc/corfunc/transform_thread.py b/src/sas/sascalc/corfunc/transform_thread.py index e8cd8c51ac..ca65e84878 100644 --- a/src/sas/sascalc/corfunc/transform_thread.py +++ b/src/sas/sascalc/corfunc/transform_thread.py @@ -1,7 +1,7 @@ from sas.sascalc.data_util.calcthread import CalcThread from sasdata.dataloader.data_info import Data1D from scipy.fftpack import dct -from scipy.integrate import trapz, cumtrapz +from scipy.integrate import trapezoid, cumulative_trapezoid import numpy as np class FourierThread(CalcThread): @@ -44,7 +44,7 @@ def compute(self): # gamma3(R) = 1/R int_{0}^{R} gamma1(x) dx # numerical approximation for increasing R using the trapezium rule # Note: SasView 4.x series limited the range to xs <= 1000.0 - gamma3 = cumtrapz(gamma1, xs)/xs[1:] + gamma3 = cumulative_trapezoid(gamma1, xs)/xs[1:] gamma3 = np.hstack((1.0, gamma3)) # gamma3(0) is defined as 1 if self.check_if_cancelled(): return @@ -58,7 +58,7 @@ def compute(self): # very large negative value. # IDF(x) = int_0^inf q^4 * I(q) * cos(q*x) * dq # => IDF(0) = int_0^inf q^4 * I(q) * dq - idf[0] = trapz(-qs**4 * (iqs-background), qs) + idf[0] = trapezoid(-qs**4 * (iqs-background), qs) idf /= Q # Normalise using scattering invariant except Exception as e: From f6391284b5b30e9d9cfdcf7c61351eeb73ae4e9a Mon Sep 17 00:00:00 2001 From: lucas-wilkins Date: Mon, 1 Jul 2024 15:20:04 +0100 Subject: [PATCH 7/7] Unpin scipy --- build_tools/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/requirements.txt b/build_tools/requirements.txt index 62993a3306..42b08fa984 100644 --- a/build_tools/requirements.txt +++ b/build_tools/requirements.txt @@ -25,7 +25,7 @@ pytest_qt pytest-mock pytools qtconsole -scipy==1.14.0 +scipy six sphinx superqt