In order to solve the difficulty in the optical testing for larg e non-circular flat mirrors,we use a non-recursive algorithm based on the inner products of polyn omials and the cholesky decomposition methods to complete data processing for the scanning pent aprism system (SPS),and develop the corresponding testing data fitting software.Using the Mont e_Carlo technology,we analyze the feasibility for the SPS to test the thirty meter telescope (TMT) te rtiary mirror,which is an elliptical flat mirror with size of 2.5m×3.5m.The s imulation results show that the SPS could measure the low order aberrations of this mirror with root mean square(RMS) error of 30.6nm,especially the power RMS of 9.6nm and astigmatism of 13.7nm,which proves the suitability of S PS in testing low order aberrations of large non-circular pupil optical flat mirrors