Convert Excel To Xrdml High Quality ✮

meta = 'anode': 'Cu', 'wavelength': 1.54059, 'start_angle': df['tt'].min(), 'end_angle': df['tt'].max(), 'step_size': df['tt'].diff().median(), 'scan_speed': 0.5 # degrees/min (calculate if possible)

How to Convert Excel to XRDML for High-Quality Diffraction Analysis convert excel to xrdml high quality

: Ensure your data is in two clean columns: 2-Theta (x-axis) and Intensity (y-axis). Remove all headers or text. meta = 'anode': 'Cu', 'wavelength': 1

# Date date_elem = ET.SubElement(measurement, 'date') date_elem.text = datetime.now().strftime('%Y-%m-%dT%H:%M:%S') | ... |

def excel_to_xrdml(excel_path, sheet_name=0, two_theta_col='2θ', intensity_col='Intensity', output_path=None, xray_wavelength=1.5406, step_size=None): """ Convert Excel XRD data to high-quality .xrdml file (PANalytical format)

| Mistake | Consequence | |---------|-------------| | Merged cells in Excel | Conversion fails or shifts data | | Different step sizes in one file | Invalid XRDML (non-uniform grid) | | Integer rounding of 2θ (e.g., 20.00 instead of 20.005) | Peak shifts by up to 0.01° | | Missing wavelength | Software rejects file or assumes wrong value | | Negative intensities | Invalid XRDML (must be >=0) |

| Column A (2θ) | Column B (Intensity) | |---------------|----------------------| | 10.0000 | 1254 | | 10.0050 | 1289 | | 10.0100 | 1301 | | ... | ... |

Go to Top