Temperature gradient analyzers for compact high-resolution X-ray spectrometers