Text this: Characterization of diarylethene-based photoswitches with core and valence photoabsorption and photoemission spectroscopies.