Mechanism of reversible photoinduced optical effects in amorphous As2S3