Python code for Polar iWL