Accelerated gradient methods for the X-ray imaging of solar flares