Permalink
Browse files

Small correction to units in PSD plot.

  • Loading branch information...
1 parent d9c19b4 commit 93a0e2b4ad9b96cc137ba31dd6246885b57e6d7e @fnoble fnoble committed Feb 19, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 peregrine/analysis/samples.py
@@ -125,14 +125,15 @@ def psd(samples, sampling_freq=None, ax=None, max_len=ANALYSIS_MAX_LEN):
ax = fig.add_subplot(111)
ax.set_title('Power Spectral Density')
- ax.set_ylabel('Power Spectral Density ($\mathrm{Hz}^{-1}$)')
if sampling_freq is None:
ax.set_xlabel('Frequency (Hz/$f_s$)')
+ ax.set_ylabel('Power Spectral Density ($f_s \cdot \mathrm{Hz}^{-1}$)')
sampling_freq = 1.0
else:
ax.ticklabel_format(style='sci', scilimits=(0,0), axis='x')
ax.set_xlabel('Frequency (Hz)')
+ ax.set_ylabel('Power Spectral Density ($\mathrm{Hz}^{-1}$)')
Pxx, freqs = mlab.psd(samples,
Fs=sampling_freq,

0 comments on commit 93a0e2b

Please sign in to comment.