Files used in PDF extraction¶
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 pdfgetn3 program works in the same way,
except it checks for configuration files
~/.pdfgetn3.cfg
, .pdfgetn3.cfg
and pdfgetn3.cfg
.
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 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 and PDFgetN3 accept 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 pdfgetx3 or pdfgetn3 programs and must be paths accessible from the current working directory.
Input files can be also defined by setting the inputfile
value in the configuration file. The -d, --datapath
option can be then used to provide additional data directories to
search for these inputs and for the backgroundfile
.
This is to support configuration files located in a different
directory than the data.
When the --find
option is active, the pdfgetx3 arguments
are understood as filename patterns and the input files are found
in the current or specified directory.
Output files¶
PDFgetX3 and PDFgetN3 can produce up to four different output data files:
- .iq – I(Q), the background-corrected intensities sampled on a regular Q-space grid in inverse ångströms,
- .sq – S(Q), the total scattering structure function, with intensities normalized by average scattering factors and corrected by a polynomial fit,
- .fq – F(Q), the reduced structure function equal to Q(S(Q) - 1),
- .gr – G(r), 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.