Added Kgrad_theta to se_periodic. Fixed K (doesn't require third parameter)