1. Structure of the measurements directory

The folder holding the data of one particular measurement is named with its measurement ID and located in the measurements directory. A custom path to the measurements directory can be set by assigning it to the environment variable XRD_TOOLS_MEASUREMENTS_DIR (see Example: Setting the XRD Measurement Data Directory).

During the addition of a measurement, a <measurement_id>_meta.json file is created, which contains the metadata of the measurement. Moreover, a ASCII datafile can be provided (e.g. *.xy, *.asc). If so, a <measurement_id>_data.csv is created and an archived copy of the source data (<measurement_id>_source-data.zip) is added. All created data files are stored within the data subdirectory of the measurement folder.

Note

Currently, the ASCII data need to be separated by white spaces or tabs and no header should be present. The first column is assumed to be the 2theta value in degree, and the second column the intensity in counts.

In addition to the data files, changes of measurement properties are tracked in a <measurement_id>.log file which is stored in the corresponding measurement folder. The structure of the XRD_TOOLS_MEASUREMENTS_DIR with one measurement (Test1) might look as follows:

...
└── XRD_measurements
    └── Test1
        ├── data
           ├── Test1_data.csv
           ├── Test1_meta.json
           └── Test1_source-data.zip
        └── Test1.log

1.1. Measurement protocol

A protocol in Markdown format can be created for an existing measurement. Its content is generated by inserting certain metadata into a measurement protocol template. If a measurement protocol is created, it is stored in the corresponding measurement root folder, as shown for Test2 in the example underneath.

...
└── XRD_measurements
    ├── ...
    └── Test2
        ├── data
           ├── Test2_data.csv
           ├── Test2_meta.json
           └── Test2_source-data.zip
        ├── Test2.log
        └── Test2_protocol.md

The protocol template can be customised and multiple templates can be added, which are stored at the location specified by the environment variable XRD_TOOLS_TEMPLATE_DIR. If multiple templates exists, the user has to define the one which should be considered to create the protocol.

In case the latter is done via the Command line interface, a selection menu lists all available templates to the user, allowing to specify the one that should be used to create the measurement protocol.

1.2. Refined data

A CLI command allows to create a refinement data subdirectory and adds the scan as *.xy data file which is opened with Profex in order to perform full-pattern refinements. Such a refinement directory was created for the measurement Test3 in the example shown in the code block underneath.

...
└── XRD_measurements
    ├── ...
    └── Test3
        ├── data
           ├── refinement
              ├── my_device.geq
              ├── my_device.ger
              ├── my_device.SAV
              ├── my_structure1.str
              ├── my_structure2.str
              ├── Test3-Phase1.cif
              ├── Test3-Phase2.cif
              ├── Test3.dia
              ├── Test3.lst
              ├── Test3.par
              ├── Test3.sav
              └── Test3.xy
           ├── Test3_data.csv
           ├── Test3_meta.json
           ├── Test3_refined.csv
           ├── Test3_refined.json
           └── Test3_source-data.zip
        ├── results
           ├── Test3_refined_Phase1.cif
           └── Test3_refined_Phase2.cif
        └── Test3.log

The refinement folder is used by Profex to store data related to the refinement. In case a refinement was performed beforehand, like for measurement Test3 in the example underneath, the existing refinement project is opened with Profex if the command is called. Moreover, the refined x/y data series (I_calc, I_bg, I_phase-name) are stored in the measurement data subfolder (e.g. Test3_refined.csv).

Statistical values and mass fractions of the refined phases are stored in the Test3_refined.json file and if *.cif files of refined phases were created, they are copied into the results subdirectory.

The integration of Profex/BGMN is realised by the xrd_tools.plugins.refinement_profex.