Implements the principal components generalized projections algorithm for frequency resolved optical gating