Opened 7 years ago

Closed 7 years ago

#980 closed defect (wontfix)

Inconsistent results between Igor & SasView using Fractal Core-Shell model

Reported by: smk78 Owned by: butler
Priority: blocker Milestone: SasView 4.2.0
Component: sasmodels Keywords:
Cc: Work Package: SasView Bug Fixing

Description

Olga Koshkina & gonzalezm report inconsistent results from Igor, SasView 4.0.1 and SasView 4.1 when using the fractal_core_shell model. For example, putting the Igor best fit parameters in SasView gives a totally different theory curve. I have also tested and can verify.

Olga is using Mac (el captain 10.11.5). gonzalezm is using W8.1. I am using W10. So it seems to be a cross-platform issue.

gonzalezm & I are not using OpenCL (we don't know about Olga).

According to #792 and #877 there was a bug in 4.0.1 that butler fixed for 4.1 An OpenCL issue was also noted (#835) at that time but would not seem to be relevant here anyhow.

Need someone to take a closer look at the Igor and 4.1 calculations.

Aside: pkienzle has suggested (#791) re-structuring this model (and fractal) to make the S(q) part a structure factor in its own right.

Attachments (3)

OK_105_Sample_3b_1_merged.txt (3.8 KB) - added by smk78 7 years ago.
Dataset from Olga
OK_105_Sample_3b_1_merged_NOMETA.txt (3.4 KB) - added by smk78 7 years ago.
Dataset from Olga with header stripped (so loads in 3.1.2 and earlier)
OK_105_Igor_vs_SasView_290717.docx (293.9 KB) - added by smk78 7 years ago.
Fit parameters from Olga

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by smk78

Dataset from Olga

Changed 7 years ago by smk78

Dataset from Olga with header stripped (so loads in 3.1.2 and earlier)

Changed 7 years ago by smk78

Fit parameters from Olga

comment:1 Changed 7 years ago by butler

I have looked through the IGOR and SasView codes and there is in fact a clear difference that is consistant with the behavior being observed.

IGOR calculates a polydisperse core shell sphere and then multiplies by a "monodisperse" Teixeira Fractal "SQ" which uses the "mean radius" (the one passed without polydispersity).

SasView on the other hand calculates a monodisperse core shell sphere to multiply by the same "monodisperse" Teixeira Fractal "SQ" using the same "mean radius." It then applies the polydisperse loop to this whole thing thus effectively accounting in some way for the polydispersity in radius in the SQ calculation as well.

Unfortunately I am not sure which is correct. My instinct just looking at the code is that neither is correct but that SasView is perhaps "more correct" (whatever that means:-). But I think it is done differently by accident rather than design so not so sure. Further if IGOR is incorrect that would suggest all the P*S models are incorrect at some level which I rather doubt. Perhaps Paul Kienzle, Richard Heenan or Andrew Jackson might have a thought?

On the one hand not sure that a polydisperse fractal object makes sense (any more than any other P*S) but then the Fractal SQ depends clearly on the particular radius (of the core + shell) as demonstrated by the bug in the 4.0 version.

Of course for the monodisperse case (or very small polydispersity) the two give the same result as noted.

The next step is to figure out which is correct. If IGOR then the solution maybe to address another ticket put in by Paul Kienzle I think a while back to treat all fractals as a SQ and to the same as any other P*S model (assuming I am correct in believing P*S models behave this way).

comment:2 Changed 7 years ago by butler

  • Resolution set to wontfix
  • Status changed from new to closed

As Richard Heenan points out there are in fact a variety of systems where there is size segregation in the "fractal" structure and thus where this approach might be appropriate. We should however also allow the other approach. Such an approach will be provided by ticket #791 which remains an open ticket. This is probably not required for 4.2 release. At any rate this ticket can now be closed.

Note: See TracTickets for help on using tickets.