The effects of As and Te on the crystallization and optical gaps of selenium