Magnetron and pulsed laser deposition of silver and gold nanoparticles and discontinuous films and their optical properties