PdfGetXConfig#
PdfGetXConfig prepares a diffpy.pdfgetx.PDFConfig object that captures all parameters required by PDFgetX3.
Inputs#
filename(optional): Path to a PDFgetX configuration file (.cfg). Lower priority than dictionary overrides.pdfgetx_options_dict(optional): Partial dictionary of configuration values (e.g.{"qmax": 23.0}).
Either input can be omitted, but at least one must be provided to obtain a meaningful configuration.
Outputs#
pdfgetx_options: Instance ofPDFConfigready to be handed toPdfGetXProcessor.
Merge logic#
Load options from
filenamewhen provided; otherwise start from the defaults returned bypdfgetx.PDFConfig().Apply each key/value from
pdfgetx_options_dicton top of the loaded configuration (highest priority).
This makes it straightforward to ship a baseline configuration file and inject beamline- or scan-specific overrides at runtime.
from ewokspdf.tasks.config import PdfGetXConfig
task = PdfGetXConfig()
task(filename="pdfgetx.cfg", pdfgetx_options_dict={"qmin": 1.0, "qmax": 25.0})
cfg = task.outputs.pdfgetx_options # diffpy.pdfgetx.PDFConfig