Finish generate_pm_ratio script