added python SPCA code