Adding psd
Adding a possibility to calculate PSD with matplotlib.psd
. Example code:
X1.spectrum(spectrum_type='psd')
Additionaly:
- Fixing a bug where time series would be used only from the first loaded file (now time series from all files are grouped together)
- Adding
omega_exponent
(optional) toresponse
dictionary. This will multiply response by the omega factor raised to specified power. This way one could convert the units accordingly at the same time as calculating response. E.g. response "digital counts" -> "m/s" (velocity) turns into "digital counts" -> "m" (displacement) by specifyingomega_exponent=-1
:X1.response = {"poles" : [-0.036614 +0.037059j, -0.036614 -0.037059j, -32.55, -142, -364 +404j, -364 -404j, -1260, -4900 +5200j, -4900 -5200j, -7100 +1700j, -7100 -1700j], "zeros" : [0, 0, -31.63, -160, -350, -3177], "scale_factor" : 1202.5 * 8.31871e17 * 400000,#V/(m/s) times gain times counts/V "omega_exponent" : -1}#convert from m/s to m
Edited by Artem Basalaev