|
| 1 | +.. _labpdfprocapp Example: |
| 2 | + |
| 3 | +:tocdepth: -1 |
| 4 | + |
| 5 | +labpdfprocapp Example |
| 6 | +##################### |
| 7 | + |
| 8 | +This example provides a quick-start tutorial for using ``diffpy.labpdfproc``. |
| 9 | +It will demonstrate how to apply absorption correction to your 1D diffraction data |
| 10 | +using either the command-line (CLI) or graphical user interface (GUI). |
| 11 | +For more details, run ``labpdfproc --help``. |
| 12 | + |
| 13 | +1. In order to use this app, |
| 14 | +you will need: (1) your input diffraction data file(s), and (2) information required to compute the mu*D value. |
| 15 | +To launch the GUI, use either ``labpdfproc`` or ``labpdfproc --gui``. |
| 16 | +Note that the GUI currently does not support Python 3.13. |
| 17 | + |
| 18 | +2. Here we provide a basic example first. |
| 19 | +Assume you have an uncorrected data called zro2_mo.xy in the current directory with a muD of 2.5 in two-theta. |
| 20 | +Then the minimum command would be: |
| 21 | + |
| 22 | +.. code-block:: python |
| 23 | +
|
| 24 | + labpdfproc zro2_mo.xy --mud 2.5 |
| 25 | +
|
| 26 | +3. You must provide at least one file path. |
| 27 | +In the GUI, the file browser supports selecting multiple files, but not entire folders. |
| 28 | +To include directories in GUI mode, you can: |
| 29 | +(1) create a text file named ``file_list.txt`` listing the desired paths and load it, |
| 30 | +(2) select all files in a folder manually, |
| 31 | +(3) manually enter file paths separated by semicolons. |
| 32 | + |
| 33 | +4. You can specify the wavelength in different ways: |
| 34 | + |
| 35 | +.. code-block:: python |
| 36 | +
|
| 37 | + # manually enter wavelength |
| 38 | + labpdfproc zro2_mo.xy --mud 2 -w 0.71303 |
| 39 | + # use a known anode_type |
| 40 | + labpdfproc zro2_mo.xy --mud 2 -a Mo |
| 41 | +
|
| 42 | +5. To specify the output directory where the corrected data should be saved: |
| 43 | + |
| 44 | +.. code-block:: python |
| 45 | +
|
| 46 | + labpdfproc zro2_mo.xy --mud 2 -w 0.71303 -o "output_dir" |
| 47 | +
|
| 48 | +This will save the processed data into the folder ``output_dir``. |
| 49 | + |
| 50 | +6. Additional options: |
| 51 | +- ``xtype``: choose the x-axis variable for your diffraction data. |
| 52 | +- You can also choose to output the cve file as well (via ``-o`` in CLI or checkbox in GUI). |
| 53 | +- Use the overwrite option carefully - it will replace existing files. |
| 54 | +- You are encouraged to input user information to help save progress and support reproducibility. |
| 55 | + |
| 56 | +.. code-block:: python |
| 57 | +
|
| 58 | + labpdfproc zro2_mo.xy --mud 2 -n Joe -e Joe@email.com --orcid 0000-0000-0000-0000 |
| 59 | +
|
| 60 | +
|
| 61 | +You can also enter this information during input prompts or store it in a diffpy configuration file. |
| 62 | +For a full tutorial, refer to the documentation on ``diffpy.utils``. |
0 commit comments