  The lack of theoretical understanding of X-Ray Absorption Near Edge Structure
(XANES) spectroscopy makes the development of analysis tools for its study a
necessity. Here, an algorithm for judicious choice of local minima and maxima
points of XANES spectrum (experimental or simulated) is proposed, without any
loss of information on peaks location nor on peak strength. We call it the
Rising Sun Envelope Method, since it is based on successive regularizations of
the spectral measurement that, according to parameter choices that are
intrinsic to the measurements, keep peaks location and strength as invariants.
This is the first method that finds peaks in XANES automatically, without
depending on first derivative information. Nevertheless, a direct computation
of Absorption-Edge is provided, where we avoid the issue inflection point
computations based on the XANES second derivative, dealing instead with simpler
computations of inflection points of higher quality cubic spline approximation.
Besides applications of the algorithm to XANES, we illustrate further
applications in Electron Energy Loss Spectroscopy (EELS) and Raman spectra.
