syncopy.plotting._plot_spectral._compute_pltArr¶

syncopy.plotting._plot_spectral.
_compute_pltArr
(self, nFreq, N, nTime, complexConversion, pltDtype, avg1='channel', avg2=None, trial='all', channel='all', freq='all', taper='all')[source]¶ Local helper that extracts/averages data from
SpectralData
object Parameters
self (
SpectralData
object) – SyncopySpectralData
object that is being processed by the respectivesinglepanelplot()
ormultipanelplot()
class methods defined in this module.nFreq (int) – Number of frequencies of interest
N (int) – Size of free dimension post averaging. Depending on avg1 and avg2 can be either nChan, nTap or 1
nTime (int) – Number of timepoints of interest. If object does not contain timefrequency data, nTime has to be 1
complexConversion (callable) – Automatically set by
_prep_spectral_plots()
to (potentially) convert complex Fourier coefficients to float.pltDtype (str or
numpy.dtype
) – Automatically set by_prep_spectral_plots()
: numeric type of (potentially converted) complex Fourier coefficients.avg1 (str or None) – First dimension for averaging. If None, no meanvalue is computed. Otherwise, avg1 can be either “channel” or “taper”.
avg2 (str or None) – Second dimension for averaging. If None, no meanvalue is computed. Otherwise, avg2 can be either “channel” or “taper”.
trial (str or list) – Either list of trial indices or “all”; set by
_prep_spectral_plots()
channel (str or
numpy.ndarray
) – Either array of channel specifiers or “all”; set by_prep_spectral_plots()
freq (str or
numpy.ndarray
) – Either array of frequency specifiers or “all”; set by_prep_spectral_plots()
taper (str or
numpy.ndarray
) – Either array of taper specifiers or “all”; set by_prep_spectral_plots()
 Returns
pltArr – Extracted/averaged data ready for plotting; if the
SpectralData
input object contains timefrequency data, pltArr is a threedimensional array of shape(nFreq, nTime, N)
, otherwise pltArr is twodimensional with shape(nFreq, N)
forN > 1
, or a onedimensional(nFreq,)
array ifN = 1
. Return type
1D, 2D or 3D
numpy.ndarray
Notes
This is an auxiliary method that is intended purely for internal use. Please refer to the userexposed methods
singlepanelplot()
and/ormultipanelplot()
to actually generate plots of Syncopy data objects.