def _prepare_tfr(data, decim, pick_ori, Ws, K, source_ori):
 n_times = data[:, :, ::decim].shape[2]
 n_freqs = len(Ws)
 n_sources = K.shape[0]
 is_free_ori = False
 if ((source_ori == FIFF.FIFFV_MNE_FREE_ORI) and (pick_ori is None)):
  is_free_ori = True
  n_sources //= 3
 shape = (n_sources, n_freqs, n_times)
 return (shape, is_free_ori)

def _prepare_tfr ( data , decim , pick_ori , Ws , K , source_ori ) : n_times = data [ : , : , : : decim ] . shape [ 2 ] n_freqs = len ( Ws ) n_sources = K . shape [ 0 ] is_free_ori = False if ( ( source_ori == FIFF . FIFFV_MNE_FREE_ORI ) and ( pick_ori is None ) ) : is_free_ori = True n_sources //= 3 shape = ( n_sources , n_freqs , n_times ) return ( shape , is_free_ori )
prepare tfr source localization .