Photoemission simulation for photocathode design: theory and application to copper and silver surfaces