You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to find the adjustment factor , b, for the inelastic incoherent level. The algorithm minimizes this cost function : SUM ( [I(q,lambda_ref) – I(q, lambda)]^2 ) over full q-ranges that all I(q,lambda) share. However, if you have very strong coherent scatterer like silica below
The algorithm over-subtract the background (b) and the cost function is still minimized (b varies from 0 to about 6, while I_max exceeds 1000 ) due to large weighting posed by the low-q/high-intensity data. As a result, I(q, lambda) at high q values q> 0.02 in the above example becomes negative, but still makes the cost function to be minimized.
Steps to Reproduce:
The above results can be provide from the scripts as follows.
The test json files can be found at /SNS/EQSANS/shared/codereview/test_ccd/20220407_inelfail/output/*.json
There are three test cases.
nocorrection : this one did not use the inelastic correction.
_inel : this one used inelastic correction with the selectminincoh = True
_inel_nomin : this one used inelastic correction but without selecting minincoh.
Results are summarized here:
As one can see for the _inel or _inel_nomin, they oversubtracted ‘b’ (as in I’ = I – b) and ended up having negative I’ for some higher q-values where I(q, lambda) < b(lambda). We believe that this happens because the low-q intensity (very strong intensity) dominates the minimization algorithm. Instead, we should focus on the high-q where generally incoherent scattering dominates.
Investigation/Analysis Results:
Proposed solution is as follows:
The adjustment factor, b, can be calculated from the equations:
Implementing this 1/I weighting to estimate b as described in the above writing. (The weighting is unique for each q value. In the above hand-written equation 1/Iqref is q dependent)
For the new error estimation of b, let’s try the uncertainty package for python to avoid long derivation. Then, the error estimation of I’ which is I-b will be straight forward.
Keep the old method somewhere so that we can go back if things doesn’t work. An option in json may not be necessary. An extra parameters in the function call should be enough.
The text was updated successfully, but these errors were encountered:
Problem Description:
In order to find the adjustment factor , b, for the inelastic incoherent level. The algorithm minimizes this cost function : SUM ( [I(q,lambda_ref) – I(q, lambda)]^2 ) over full q-ranges that all I(q,lambda) share. However, if you have very strong coherent scatterer like silica below
The algorithm over-subtract the background (b) and the cost function is still minimized (b varies from 0 to about 6, while I_max exceeds 1000 ) due to large weighting posed by the low-q/high-intensity data. As a result, I(q, lambda) at high q values q> 0.02 in the above example becomes negative, but still makes the cost function to be minimized.
Steps to Reproduce:
The above results can be provide from the scripts as follows.
The test json files can be found at /SNS/EQSANS/shared/codereview/test_ccd/20220407_inelfail/output/*.json
There are three test cases.
Results are summarized here:
As one can see for the _inel or _inel_nomin, they oversubtracted ‘b’ (as in I’ = I – b) and ended up having negative I’ for some higher q-values where I(q, lambda) < b(lambda). We believe that this happens because the low-q intensity (very strong intensity) dominates the minimization algorithm. Instead, we should focus on the high-q where generally incoherent scattering dominates.
Investigation/Analysis Results:
Proposed solution is as follows:
The adjustment factor, b, can be calculated from the equations:
The text was updated successfully, but these errors were encountered: