Local structure from diffraction