You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is seems weird that get_spectra is the only name that starts with get_*. Why not spectra?
functions that returns similar quantities (eg. PSD estimates) should have common name prefix (or maybe suffix).
freq_response should make explicit that it works on IR models.
I don't like get_spectra_bi as it reminds me of bispectrum estimates which is not.
functions that are auxiliary functions (ie should not be used by average user) should start with _ to be explicitly marked as private (eg. it seems in coherence.py that all foo_compute functions are auxiliary functions to foo functions hence should be name rather _foo). The point is that the user should quickly see which function to use.
why sometimes mtm_ and sometimes multi_taper_ to refer to multi-taper method?
what are the naming convention for functions?
below the list of functions in spectral.
algorithms/spectral.py:
20 : def get_spectra(time_series, method=None):
144 : def get_spectra_bi(x, y, method=None):
186 : def periodogram(s, Fs=2 * np.pi, Sk=None, N=None, sides='default',
262 : def periodogram_csd(s, Fs=2 * np.pi, Sk=None, NFFT=None, sides='default',
369 : def dpss_windows(N, NW, Kmax):
449 : def mtm_cross_spectrum(tx, ty, weights, sides='twosided'):
557 : def multi_taper_psd(s, Fs=2 * np.pi, BW=None, adaptive=False,
710 : def multi_taper_csd(s, Fs=2 * np.pi, BW=None, low_bias=True,
834 : def freq_response(b, a=1., n_freqs=1024, sides='onesided'):
The text was updated successfully, but these errors were encountered: