-
Notifications
You must be signed in to change notification settings - Fork 29
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
let the user set effective radius in P(Q)*S(Q) (Trac #780) #261
Comments
Trac update at |
Trac update at The new qt gui has "+ symbols" on left of parameter table to expand details on polydispere radius etc, could we use the same mechanism to show constraints such as those for E_R and V_R ? More generally are there any ideas yet for how to handle constraints in the qt gui? |
Trac update at |
Trac update at |
Trac update at Would be good for someone to explore how sasmodels.mixture etc currently add and multiply models and what happens to the flat backgrounds. In particular note that an S(Q) should never multiply a flat background. Sometimes when we write P(Q) we mean including scale, contrast and background thus P(Q)=scale.(delrho)^2^.<F^2^(Q)>+bkg where, if sld difference is correct and the model is correct for the system we have scale=phi=NV=volume_fraction where there are N particles of volume V per unit volume of sample, What we really need in sasview is P(Q)=scale.phi.(delrho)^2^.V.<F^2^(Q)>+bkg where some factors of V have been shuffled around depending upon the exact definition of F(Q). Check carefully what sasview models return before adding a new calculation of <F(Q)>. "scale" should be 1.0 if everything else is correct and I(Q) and delrho in the correct units. bkg has to be removed or forced to zero if in danger of being multiplied by S(Q). phi is the volume fraction parameter to be used by default along with the effective radius ER in S(Q) such that: I(Q) = P(Q,scale,phi,ER).S(Q,phi,ER) + bkg where it is emphasised here that "scale" should ideally be included separately in P(Q) in order to sort problems with the units of I(Q). More pragmatically, if scale is not 1.0, and our model only has a single scale and/or phi parameter, then we must let phi be set in S(Q) and not constrained to something from P(Q, thus: I(Q) = P(Q,scale,ER).S(Q,phi,ER) + bkg Then if the user knows what the unit fudge factor in scale is, they might want a constraint in S(Q) such that phi = constant.scale This all requires a little thought and some testing, but the existing code is likely almost OK. |
Trac update at For standard P(Q)S(Q) choices sasview 5.0 will have a menu drop down to choose the effective_radius for S(Q) for relevant P(Q) models. effective_radius can be freely adjusting (or fixed) or constrained to either a mean curvature value or radius of sphere with same volume (as forced by sasview4) or now constrained to other P(Q) model dependent choices such as a minimum or maximum radius of the particle. In the sasmodels beta_approx_new_R_eff branch a large number of models have had the new options included , these are currently (8 Sept 2018) being tested. Sasview 4 calculations of ER have now been moved to .c files, the .py file for the model now contains only an index of ER types e.g. for core_shell_cylinder we have: effective_radius_type = ["equivalent sphere","outer radius","half outer length","half min outer dimension", The type strings should be self explanatory. We need to check what happens (and what is wanted) regarding polydispersity (in principle ER could perhaps be averaged over polydispersity?). |
Trac update at |
Trac update at The !SasView 5.0 functionality to support beta_approx_new_R_eff is covered by JIRA issue 1052, and the feature branch is ESS_GUI_iss1052. |
The underlying requirement that the user have some control of the effective radius used in the model has been met. With If this is sufficient, then close the ticket. If not, then reframe it to be explicitly about making the computed effective radius available to the constraints system. Given the difficulty in implementing this, and how rarely(?) it will be needed, it will be enough to tell users to copy and edit the underlying model if they need to do complicated stuff with R_eff. |
Closing this ticket, as the original aim was acheived and further issues are addressed ielsewhere. |
sasmodels.product
definesP(Q)*S(Q)
using the effective radius fromP(Q)
as theradius_effective
parameter inS(Q)
. This is not always correct, and should be under control of the user. Similarly forvolfraction
andVR
.Instead of hard-coding this relationship, make
ER
andVR
available as derived parameters from the model. These parameters will only be computed if their value is requested. Models could potentially allow other derived parameters.Use
sasmodels.mixture
to multiply the models. Make sure that it supports arbitrary model expressions, not just A+B.May want to allow model constraints to be set in the model value field. When the radius_effective field is edited, the user will see
=A_ER
, indicating the that the ER() derived parameter from model A should be evaluated. This will save bouncing to a constraints page to indicate a simple constraint.Migrated from http://trac.sasview.org/ticket/780
The text was updated successfully, but these errors were encountered: