Texture analysis from diffraction spectra