A method for generating spectrum-compatible accelerograms is proposed.
Generated accelerograms capture time and frequency features of real record.
The wavelet packet based procedure is flexible to use for engineering practice.
The max relative fitting error of spectrum can be as small as around 6% or below.