Control of optical properties of YAG crystals by thermal annealing