Comparison of optical properties and band structures of SnSe2 and SnS2