By recording X-ray photoelectron spectroscopic binding energy shifts, while subjecting samples to a variety of optical and electrical stimuli, information about charge accumulation on materials or surface structures can be obtained. These stimuli included d.c. as well as a.c. electrical and/or optical pulses covering a wide frequency range (10 −3 to 10 6 Hz) for probing charging and/or photovoltage shifts, stemming from impurities, dopants, defects, etc., whether created intentionally or not. The methodology is simple to implement and provides several new dimensions for thin films and materials analyses.