X-ray Spectrum Reconstruction by Diamond Detectors with Linear Response to Dose Rate