Compute a spectrogram. Compute and plot a spectrogram of data in *x*. Data are split into *NFFT* length segments and the spectrum of each section is computed. The windowing function *window* is applied to each segment, and the amount of overlap of each segment is specifie
(x, NFFT=None, Fs=None, detrend=None, window=None,
noverlap=None, pad_to=None, sides=None, scale_by_freq=None,
mode=None)
| 654 | |
| 655 | @_docstring.interpd |
| 656 | def specgram(x, NFFT=None, Fs=None, detrend=None, window=None, |
| 657 | noverlap=None, pad_to=None, sides=None, scale_by_freq=None, |
| 658 | mode=None): |
| 659 | """ |
| 660 | Compute a spectrogram. |
| 661 | |
| 662 | Compute and plot a spectrogram of data in *x*. Data are split into |
| 663 | *NFFT* length segments and the spectrum of each section is |
| 664 | computed. The windowing function *window* is applied to each |
| 665 | segment, and the amount of overlap of each segment is |
| 666 | specified with *noverlap*. |
| 667 | |
| 668 | Parameters |
| 669 | ---------- |
| 670 | x : array-like |
| 671 | 1-D array or sequence. |
| 672 | |
| 673 | %(Spectral)s |
| 674 | |
| 675 | %(PSD)s |
| 676 | |
| 677 | noverlap : int, default: 128 |
| 678 | The number of points of overlap between blocks. |
| 679 | mode : str, default: 'psd' |
| 680 | What sort of spectrum to use: |
| 681 | 'psd' |
| 682 | Returns the power spectral density. |
| 683 | 'complex' |
| 684 | Returns the complex-valued frequency spectrum. |
| 685 | 'magnitude' |
| 686 | Returns the magnitude spectrum. |
| 687 | 'angle' |
| 688 | Returns the phase spectrum without unwrapping. |
| 689 | 'phase' |
| 690 | Returns the phase spectrum with unwrapping. |
| 691 | |
| 692 | Returns |
| 693 | ------- |
| 694 | spectrum : array-like |
| 695 | 2D array, columns are the periodograms of successive segments. |
| 696 | |
| 697 | freqs : array-like |
| 698 | 1-D array, frequencies corresponding to the rows in *spectrum*. |
| 699 | |
| 700 | t : array-like |
| 701 | 1-D array, the times corresponding to midpoints of segments |
| 702 | (i.e the columns in *spectrum*). |
| 703 | |
| 704 | See Also |
| 705 | -------- |
| 706 | psd : differs in the overlap and in the return values. |
| 707 | complex_spectrum : similar, but with complex valued frequencies. |
| 708 | magnitude_spectrum : similar single segment when *mode* is 'magnitude'. |
| 709 | angle_spectrum : similar to single segment when *mode* is 'angle'. |
| 710 | phase_spectrum : similar to single segment when *mode* is 'phase'. |
| 711 | |
| 712 | Notes |
| 713 | ----- |
nothing calls this directly
no test coverage detected
searching dependent graphs…