A high resolution crystal diffraction spectrometer for X-ray analysis