Electrical and optical characterization of grain boundaries in polycrystalline cadmium telluride