Python energy level diagram script