AlGaAs diodes for X-ray spectroscopy