60
60
61
61
def window_hanning (x ):
62
62
"""
63
- Return x times the hanning window of len(x ).
63
+ Return *x* times the Hanning (or Hann) window of len(*x* ).
64
64
65
65
See Also
66
66
--------
@@ -71,7 +71,7 @@ def window_hanning(x):
71
71
72
72
def window_none (x ):
73
73
"""
74
- No window function; simply return x .
74
+ No window function; simply return *x* .
75
75
76
76
See Also
77
77
--------
@@ -82,7 +82,7 @@ def window_none(x):
82
82
83
83
def detrend (x , key = None , axis = None ):
84
84
"""
85
- Return x with its trend removed.
85
+ Return *x* with its trend removed.
86
86
87
87
Parameters
88
88
----------
@@ -131,7 +131,7 @@ def detrend(x, key=None, axis=None):
131
131
132
132
def detrend_mean (x , axis = None ):
133
133
"""
134
- Return x minus the mean(x ).
134
+ Return *x* minus the mean(*x* ).
135
135
136
136
Parameters
137
137
----------
@@ -140,7 +140,7 @@ def detrend_mean(x, axis=None):
140
140
Can have any dimensionality
141
141
142
142
axis : int
143
- The axis along which to take the mean. See numpy.mean for a
143
+ The axis along which to take the mean. See ` numpy.mean` for a
144
144
description of this argument.
145
145
146
146
See Also
@@ -159,7 +159,7 @@ def detrend_mean(x, axis=None):
159
159
160
160
def detrend_none (x , axis = None ):
161
161
"""
162
- Return x : no detrending.
162
+ Return *x* : no detrending.
163
163
164
164
Parameters
165
165
----------
@@ -181,7 +181,7 @@ def detrend_none(x, axis=None):
181
181
182
182
def detrend_linear (y ):
183
183
"""
184
- Return x minus best fit line; 'linear' detrending.
184
+ Return *x* minus best fit line; 'linear' detrending.
185
185
186
186
Parameters
187
187
----------
@@ -216,7 +216,7 @@ def detrend_linear(y):
216
216
@_api .deprecated ("3.6" )
217
217
def stride_windows (x , n , noverlap = None , axis = 0 ):
218
218
"""
219
- Get all windows of x with length n as a single array,
219
+ Get all windows of *x* with length *n* as a single array,
220
220
using strides to avoid data duplication.
221
221
222
222
.. warning::
@@ -497,8 +497,8 @@ def _single_spectrum_helper(
497
497
the FFT. While not increasing the actual resolution of the spectrum (the
498
498
minimum distance between resolvable peaks), this can give more points in
499
499
the plot, allowing for more detail. This corresponds to the *n* parameter
500
- in the call to fft(). The default is None, which sets *pad_to* equal to
501
- the length of the input signal (i.e. no padding).""" ,
500
+ in the call to `~numpy. fft.fft`. The default is None, which sets *pad_to*
501
+ equal to the length of the input signal (i.e. no padding).""" ,
502
502
503
503
PSD = """\
504
504
pad_to : int, optional
@@ -507,8 +507,8 @@ def _single_spectrum_helper(
507
507
of data points used. While not increasing the actual resolution of the
508
508
spectrum (the minimum distance between resolvable peaks), this can give
509
509
more points in the plot, allowing for more detail. This corresponds to
510
- the *n* parameter in the call to fft(). The default is None, which sets
511
- *pad_to* equal to *NFFT*
510
+ the *n* parameter in the call to `~numpy. fft.fft`. The default is None,
511
+ which sets *pad_to* equal to *NFFT*
512
512
513
513
NFFT : int, default: 256
514
514
The number of data points used in each block for the FFT. A power 2 is
@@ -526,7 +526,7 @@ def _single_spectrum_helper(
526
526
527
527
scale_by_freq : bool, default: True
528
528
Whether the resulting density values should be scaled by the scaling
529
- frequency, which gives density in units of Hz^-1 . This allows for
529
+ frequency, which gives density in units of 1/Hz . This allows for
530
530
integration over the returned frequency values. The default is True for
531
531
MATLAB compatibility.""" )
532
532
@@ -714,11 +714,11 @@ def specgram(x, NFFT=None, Fs=None, detrend=None, window=None,
714
714
"""
715
715
Compute a spectrogram.
716
716
717
- Compute and plot a spectrogram of data in x . Data are split into
718
- NFFT length segments and the spectrum of each section is
719
- computed. The windowing function window is applied to each
717
+ Compute and plot a spectrogram of data in *x* . Data are split into
718
+ * NFFT* length segments and the spectrum of each section is
719
+ computed. The windowing function * window* is applied to each
720
720
segment, and the amount of overlap of each segment is
721
- specified with noverlap.
721
+ specified with * noverlap* .
722
722
723
723
Parameters
724
724
----------
@@ -760,13 +760,13 @@ def specgram(x, NFFT=None, Fs=None, detrend=None, window=None,
760
760
--------
761
761
psd : differs in the overlap and in the return values.
762
762
complex_spectrum : similar, but with complex valued frequencies.
763
- magnitude_spectrum : similar single segment when mode is 'magnitude'.
764
- angle_spectrum : similar to single segment when mode is 'angle'.
765
- phase_spectrum : similar to single segment when mode is 'phase'.
763
+ magnitude_spectrum : similar single segment when * mode* is 'magnitude'.
764
+ angle_spectrum : similar to single segment when * mode* is 'angle'.
765
+ phase_spectrum : similar to single segment when * mode* is 'phase'.
766
766
767
767
Notes
768
768
-----
769
- detrend and scale_by_freq only apply when *mode* is set to 'psd'.
769
+ * detrend* and * scale_by_freq* only apply when *mode* is set to 'psd'.
770
770
771
771
"""
772
772
if noverlap is None :
0 commit comments