Program for calculating work functions from photoelectric data