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
mantidtotalscattering is a modern engine for reducing neutron total scattering data based on Mantid framework. It is a high-level framework which utilizes various low-level Mantid algorithms, going through all the necessary steps to bring the raw neutron time-of-flight scattering data to user-end analyzable data. By going through the whole workflow and applying a series of necessary corrections, it is expected that the end product is the neutron total scattering data sitting on an absolute scale.
Current issue contains a high-level summary for the overall workflow of mantidtotalscattering -- to be used as the backbone of the paper to report the modern interface for reducing neutron total scattering data.
Current repository contains the source code of mantidtotalscattering, including the main workflow together with multiple module files for various utilities used in the main workflow. Source codes concerning data reduction is mainly included in the following directory,
The absorption and multiple scattering corrections are implemented in a single-shot workflow and will be applied to the loaded raw data through a comprehensive donor workspace. Therefore, in the overall workflow, the donor workspace will be constructed first, including the calculated absorption coefficients and/or multiple scattering factors per specification in the input json file. When loading in the data, the donor workspace will be passed to the loader and applied directly to the loaded data. One thing to point out is, since we have the complication of container subtraction, the calculated absorption coefficients and/or multiple scattering factors are applied to both sample and container in a compact way.
The overall summary for the application of the absorption and/or multiple scattering corrections can be found in the following document,
# ALSO, alpha is the inverse of [effective] absorption coefficient, i.e.
# alpha = 1/A
When multiple scattering correction is enabled, the effective coefficients mentioned in those comment lines above contain the contribution from both absorption and multiple scattering effects.
Load in sample and container, apply absorption correction for each (following the rationale presented above),
The action of loading either sample or container is fundamentally based on the Mantid AlignAndFocusPowderFromFiles which is a wrapper script for the underlying AlignAndFocusPowder algorithm. Fundamentally, it is literally doing what its name says, i.e., align and focus the powder patterns coming from all detectors. This process involves the calibration and masking process -- the calibration and masking process is not involved in the mantidtotalscattering workflow. Instead, they were pre-configured using separate routine and the end result (DIFC values and mask pixel IDs) is stored in an H5 file which will then be read in by current mantidtotalscattering routine to further conduct the calibration and focusing step.
Load in vanadium and its background (i.e., empty instrument) and repeat the same process as mentioned above in step-3 for sample and container,
Save intermediate files, prepare for alternative ways for doing the absorption and multiple scattering corrections for vanadium. This part of codes needs to be refurbished to boost the performance of the workflow execution,
Whether we really need to keep those intermediate files. If not, we can save a lot of computation time spent on transformation in between different spaces.
The two unit conversion actions currently outside the if statement for alternative absorption correction routines need to be moved inside the if statement.
Strip vanadium diffraction peaks and smooth the pattern, in preparation for next step of normalization,
The Placzek method may not be generally working for many systems, so indeed we need to think about alternative ways to cope with the inelastic scattering properly. This is important especially for magnetic diffuse scattering for which the dominating signal is mainly located in the low-Q region and it overlaps strongly with the region where the inelastic scattering effect is strongest.
The application of Placzek type of correction involves the figuring out of incident flux and detector efficiency. The incident flux was estimated by looking at the monitor spectrum and correct it for monitor efficiency, which was then followed by a pattern fitting to obtain the incident flux function. The detector efficiency was approximated following the formula mentioned in the following paper,
Howe, McGreevy, and Howells, J., (1989), The analysis of liquid structure data from time-of-flight neutron diffractometry,Journal of Physics: Condensed Matter, Volume 1, Issue 22, pp. 3433-3451, doi: 10.1088/0953-8984/1/22/005.
At this point, it can be seen that with the mantidtotalscattering workflow, the reduction for total scattering and Bragg patterns goes through identical procedures.
The text was updated successfully, but these errors were encountered:
The main workflow starts from here,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Line 419 in cd20187
First, read in general input parameters from the input json file,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 423 to 792 in cd20187
Specifically, at the initial stage, we want to worry about absorption and multiple scattering,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 626 to 736 in cd20187
The absorption and multiple scattering corrections are implemented in a single-shot workflow and will be applied to the loaded raw data through a comprehensive donor workspace. Therefore, in the overall workflow, the donor workspace will be constructed first, including the calculated absorption coefficients and/or multiple scattering factors per specification in the input json file. When loading in the data, the donor workspace will be passed to the loader and applied directly to the loaded data. One thing to point out is, since we have the complication of container subtraction, the calculated absorption coefficients and/or multiple scattering factors are applied to both sample and container in a compact way.
The overall summary for the application of the absorption and/or multiple scattering corrections can be found in the following document,
https://latex.ornl.gov/read/pgpqpfkygtpd
The compact implementation of the effective coefficients is summarized in the following comment lines in the source code,
For sample and container:
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 845 to 860 in cd20187
For vanadium and empty instrument:
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 924 to 942 in cd20187
Load in sample and container, apply absorption correction for each (following the rationale presented above),
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 794 to 888 in cd20187
Load in vanadium and its background (i.e., empty instrument) and repeat the same process as mentioned above in step-3 for sample and container,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 890 to 961 in cd20187
Background subtraction for both sample and vanadium,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 977 to 1052 in cd20187
Save intermediate files, prepare for alternative ways for doing the absorption and multiple scattering corrections for vanadium. This part of codes needs to be refurbished to boost the performance of the workflow execution,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1054 to 1111 in cd20187
Strip vanadium diffraction peaks and smooth the pattern, in preparation for next step of normalization,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1116 to 1170 in cd20187
Vanadium inelastic correction using Placzek method, to the 1st or the 2nd order,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1172 to 1271 in cd20187
Normalization over vanadium,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1278 to 1426 in cd20187
Alternative way of doing absorption and multiple scattering corrections for sample,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1428 to 1481 in cd20187
Normalization over total number of atoms,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1483 to 1501 in cd20187
Wrapping up final factors to be applied,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1503 to 1524 in cd20187
Inelastic scattering correction for sample -- see the notes in step-8 above,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1526 to 1640 in cd20187
Calculate normalized S(Q), fit the high-Q level and apply an extra scale factor so that high-Q level should approach 1,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1651 to 1699 in cd20187
Save Bragg pattern, given physical banks,
mantid_total_scattering/total_scattering/reduction/total_scattering_reduction.py
Lines 1710 to 1761 in cd20187
The text was updated successfully, but these errors were encountered: