PdfGetXSaveAscii#
PdfGetXSaveAscii exports the PDF signals returned by PdfGetXProcessor into a set of plain-text files—one file per signal type (iq, sq, fq, gr) and per averaged profile.
Inputs#
filename: Base filename ending with.h5. The task derives the ASCII filenames from it.results: List ofPDFGetterobjects generated byPdfGetXProcessor.info: Metadata dictionary containing the averaging information (nb_avg).
Outputs#
saved: Boolean set toTruewhen at least one file is created.filenames: List of paths to the generated ASCII files.
File naming and contents#
Files are saved alongside the base
filename. The suffix encodes both the signal type and the averaging chunk, e.g.results_nb_avg4.iq.Each file contains two columns (axis and signal) with a header that records the PDFgetX configuration used to generate the data.
Empty or missing signals are skipped gracefully with debug logging.
from ewokspdf.tasks.save_ascii import PdfGetXSaveAscii
save = PdfGetXSaveAscii()
save(filename="/tmp/results.h5",
results=processor.outputs.results,
info=processor.outputs.info)
print(save.outputs.filenames)