pyyeti.psd.proc_psd_spec¶
- pyyeti.psd.proc_psd_spec(spec)[source]¶
Process PSD specification for other routines
- Parameters:
spec (2d ndarray or 2-element tuple/list) – If ndarray, its columns are
[Freq, PSD1, PSD2, ... PSDn]. Otherwise, it must be a 2-element tuple or list, eg:(Freq, PSD)where PSD is:[PSD1, PSD2, ... PSDn]. In the second usage, PSD can be 1d; in the first usage, PSD is always considered 2d.- Returns:
freq (1d ndarray) – The frequency vector in spec.
PSD (1d or 2d ndarray) – The PSD matrix or vector as noted above. Will be 1d only if the second usage of spec was used and PSD is 1d. Shape is either
(len(freq), n)or(len(freq),).npsds (integer) – Number of PSDs in PSD.
Notes
Any NaNs in the specification frequency are deleted (along with the corresponding PSD values).