Optical properties and photo-induced memory effect related with structural phase transition in TlGaS2