.. _SpectralDensity: SpectralDensity ======================= Calculates auto- and cross-spectral densities for a data stream. Also outputs coherences as well. Plots any of the above. Constructor --------------------- - :meth:`SpectralDensity.from_stream `: Make a :ref:`tiskitpy.SpectralDensity` object from a an obspy data :class:`Stream ` Properties --------------------- - ``ids``: a list of the channel ids - ``seed_ids``: a list of the channel seed_ids - ``freqs``: the frequencies of the spectral density functions - ``n_windows``: the number of data windows used to calculate the spectra - ``window_type``: The type of tapering window used when calculating the spectral densities - ``window_seconds``: Length of each window, in seconds - ``starttimes``: get a list containing the starttimes for each data window - ``used_times``: time spans used to calculate spectra - ``avoided_spans``: Time spans avoided during PSD calculation - ``clean_sequences``: list of clean_sequence lists, for each channel Methods --------------------- Get Methods ^^^^^^^^^^^^^^^^^^ - :meth:`autospect `: Auto-spectral density function for a channel - :meth:`coherence `: Coherence between two channels - :meth:`crossspect `: Cross-spectral density function between two channels - :meth:`channel_id `: Channel id, expanding wildcards and verifying that the result is unique - :meth:`seed_id `: The specified channel's seed_id, expanding wildcards and verifying that the result is unique - :meth:`channel_instrument_response `: Channel's instrument response - :meth:`channel_units `: A channel's input (physical) units - :meth:`units `: Units of a cross- or auto-spectra - :meth:`coh_signif `: The coherence significance level - :meth:`clean_sequence `: The clean sequence applied to a channel Other Methods ^^^^^^^^^^^^^^^^^^ - :meth:`plot_autospectra `: plot autospectra - :meth:`plot `: shortcut for :meth:`plot_autospectra ` - :meth:`plot_cross_spectra `: plot cross- (and auto-) spectra - :meth:`plot_coherences `: plot coherences - :meth:`plot_one_autospectra `: plot autospectra for one channel - :meth:`plot_one_spectra `: plot cross-spectra for the given channels - :meth:`plot_one_coherence `: plot coherence for the given channels - :meth:`plots `: overlay plot different SpectralDensity objects - :meth:`plots_coherences `: overlay plot coherences of different SpectralDensity objects Set Methods ^^^^^^^^^^^^^^^^^^ You probably won't ever use these (should I put a `_` before?) - :meth:`put_crossspect `: put a cross-spectral density in the given slot - :meth:`put_autospect `: same as :meth:`put_crossspect ` - :meth:`put_channel_instrument_response `: put a channel response in the given slot - :meth:`put_clean_sequence `: put a channel's clean_sequence into the object - :meth:`replace_channel_id `: change a channel id Example --------------------- :ref:`tiskitpy.SpectralDensity_example`