Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#792 closed defect (fixed)

core_shell_fractal uses wrong effective radius for the fractal structure factor

Reported by: pkienzle Owned by: butler
Priority: minor Milestone: SasView 4.1.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

The core_shell_fractal model uses radius as the effective radius for the structure rather than radius+thickness; this cannot be right. For example, if you were to have a core shell with a very thick shell and almost no core, the particles could not get within the core radius of each other.

Change History (4)

comment:1 Changed 8 years ago by pkienzle

  • Owner set to butler
  • Status changed from new to assigned

comment:2 Changed 8 years ago by butler

That is correct. The Original IGOR code does it correctly as radius+thickness but seems to have been translated incorrectly as that does not seem to be in libigor. Assuming the translation was done from the documentation which for the core shell only said see the parent documentation (fractal, and core_shell) andof course fractal only has one r?

At any rate it is obvious if one uses say 60 radius and 10 core with a core sld=shellsld then swapping so that radius = 10 and shell = 60 cannot possibly change the curve… but does.

The fix however cannot be checked right now since there is a deeper problem which has been introduced since 4.01 which is that for openCL on my windows 10 the current build passes 0 for thickness to the model. It seems to pass the correct value for my windows 10 using DLL however. I am opening another ticket to deal with that first. In the meantime the documentation of the model has been cleaned up and the equation verified to match the what will be the calculation.

comment:3 Changed 8 years ago by butler

  • Resolution set to fixed
  • Status changed from assigned to closed

In bdd08df2ecb671a5503c0699fe24a2bc3f2a8a7a/sasmodels:

corrects fractal core shell S(q) to be based on radius of full particle
(core radius + thickness) and tested. Fixes #792

comment:4 Changed 8 years ago by butler

Actually it of course can be checked by using opencl = False. Tested with original code and showed that with sld core = sld shell which means in fact a large uniform sphere, and putting 60A for the core radius and 10A for the shell the scattering must be unchanged when swapping the values so that core is 10A and shell is 60. In fact there is a dramatic change. With the fix that makes sense from the math and is conistant with the original IGOR code, the scattering is now indeed invariant to that change. Further by changing the SLD of the shell to be between the core and solvent yields a small shift in intensity AND a slight shift in the minima of the oscillations as it should. Thus I consider this ticket fixed but have opened another regarding the opencl problem.

Note: See TracTickets for help on using tickets.