Plot the phase spectrum. Compute the phase spectrum (unwrapped angle spectrum) of *x*. Data is padded to a length of *pad_to* and the windowing function *window* is applied to the signal. Parameters ---------- x : 1-D array or sequence
(self, x, Fs=None, Fc=None, window=None,
pad_to=None, sides=None, **kwargs)
| 8376 | @_preprocess_data(replace_names=["x"]) |
| 8377 | @_docstring.interpd |
| 8378 | def phase_spectrum(self, x, Fs=None, Fc=None, window=None, |
| 8379 | pad_to=None, sides=None, **kwargs): |
| 8380 | """ |
| 8381 | Plot the phase spectrum. |
| 8382 | |
| 8383 | Compute the phase spectrum (unwrapped angle spectrum) of *x*. |
| 8384 | Data is padded to a length of *pad_to* and the windowing function |
| 8385 | *window* is applied to the signal. |
| 8386 | |
| 8387 | Parameters |
| 8388 | ---------- |
| 8389 | x : 1-D array or sequence |
| 8390 | Array or sequence containing the data |
| 8391 | |
| 8392 | %(Spectral)s |
| 8393 | |
| 8394 | %(Single_Spectrum)s |
| 8395 | |
| 8396 | Fc : int, default: 0 |
| 8397 | The center frequency of *x*, which offsets the x extents of the |
| 8398 | plot to reflect the frequency range used when a signal is acquired |
| 8399 | and then filtered and downsampled to baseband. |
| 8400 | |
| 8401 | Returns |
| 8402 | ------- |
| 8403 | spectrum : 1-D array |
| 8404 | The values for the phase spectrum in radians (real valued). |
| 8405 | |
| 8406 | freqs : 1-D array |
| 8407 | The frequencies corresponding to the elements in *spectrum*. |
| 8408 | |
| 8409 | line : `~matplotlib.lines.Line2D` |
| 8410 | The line created by this function. |
| 8411 | |
| 8412 | Other Parameters |
| 8413 | ---------------- |
| 8414 | data : indexable object, optional |
| 8415 | DATA_PARAMETER_PLACEHOLDER |
| 8416 | |
| 8417 | **kwargs |
| 8418 | Keyword arguments control the `.Line2D` properties: |
| 8419 | |
| 8420 | %(Line2D:kwdoc)s |
| 8421 | |
| 8422 | See Also |
| 8423 | -------- |
| 8424 | magnitude_spectrum |
| 8425 | Plots the magnitudes of the corresponding frequencies. |
| 8426 | angle_spectrum |
| 8427 | Plots the wrapped version of this function. |
| 8428 | specgram |
| 8429 | Can plot the phase spectrum of segments within the signal in a |
| 8430 | colormap. |
| 8431 | """ |
| 8432 | if Fc is None: |
| 8433 | Fc = 0 |
| 8434 | |
| 8435 | spec, freqs = mlab.phase_spectrum(x=x, Fs=Fs, window=window, |