Gamma rays from halos around stars and the Sun