From ade90b88f554270d0e956c8dde06b98a60cf3fde Mon Sep 17 00:00:00 2001 From: jellybean2004 Date: Fri, 26 Jun 2026 13:46:25 +0100 Subject: [PATCH 1/2] Revise layout for options --- .../SizeDistribution/UI/SizeDistributionUI.ui | 665 +++++++++--------- 1 file changed, 322 insertions(+), 343 deletions(-) diff --git a/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui b/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui index f3b222d12c..aa4bd0744b 100644 --- a/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui +++ b/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui @@ -7,7 +7,7 @@ 0 0 577 - 671 + 600 @@ -32,6 +32,65 @@ Size Distribution + + + + QLayout::SizeConstraint::SetDefaultConstraint + + + + + Perform a quick fit using fixed iteration parameters. + + + Quick fit + + + + + + + Perform a full fit with all parameters optimized. + + + Full fit + + + + + + + Qt::Orientation::Horizontal + + + QSizePolicy::Policy::Expanding + + + + 200 + 20 + + + + + + + + + 0 + 0 + + + + Open the Size Distribution perspective help documentation. + + + Help + + + + + @@ -251,7 +310,7 @@ - + Output @@ -392,14 +451,14 @@ - - + + - Qt::Horizontal + Qt::Orientation::Horizontal - 200 + 40 20 @@ -430,8 +489,8 @@ - - + + 80 @@ -439,30 +498,21 @@ - <html><head/><body><p>Minimum + <html><head/><body><p>Maximum value of Q.</p></body></html> - - - - <html><head/><body><p>Å<span - style=" vertical-align:super;">-1</span></p></body></html> - - - - - + Max range - - + + 80 @@ -470,13 +520,22 @@ - <html><head/><body><p>Maximum + <html><head/><body><p>Minimum value of Q.</p></body></html> - + + + + <html><head/><body><p>Å<span + style=" vertical-align:super;">-1</span></p></body></html> + + + + + <html><head/><body><p>Å<span @@ -487,19 +546,6 @@ - - - - Qt::Horizontal - - - - 217 - 20 - - - - @@ -521,131 +567,58 @@ Method parameters - - - - MaxEnt Sky Background: - - - - - - Sky background parameter for the Maximum Entropy method (suggested: 1e-6) - - - - - - - <html><head/><body><p>Suggested: 1e-6</p></body></html> - - - - - - - Iterations: - - - - - - - Number of iterations for the Maximum Entropy method. - - - - - - - - - - Weighting - - - - - - + + + - None - - - true + MaxEnt Sky Background: + + + + - No weighting applied to the data. + Sky background parameter for the Maximum Entropy method (suggested: 1e-6) - - + + - Use dI Data - - - Weight data by its error values (dI). + <html><head/><body><p>Suggested: 1e-6</p></body></html> - - - - Use |sqrt(I Data)| + + + + Qt::Orientation::Horizontal - - Weight data by the square root of intensity values. + + + 40 + 20 + - + - - + + - Use % |I Data| - - - Weight data as a percentage of intensity values. + Iterations: - - + + - Percentage value for percentage-based weighting. + Number of iterations for the Maximum Entropy method. - - - - Weight factor: - - - - - - - Overall weighting factor to apply to the data. - - - - - - - Qt::Horizontal - - - - 50 - 20 - - - - @@ -655,171 +628,69 @@ Background - - - - Flat background: - - - - - - - Flat background value (constant background in cm^-1). - - - - - - - <html><head/><body><p>cm<span style=" - vertical-align:super;">-1</span></p></body></html> - - - - - - - - Subtract the low-Q power law. - - - Subtract Low-Q power law + + + + Fit power law Q range - - - - - - - - Power: - - - - - - - Exponent applied to the power-law function. - - - - - - - - - Fix - - - true - - - - - - - Fit - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 100 - 20 - - - - - - - - Scale: - - - - - - - Scale applied to the power-law function. - - - - - - - - - Fit flat background Q range - - + - + - + Min: - + true - - Minimum Q value for fitting the flat background. - 0 0 + + Minimum Q value for fitting the power-law background. + - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> - + Max: - + true - - Maximum Q value for fitting the flat background. - 0 0 + + Maximum Q value for fitting the power-law background. + - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> @@ -830,79 +701,175 @@ + + + + Flat background: + + + + + + + <html><head/><body><p>cm<span style=" + vertical-align:super;">-1</span></p></body></html> + + + + + + + + Flat background value (constant background in cm^-1). + + + + + + + Subtract the low-Q power law. + + + Subtract Low-Q power law + + + + + Fit the flat background component to the data in the specified Q range. + Fit flat background + + + + + + + + Exponent applied to the power-law function. + + + + + + + + + Fix + + + true + + + + + + + Fit + + + + + + + + + Scale: + + + + + + + Power: + + + + + + + Scale applied to the power-law function. + + + + + + + - Fit the flat background component to the data in the specified Q range. + Fit the power-law component to the data in the specified Q range. + + + Fit power law - - + + - Fit power law Q range + Fit flat background Q range - + - + - + Min: - + true - - Minimum Q value for fitting the power-law background. - 0 0 + + Minimum Q value for fitting the flat background. + - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> - + Max: - + true - - Maximum Q value for fitting the power-law background. - 0 0 + + Maximum Q value for fitting the flat background. + - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> @@ -913,15 +880,86 @@ - - - - Fit power law - - - Fit the power-law component to the data in the specified Q range. - - + + + + + + + Weighting + + + + + + + + Weight data by its error values (dI). + + + Use dI Data + + + + + + + No weighting applied to the data. + + + None + + + true + + + + + + + Weight data by the square root of intensity values. + + + Use |sqrt(I Data)| + + + + + + + + + + + Weight data as a percentage of intensity values. + + + Use % |I Data|: + + + + + + + Percentage value for percentage-based weighting. + + + + + + + Weight factor: + + + + + + + Overall weighting factor to apply to the data. + + + + @@ -930,65 +968,6 @@ - - - - QLayout::SetDefaultConstraint - - - - - Quick fit - - - Perform a quick fit using fixed iteration parameters. - - - - - - - Full fit - - - Perform a full fit with all parameters optimized. - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 200 - 20 - - - - - - - - - 0 - 0 - - - - Help - - - Open the Size Distribution perspective help documentation. - - - - - From f66bac613f23e6ffdc8fcff20507d510cf489a69 Mon Sep 17 00:00:00 2001 From: jellybean2004 Date: Mon, 29 Jun 2026 14:52:05 +0100 Subject: [PATCH 2/2] Shrink width --- .../SizeDistribution/UI/SizeDistributionUI.ui | 815 +++++++++--------- 1 file changed, 408 insertions(+), 407 deletions(-) diff --git a/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui b/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui index aa4bd0744b..4015279fd9 100644 --- a/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui +++ b/src/sas/qtgui/Perspectives/SizeDistribution/UI/SizeDistributionUI.ui @@ -7,7 +7,7 @@ 0 0 577 - 600 + 634 @@ -67,7 +67,7 @@ - 200 + 50 20 @@ -113,104 +113,52 @@ Parameters - - - - I(q) data source - - - - - - - - Name: - - - - - - - false - - - false - - - false - - - - - - - - - - + + - Model + Distribution parameters - - - - - Model name - - - + - - - Select a model. + + + true - - - Ellipsoid - - - - - - - - Aspect ratio: + + Minimum diameter of particles in the size distribution (in Angstroms). - - + + true - Aspect ratio of the ellipsoid model (ratio of semi-axes). + Use logarithmic binning for the diameter distribution. - - - - - - - - - Distribution parameters - - - - - Minimum diameter: + Logarithmic binning + + + true - - + + true - Minimum diameter of particles in the size distribution (in Angstroms). + Number of bins to use in the diameter distribution. + + + + + + + Max Diameter: @@ -222,88 +170,107 @@ - - + + - Maximum diameter: + Bins in diameter: - - - - true - - - Maximum diameter of particles in the size distribution (in Angstroms). + + + + Contrast: - - + + - <html><head/><body><p>Å</p></body></html> - + Min Diameter: - - + + - Bins in diameter: + <html><head/><body><p>10<span + style=" vertical-align:super;">-6</span>/Å<span + style=" vertical-align:super;">2</span></p></body></html> + - - + + true - Number of bins to use in the diameter distribution. + Maximum diameter of particles in the size distribution (in Angstroms). - - + + true - Use logarithmic binning for the diameter distribution. + Scattering length density contrast between particles and solvent (10^-6 / Å^2). + + + + - Logarithmic binning? - - - true + <html><head/><body><p>Å</p></body></html> + - - + + + + + + + Model + + + + - Contrast: + Aspect ratio: - - - - true - + + - Scattering length density contrast between particles and solvent (10^-6 / Å^2). + Select a model. + + + Ellipsoid + + - - + + - <html><head/><body><p>10<span - style=" vertical-align:super;">-6</span>/Å<span - style=" vertical-align:super;">2</span></p></body></html> - + Model name + + + + + + + true + + + Aspect ratio of the ellipsoid model (ratio of semi-axes). @@ -316,31 +283,17 @@ Output - - - - - - - - - - - ChiSq: - - - - - + + true + + Mean diameter of the size distribution. + true - - Chi-squared value indicating fit quality (lower is better). - @@ -350,70 +303,70 @@ - - - - true + + + + <html><head/><body><p>Å</p></body></html> - + + + + + true - Total particle volume fraction in the sample (%). - - - - - - - % + Mode diameter of the size distribution (most frequently occurring size). - - - - - - Mean diameter: + + true - - + + true + + Chi-squared value indicating fit quality (lower is better). + true - - Mean diameter of the size distribution. - - - + + <html><head/><body><p>Å</p></body></html> - - - - Median diameter: - - - true + + Median diameter of the size distribution (50th percentile). + true - - Median diameter of the size distribution (50th percentile). + + + + + + + + + + + + + ChiSq: @@ -431,23 +384,37 @@ - - + + + + % + + + + + + + Median diameter: + + + + + true + + Total particle volume fraction in the sample (%). + true - - Mode diameter of the size distribution (most frequently occurring size). - - - + + - <html><head/><body><p>Å</p></body></html> + Mean diameter: @@ -467,25 +434,80 @@ + + + + I(q) data source + + + + + + + + Name: + + + + + + + false + + + false + + + false + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 10 + + + + Options - - + + Fitting range - - + + - - + + - Min range + Max + + + + + + + <html><head/><body><p>Å<span + style=" vertical-align:super;">-1</span></p></body></html> + @@ -504,13 +526,6 @@ - - - - Max range - - - @@ -535,39 +550,37 @@ - - + + - <html><head/><body><p>Å<span - style=" vertical-align:super;">-1</span></p></body></html> - + Min - - - - - - <html><head/><body><p>Reset + + + + <html><head/><body><p>Reset the Q range to the default.</p></body></html> - - - Reset - - + + + Reset + + + + - + Method parameters - - + + @@ -577,43 +590,104 @@ - + + + Sky background parameter for the Maximum Entropy method (suggested: 1e-6) + + + + + + + Iterations: + + + + + + + Number of iterations for the Maximum Entropy method. + + + + + + + + + + + + Weighting + + + + + + + + Weight data by its error values (dI). + + + Use dI Data + + + + + + + Weight data by the square root of intensity values. + + + Use |sqrt(I Data)| + + + + + + + No weighting applied to the data. + + + None + + + true + + + + + + + + + - Sky background parameter for the Maximum Entropy method (suggested: 1e-6) + Weight data as a percentage of intensity values. - - - - - <html><head/><body><p>Suggested: 1e-6</p></body></html> + Use % |I Data|: - - - Qt::Orientation::Horizontal - - - - 40 - 20 - + + + Percentage value for percentage-based weighting. - + - + - Iterations: + Weight factor: - + - Number of iterations for the Maximum Entropy method. + Overall weighting factor to apply to the data. @@ -622,29 +696,29 @@ - + Background - - - + + + - Fit power law Q range + Fit flat background Q range - + - + - + Min: - + true @@ -655,26 +729,26 @@ - Minimum Q value for fitting the power-law background. + Minimum Q value for fitting the flat background. - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> - + Max: - + true @@ -685,12 +759,12 @@ - Maximum Q value for fitting the power-law background. + Maximum Q value for fitting the flat background. - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> @@ -701,129 +775,50 @@ - - - - Flat background: - - - - - - - <html><head/><body><p>cm<span style=" - vertical-align:super;">-1</span></p></body></html> - - - - - - - Flat background value (constant background in cm^-1). - - - - - - - Subtract the low-Q power law. - - - Subtract Low-Q power law - - - - - - - Fit the flat background component to the data in the specified Q range. - - - Fit flat background - - - - - - - - - Exponent applied to the power-law function. - - - - - - - - - Fix - - - true - - - - - - - Fit - - - - - - - + + + - Scale: + Flat background: - - - - Power: + + + + Flat background value (constant background in cm^-1). - - - - Scale applied to the power-law function. + + + + <html><head/><body><p>cm<span style=" + vertical-align:super;">-1</span></p></body></html> + - - - - Fit the power-law component to the data in the specified Q range. - - - Fit power law - - - - - + + - Fit flat background Q range + Fit power law Q range - + - + - + Min: - + true @@ -834,26 +829,26 @@ - Minimum Q value for fitting the flat background. + Minimum Q value for fitting the power-law background. - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> - + Max: - + true @@ -864,12 +859,12 @@ - Maximum Q value for fitting the flat background. + Maximum Q value for fitting the power-law background. - + <html><head/><body><p>Å<span style=" vertical-align:super;">-1</span></p></body></html> @@ -880,82 +875,88 @@ - - - - - - - Weighting - - - - - - - - Weight data by its error values (dI). - + + + + - Use dI Data + Scale: - - + + - No weighting applied to the data. + Exponent applied to the power-law function. + + + + - None - - - true + Power: - + + + + + Fix + + + true + + + + + + + Fit + + + + + + + - Weight data by the square root of intensity values. - - - Use |sqrt(I Data)| + Scale applied to the power-law function. - - + + + + Subtract the low-Q power law. + + + Subtract Low-Q Power Law + + + + + - + - Weight data as a percentage of intensity values. + Fit the flat background component to the data in the specified Q range. - Use % |I Data|: + Fit Flat Background - + - Percentage value for percentage-based weighting. + Fit the power-law component to the data in the specified Q range. - - - - - Weight factor: - - - - - - - Overall weighting factor to apply to the data. + Fit Power Law