[Requirement] First implementation of PDF reduction workflow
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 3
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 17
Description
Executive summary
Implement and group methods to perform PDF data reduction (1st simplified implementation): from raw simulated data to 1D pair distribution function g(r) & co
Context and background knowledge
D. A. Keen, A comparison of various commonly used correlation functions for describing total scattering, J. Appl. Cryst. 34, 172 (2001) https://doi.org/10.1107/S0021889800019993
M. T. Dove and G. Li, Review: pair distribution functions from neutron total scattering for the study of local structure in disordered materials, Nuclear Analysis 1, 100037 (2022)
M. A. Hove, R. L. McGreevy and W. S. Howells, The analysis of liquid structure data from time-of-flight neutron diffractometry, J. Phys.: Condens. Matter 1, 3433 (1989)
https://powder.ornl.gov/total_scattering/data_reduction/mts_flow.html
https://pystog.readthedocs.io/en/latest/about.html
https://docs.mantidproject.org/v3.9.0/algorithms/PDFFourierTransform-v1.html
Inputs
Input data: raw TOF PDF diffraction data (NeXus or CSV)
If simulated, it should contain coherent and incoherent scattering for the sample
Cases for first implementation: sample, vanadium
Cases for whole workflow: sample in container, container, vanadium, (vanadium container), empty instrument (only experimental case) or background
Methodology
First workflow:
- Load sample and vanadium
- WFM stitching
- Convert to d-spacing with calibration (calibration file for standard conversion tof <-> d-spacing as as a first implementation)
- Convert sample and vanadium to Q
- Rebin
- Group detectors
- (Normalize by current)
- Sum over several “sample” runs if needed
- Strip Vanadium peaks
- Normalize sample by vanadium
- Normalize by total number of atoms in beam ( x atoms in vanadium / atoms in sample)
- Save S(Q) to file
- Calculate g(r) or G(r) and save to file (provide choice between functions)
For G(r) & co, see enclosed Jupyter notebook (functions calculated using Mantid):
pdf_red_mantid_scipp.ipynb
Outputs
Output data: S(Q) and selected "G(r)" as data and to disk (simple 2 or 3-columns ASCII for compatibility with GSAS-II, RMCprofile, pdfgui, diffpy-cmi)
Which interfaces are required?
Python module / function, Jupyter notebook
Test cases
- NOMAD data (Scicat) NOM_131610.nxs.h5 (SrTiO3 in container), NOM_131576.nxs.h5 (Vanadium). Note that for these files, the sample is in container. Therefore the reduced data from the simple workflow might not look right.
- Simulated DREAM data (https://project.esss.dk/nextcloud/index.php/s/zfNfbqHdk5coijC): Si sample and vanadium (2 files: incoherent only and inc+coh). Here are a few details about the simulated sample. The sample in McStas was simulated using Union
- Si powder for Powder process
- Incoherent process: incoherent scattering cross section=0.004 barns, packing_factor=1, unit cell volume=160.187954 (Angstrom**3)
- Inverse penetration depth from absorption at standard energy = 0.107 (1/m)
- Sample with cylindrical shape: radius=0.006 (m), yheight=0.05 (m)
Comments
This is the first implementation. Following steps would be (in no particular order):
- Add absorption correction
- Add reduction of container(s), background
- Add inelastic and multiple scattering corrections
Note that other requirements should be created in relation to the above future implementations (and links added to the above list)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked pdf_red_mantid_scipp.ipynb and the listed workflow requirements. Run the proposed reduction against NOM_131610.nxs.h5 and NOM_131576.nxs.h5 or the simulated DREAM Si and vanadium files; done means producing S(Q) and a selected g(r) or G(r) both in memory and as compatible ASCII files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100