|
| 1 | +.. _funcxy: |
| 2 | + |
| 3 | +Using funcxy with Commonly-Used Diffraction Software |
| 4 | +#################################################### |
| 5 | +The general xy morph ``funcxy`` can be used to tune parameters |
| 6 | +of many popular diffraction software functions. |
| 7 | + |
| 8 | +Below, we give templates for how one can use ``funcxy`` |
| 9 | +with `PDFgetx3 <https://www.diffpy.org/products/pdfgetx.html>`_ |
| 10 | +and `PyFai <https://pyfai.readthedocs.io/en/stable/>`_. |
| 11 | + |
| 12 | +Getting a Better PDF with PDFgetx3 |
| 13 | +================================== |
| 14 | +In PDFgetx3, the ``PDFGetter`` takes in a 1D diffraction |
| 15 | +pattern I(Q) and returns a PDF G(r). |
| 16 | + |
| 17 | +There are many parameters you can specify, such as |
| 18 | + - ``qmin``: Lower Q-cutoff for the Fourier transform giving the PDF |
| 19 | + - ``qmax``: Upper Q-cutoff for the Fourier transform giving the PDF |
| 20 | + - ``qmaxinst``: Upper Q-boundary for meaningful signal |
| 21 | + - ``rpoly``: Approximately the low-r bound of meaningful G(r) values |
| 22 | + |
| 23 | +Furthermore, you can supply a background file ``backgroundfile`` |
| 24 | +and subtract a scaled version of the background file by the |
| 25 | +scaling factor ``bgscale``. |
| 26 | + |
| 27 | +We will showcase an example of how one would refine over the |
| 28 | +``PDFGetter`` parameters using ``funcxy`` to obtain a PDF. |
| 29 | +.. code-block:: |
| 30 | +
|
| 31 | + from diffpy.pdfgetx.pdfgetter import PDFGetter |
| 32 | + from diffpy.morph.morphpy import morph_arrays |
| 33 | + from diffpy.utils.parsers.loaddata import loadData |
| 34 | +
|
| 35 | +
|
| 36 | +
|
| 37 | +
|
| 38 | +Performing Detector Calibration with PyFai |
| 39 | +========================================== |
0 commit comments