Gas sensor characterization through both contact potential difference and photopotential measurements