A signal processor generates basis functions and identifies at least one basis function component of a sensor signal in order to calculate a physiological measurement. The signal processor is advantageously applied to pulse oximetry so as to directly calculate oxygen saturation and so as to calculate a robust oxygen saturation measurement. In particular, a signal component transform may be calculated within a window around a derived pulse rate estimate. A signal component transform may also utilize sinusoidal basis functions, and an optimization of a signal component transform may occur at a particular frequency or a set of frequencies. A sinusoidal waveform or waveforms at that frequency or set of frequencies is generated to select associated red and infrared components of the sensor signal, and an oxygen saturation is calculated from a magnitude ratio of these components.