Non-destructive X-ray diffraction