-
Notifications
You must be signed in to change notification settings - Fork 24
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
Load resolution shape from data file. #261
Comments
This is interesting. Can you point to any information where I can learn more? |
For the CANDOR instrument we have tiny slits on the detector, so small Δθ, and analyzer blades with narrow Δλ, so the ΔQ for each point is tiny. In particular, it is much smaller than the bin size we are using when we are stitching the data from about 1500 points down to 150. After normalizing by incident intensity we are left with a bunch of narrow peaks within a fixed width window which we average according to a mixture distribution. See comments in our reduction code here The way we are running CANDOR with many shorter measurements at a large number of angles gives us a lot more uniformity within each bin. If we instead measured fewer angles for longer to minimize the overlap region then Q distribution in bins in the overlap region would be too spiky to model as either uniform or Gaussian. I'm not sure what distribution is best for tabletop X-ray sources. The tricks we are doing for sample resolution broadening and angle offset correction only work because CANDOR has a 0.2 nm range of wavelengths. Simulations on an ISIS style instrument with 1.0+ nm range show they don't work. |
@pkienzle thank you for the information. |
How can one use refl1d to fit the uniform dQ distribution? |
Set refl1d/refl1d/lib/python/convolve.py Lines 14 to 111 in 428e347
This is wrapped in a numba jit. Brian may be able to tell you how well it performs relative to the C implementation here: refl1d/refl1d/lib/c/convolve.cc Lines 153 to 233 in 428e347
Note that we are not modifying the set of Q points used for the convolution when the form of the resolution function is changed. We should be ensuring that we have enough calculated points to support the ΔQ at each measured point. For a normal distribution this requires a wider window with points concentrated at the center. For a uniform distribution they should be sampled uniformly within the resolution width. The method |
For certain instruments (ToF, CANDOR) the reduced data after stitching multiple wavelengths is better described by a uniform ΔQ rather than a truncated normal. This information should be stored with the reduced file metadata and loaded with the file rather than requiring the user to specify it during load.
Make sure the webview GUI allows the form of the ΔQ resolution to be visible and editable on the page.
Note: the default is "uniform" in the BaseProbe dataclass but "normal" in the load4 function. Replace "uniform" with "normal" in the BaseProbe, and set the default resolution to None to use this default.
The text was updated successfully, but these errors were encountered: