  Time-series analysis is critical for a diversity of applications in science
and engineering. By leveraging the strengths of modern gradient descent
algorithms, the Fourier transform, multi-resolution analysis, and Bayesian
spectral analysis, we propose a data-driven approach to time-frequency analysis
that circumvents many of the shortcomings of classic approaches, including the
extraction of nonstationary signals with discontinuities in their behavior. The
method introduced is equivalent to a {\em nonstationary Fourier mode
decomposition} (NFMD) for nonstationary and nonlinear temporal signals,
allowing for the accurate identification of instantaneous frequencies and their
amplitudes. The method is demonstrated on a diversity of time-series data,
including on data from cantilever-based electrostatic force microscopy to
quantify the time-dependent evolution of charging dynamics at the nanoscale.
