Optical properties of LaNiO3 films tuned from compressive to tensile strain