Deposition and analysis of thin films