Full Width Half Max Python Function Definition