Is there a formula to calculate the g level at a certain frequency and displacement during vibration testing?

Is there a formula to calculate the g level at a certain frequency and displacement during vibration testing?

The formula that relates g, frequency, and displacement for sinusoidal vibration is:

g = 0.0511 x f2 x D

Where g is zero-to-peak acceleration
f is the frequency and
D is the double amplitude displacement in inches.

For example, 0.5g at 2Hz requires a vibration system stroke of 2.45 inches double amplitude.

This formula applies ONLY to sine.