This is an example program which produces power spectra of seismometer ground motion. It is intended for use with a Guralp CMG-40T Broadband Seismometer http://www.guralp.demon.co.uk/ http://www.guralp.demon.co.uk/, with the velocity sensing output set for the Hz band and the gain set to 400 volts-sec/meter. The normalization constants are defined with a line that reads something like this.
const float norm=((0.25/65536.0)*(1.0/400.0)*(1.0/(2.0*M_PI)));Here the constants assume that the ADC that the seismometer is connected to records 65536 ADC counts per volts input and that the gain (single-ended) is set to 400 volts-sec/meter. The and a factor of frequency arise in the code in converting velocity to position. The program outputs postscript and/or jpeg files labeled by GPS time.