Files used by PDFgetX3

Configuration file

Configuration files may define the PDF processing parameters. By default, the pdfgetx3 program attempts to read “.pdfgetx3.cfg” file from the user HOME directory, then “.pdfgetx3.cfg” and “pdfgetx3.cfg” files from the current working directory. If configuration file has a different name, it needs to be specified with the -c, --config option.

The easiest way of creating a configuration file is to generate a template content using the --createconfig option as

pdfgetx3 --createconfig=test.cfg

and then change the generated test.cfg file in your favorite text editor. The configuration file follows a simple “varname=value” syntax, any lines starting with “#” are ignored as comments.

The configuration file has several sections marked as [SECTIONNAME]. The [DEFAULT] section is mandatory and it contains the default global settings. Any other sections are optional and they are applied only when selected with the -s, --section option on the command line. Thus

pdfgetx3 --config=test.cfg --section=nacl

would read the parameters from the [nacl] section after reading the defaults. Having several sections in the configuration file is useful when there are multiple measurements that share most of the parameters, but differ in a few of them, for example in the chemical composition. The configuration file can then contain sections per each sample that define only the composition, while all other parameters are specified just once in the global DEFAULT section.

Input files

PDFgetX3 accepts input powder diffraction data in the form of two-column text file, where the first column x is either the scattering angle 2Θ in degrees, momentum transfer Q in inverse nanometers or Q in inverse ångströms. The second column y contains the corresponding scattered intensities normalized per unit solid angle. The actual type of the x-values is identified by the dataformat parameter. The input files may contain header with comments or metadata, and the actual data are read from the first long section of numerical values.

The input files are usually passed as command-line arguments to the pdfgetx3 program and must be paths accessible from the current working directory. The environment variable


specifies additional directories that are searched for input and background data files. The PDFGETX3PATH is a list of absolute or relative paths separated by ":" on Linux and Mac or by ";" on Windows, that are searched for input files, when these cannot be found in the current working directory.

The -d, --datapath option may be used to define additional data directories besides those in the PDFGETX3PATH.

When the --find option is active, the pdfgetx3 arguments are understood as filename patterns and the input files are searched in the current and datapath directories.

Output files

PDFgetX3 can produce up to four different output data files:

  • .iq, I(Q) – These are the background-corrected intensities sampled on a regular Q-space grid in inverse ångströms.
  • .sq, S(Q) – This file contains the total scattering structure function, with the intensities normalized by average scattering factors and corrected by a polynomial fit.
  • .fq, F(Q) – This file contains the reduced structure function equal to Q(S(Q) - 1).
  • .gr, G(r) – this is the resultant PDF, where the first column is the separation r in ångströms and the second is the function G in Å-2.

You can specify what output files should be produced by setting the outputtypes parameter in the configuration file or by passing the -t, --outputtypes on the command line.

The header of all output files contains the parameter values that were used in the calculation and thus it is by itself a valid configuration file. When passed as an argument to the --config option, the PDFgetX3 will reproduce the previous calculation.