Python code to track extinction spots