Python Point Spread Function Optimization Theory