Skip to content
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

Improve smearing help (Trac #833) #353

Closed
smk78 opened this issue Mar 30, 2019 · 5 comments
Closed

Improve smearing help (Trac #833) #353

smk78 opened this issue Mar 30, 2019 · 5 comments

Comments

@smk78
Copy link
Contributor

smk78 commented Mar 30, 2019

A recent question from a user (reproduced below and answered by richardh) highlights a deficiency in the Smearing Functions section of the Help Documentation (in sm_help.rst): elaborate explantions of slit/pinhole smearing are given, but we don't actually explain what !SasView does if a user loads data with a dQ component...

I have attempted to improve the introductory text but it needs more work and the input of someone who knows what !SasView does.

From: Dabkowska, Aleksandra  
Sent: 03 January 2017 14:36
To: [email protected]
Subject: [Sasview-help] SASview: question about instrumental smearing
 
Hello, 

I am writing to ask about using SASview with dQ-containing data.
 
I have recently started to use SASview to analyze SANS data (of 
nanoparticles). The experiments were done in Munich and have 4 columns 
(Q, Intensity, dI and dQ).  However, when I set the fitting program to use 
instrumental smearing sometimes I get strange peaks in the fitted line 
(see attached). I have found the section on smearing in the manual but I 
am still struggling to understand where these peaks come from. I was 
wondering whether this is a problem with how I set up the model or my dQ 
data?   
 
Thank you for your help with this! 
 
Best regards, 
 
Aleksandra
For the benefit of the rest of the team – a summary of the answer that I 
have discussed with Aleksandra  -
 
Sasview was doing “as expected”. The data set was a concatenation of SANS 
data from several detector distances, where of course the worst Q 
resolution is next to the beam stop at each distance. (This is also 
noticeable in the residuals plot where there is poor overlap.) Sasview 
sensibly orders all the input points into increasing Q for nicer looking 
plots, however the “dQ data” can then vary considerably from point to 
point.  Using “no smearing” or “Custom pinhole smear” the fits look OK, 
but with “Use dQ data” smearing then “spikes” appear. 
 
Possible solutions include – remove the poor Q resolution data from 
shorter camera distances, or to fit the camera distances separately in a 
simultaneous fit.
 
Richard

Migrated from http://trac.sasview.org/ticket/833

{
    "status": "closed",
    "changetime": "2019-03-28T14:36:01",
    "_ts": "2019-03-28 14:36:01.647508+00:00",
    "description": "A recent question from a user (reproduced below and answered by richardh) highlights a deficiency in the Smearing Functions section of the Help Documentation (in sm_help.rst): elaborate explantions of slit/pinhole smearing are given, but we don't actually explain what !SasView does if a user loads data with a dQ component...\n\nI have attempted to improve the introductory text but it needs more work and the input of someone who knows what !SasView does.\n\n{{{\nFrom: Dabkowska, Aleksandra  \nSent: 03 January 2017 14:36\nTo: [email protected]\nSubject: [Sasview-help] SASview: question about instrumental smearing\n \nHello, \n\nI am writing to ask about using SASview with dQ-containing data.\n \nI have recently started to use SASview to analyze SANS data (of \nnanoparticles). The experiments were done in Munich and have 4 columns \n(Q, Intensity, dI and dQ).  However, when I set the fitting program to use \ninstrumental smearing sometimes I get strange peaks in the fitted line \n(see attached). I have found the section on smearing in the manual but I \nam still struggling to understand where these peaks come from. I was \nwondering whether this is a problem with how I set up the model or my dQ \ndata?   \n \nThank you for your help with this! \n \nBest regards, \n \nAleksandra\n}}}\n\n{{{\nFor the benefit of the rest of the team \u2013 a summary of the answer that I \nhave discussed with Aleksandra  -\n \nSasview was doing \u201cas expected\u201d. The data set was a concatenation of SANS \ndata from several detector distances, where of course the worst Q \nresolution is next to the beam stop at each distance. (This is also \nnoticeable in the residuals plot where there is poor overlap.) Sasview \nsensibly orders all the input points into increasing Q for nicer looking \nplots, however the \u201cdQ data\u201d can then vary considerably from point to \npoint.  Using \u201cno smearing\u201d or \u201cCustom pinhole smear\u201d the fits look OK, \nbut with \u201cUse dQ data\u201d smearing then \u201cspikes\u201d appear. \n \nPossible solutions include \u2013 remove the poor Q resolution data from \nshorter camera distances, or to fit the camera distances separately in a \nsimultaneous fit.\n \nRichard\n}}}\n",
    "reporter": "smk78",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Documentation",
    "time": "2017-01-04T11:39:52",
    "component": "SasView",
    "summary": "Improve smearing help",
    "priority": "major",
    "keywords": "",
    "milestone": "SasView 4.3.0",
    "owner": "smk78",
    "type": "enhancement"
}
@smk78 smk78 self-assigned this Mar 30, 2019
@butlerpd
Copy link
Member

Trac update at 2017/10/27 16:18:21: butler changed type from "defect" to "enhancement"

@butlerpd
Copy link
Member

Trac update at 2018/02/13 02:44:17: butler changed milestone from "SasView 4.2.0" to "SasView 4.3.0"

@smk78
Copy link
Contributor Author

smk78 commented Mar 30, 2019

Trac update at 2019/03/28 14:36:01:

  • smk78 commented:

In changeset 8d2df05:

#!CommitTicketReference repository="sasmodels" revision="8d2df05cc8c770af51d340dda4bdf2fe60d8a371"
Added note to smearing help. Closes #928
  • smk78 changed owner from "" to "smk78"
  • smk78 changed resolution from "" to "fixed"
  • smk78 changed status from "new" to "closed"

@smk78 smk78 closed this as completed Mar 30, 2019
@butlerpd
Copy link
Member

butlerpd commented May 5, 2019

while closed, it is probably appropriate to note here with the ticket the fact that if using the data dQ looked wrong someone should discuss with the user how they concatenated the data as it must be incorrect!!! Indeed users often concatenate their data by scaling them to look smooth when in fact they should not be smooth, as demonstrated by SasView using the proper dQ. Their fits will be skewed and the parameters they extract have an incorrect value/uncertainty. By how much is a question -- for most people it won't matter much (sadly because most people ignore their uncertainties anyway).

@butlerpd
Copy link
Member

butlerpd commented May 5, 2019

Actually I see that the edits to the smearing documentation fails to point out that the error is most likely in the concatenated file and implies that ideally there would be a SasView fix. The real answer is that this is actually given them very valuable information. Namely that they incorrectly scaled the data when concatenating. Aside from a simultaneous fit (which has other advantage of allowing the scale factors to float independently which is what they may be worried about) it to concatenate the data without trying to artificially scale the data. Am going to open a new ticket for that ... but it should be in sasmodels not sasview repo so moving this issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants