Enhancing the optical sensing properties of semiconductors in the field of medical diagnostics, photovoltaics and light harvesting