from xrdmllib import XRDMLDocument doc = XRDMLDocument(data=df['intensity'].values, two_theta=df['tt'].values, metadata=meta) doc.save('converted_high_quality.xrdml')
Quality Rating: ⭐⭐⭐⭐ Pros: Free, automated, no data smoothing. Cons: Requires coding knowledge; manual metadata entry.
Before you look for third-party converters, check the software that controls your XRD machine. This is the highest quality method because it automatically injects the correct metadata (wavelength, divergence slits, etc.) into the header.
The Workflow:
Why this is best: It ensures the XML header (the metadata) matches the instrument's configuration exactly.
Advanced Convert
Batch/Folder Convert (CLI or API)
Integration with Lab Systems
df.dropna(inplace=True)
Before we discuss the how, we must address the why. A "low quality" XRDML file is worse than useless—it risks invalidating your phase identification.