Optical nanowriting and relaxation in azobenzene polymers