Using a discrete wavelet transform with a Meyer wavelet basis, we present a new quantitative algorithm for determining the onset time of Pi1 and Pi2 ULF waves in the nightside ionosphere with $20- to 40-s resolution at substorm expansion phase onset. We validate the algorithm by comparing both the ULF wave onset time and location to the optical onset determined by the Imager for Magnetopause-to-Aurora Global Exploration (IMAGE)?Far Ultraviolet Imager (FUV) instrument. In each of the six events analyzed, five substorm onsets and one pseudobreakup, the ULF onset is observed prior to the global optical onset observed by IMAGE at a station closely conjugate to the optical onset. The observed ULF onset times expand both latitudinally and longitudinally away from an epicenter of ULF wave power in the ionosphere. We further discuss the utility of the algorithm for diagnosing pseudobreakups and the relationship of the ULF onset epicenter to the meridians of elements of the substorm current wedge. The importance of the technique for establishing the causal sequence of events at substorm onset, especially in support of the multisatellite Time History of Events and Macroscale Interactions During Substorms (THEMIS) mission, is also described.