Optical properties and dynamics of a photochromic bisthienylethene in solution and in a polymer film