Is there a code to get a power spectrum equivalent to a velocity time history?

I am working on generating seimic noise numerically. I have a velocity time history. I want to generate power spectrum (power spectral density) compatible to the velocity time history. Is there any code for that?