Opened 6 years ago
Last modified 6 years ago
#1242 new defect
Resolution smearing is only applied to positive Qx and Qy in 2D
Reported by: | smk78 | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | SasView 4.2.2 |
Component: | SasView | Keywords: | |
Cc: | Work Package: | SasView Bug Fixing |
Description
User Bei Tian notes that in 2D fitting/calculation, instrument smearing is only applied to positive values of Qx and Qy.
Attachments (1)
Change History (6)
Changed 6 years ago by smk78
comment:1 Changed 6 years ago by smk78
@pkienzle says:
Here's a quick fix. A full solution involves thinking a lot more about what happens to pixels near the origin wrt phi in the polar representation. diff --git a/src/sas/sasgui/perspectives/fitting/fitpage.py b/src/sas/sasgui/perspectives/fitting/fitpage.py index f3baf06b9..ad82c3081 100644 --- a/src/sas/sasgui/perspectives/fitting/fitpage.py +++ b/src/sas/sasgui/perspectives/fitting/fitpage.py @@ -2364,8 +2364,8 @@ class FitPage(BasicPage): elif self.dx_percent is not None: percent = self.dx_percent/100 if self._is_2D(): - data.dqx_data[data.dqx_data == 0] = percent * data.qx_data - data.dqy_data[data.dqy_data == 0] = percent * data.qy_data + q = np.sqrt(data.qx_data**2 + data.qy_data**2) + data.dqx_data = data.dqy_data = percent*q else: data.dx = percent * data.x self.current_smearer = smear_selection(data, self.model)
comment:2 Changed 6 years ago by smk78
@pkienzle also says:
The code for generating resolution should not be in the GUI. Put it in sascalc/fit/qsmearing.py or sasmodels/resolution2d.py so that the qt gui can use the same code.
comment:3 Changed 6 years ago by pkienzle
A proper estimate of resolution requires too many details about the experiment configuration for the fitting panel. Could we perhaps attach it to the Q resolution estimator window that we already have?
Note: playing with resolution estimator, it seems to always give the same value for sigma x and sigma y even when the resolution is clearly an ellipse. That should be fixed before using the calculator elsewhere. Hammouda's online SANS course (ch 15, pg 9) has formulas for sigma x and sigma y.
comment:4 Changed 6 years ago by pkienzle
Resolution calculator note turned into Ticket #1244.
comment:5 Changed 6 years ago by butler
- Milestone changed from SasView 4.3.0 to SasView 4.2.2
Screen shot from Bei