{'fraction_non_alphanumeric': 0.02129817444219067, 'fraction_numerical': 0.0, 'mean_word_length': 5.950704225352113, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Photoreprogrammable dual-function grating based on photochromism and selective metal deposition.

We introduce photoreprogrammable dual-function gratings, which show different diffraction in transmission and reflection. Parallel metal lines on the photochromic diarylethene (DAE) surface were prepared by selective metal deposition, enabling one-dimensional diffraction in transmission and reflection. Then, another isomerization pattern was programmed on the DAE layer by light irradiation. This grating generated unique diffraction: one-dimensional diffraction in the reflection but two-dimensional diffraction in the transmission, and a dual-function grating was achieved. This programmed state on the DAE layer could be erased by UV irradiation and could be reprogrammed to generate different diffraction by visible laser scanning. This result shows the great potential of the photoreprogrammable dual-function grating as a key element in various future optical devices and systems.