Power Factor Correction Methods In Python