def calc_uncorrelated_signal_power(params):
for i, data_type in enumerate(['<STR_LIT>','<STR_LIT>']):<EOL><INDENT>if i % SIZE == RANK:<EOL><INDENT>f = h5py.File(os.path.join(params.savefolder, data_type + '<STR_LIT>'),'<STR_LIT:r>')<EOL>data = f['<STR_LIT:data>'].value<EOL>srate = f['<STR_LIT>'].value<EOL>if ana_params.mlab:<EOL><INDENT>Psum, freqs = plt.mlab.psd(data[<NUM_LIT:0>], NFFT=ana_params.NFFT, Fs=srate,<EOL>noverlap=ana_params.noverlap, window=ana_params.window)<EOL><DEDENT>else:<EOL><INDENT>[freqs, Psum] = hlp.powerspec([data[<NUM_LIT:0>]], tbin= <NUM_LIT:1.>/srate*<NUM_LIT>,<EOL>Df=ana_params.Df, pointProcess=False)<EOL><DEDENT>f.close()<EOL>P = np.zeros((data.shape[<NUM_LIT:0>],Psum.shape[<NUM_LIT:0>]))<EOL>for y in params.y:<EOL><INDENT>print('<STR_LIT>', y)<EOL>f = h5py.File(os.path.join(params.populations_path, '<STR_LIT>' %<EOL>(y,data_type) + '<STR_LIT>'),'<STR_LIT:r>')<EOL>data_y = f['<STR_LIT:data>'].value[:,:, ana_params.transient:]<EOL>for j in range(len(data_y)):<EOL><INDENT>data_yT = data_y[j].T - data_y[j].mean(axis=<NUM_LIT:1>)<EOL>data_y[j] = data_yT.T<EOL><DEDENT>srate = f['<STR_LIT>'].value<EOL>tvec = np.arange(data_y.shape[<NUM_LIT:2>]) * <NUM_LIT> / srate<EOL>f.close()<EOL>for j in range(len(data_y)): <EOL><INDENT>if ana_params.mlab:<EOL><INDENT>for ch in range(len(params.electrodeParams['<STR_LIT:z>'])): <EOL><INDENT>P_j_ch, freqs = plt.mlab.psd(data_y[j,ch],<EOL>NFFT=ana_params.NFFT, Fs=srate,<EOL>noverlap=ana_params.noverlap,<EOL>window=ana_params.window)<EOL>P[ch] += P_j_ch<EOL><DEDENT><DEDENT>else:<EOL><INDENT>[freqs, P_j] = hlp.powerspec(data_y[j], tbin= <NUM_LIT:1.>/srate*<NUM_LIT>,<EOL>Df=ana_params.Df, pointProcess=False)<EOL>mask = np.where(freqs >= <NUM_LIT:0.>)<EOL>freqs = freqs[mask]<EOL>P_j = P_j[:,mask][:,<NUM_LIT:0>,:]<EOL>P_j = P_j/tvec[tvec >= ana_params.transient].size**<NUM_LIT:2><EOL>P += P_j<EOL><DEDENT><DEDENT><DEDENT>P /= params.recordSingleContribFrac<EOL>f = h5py.File(os.path.join(params.savefolder, ana_params.analysis_folder,<EOL>data_type +  ana_params.fname_psd_uncorr),'<STR_LIT:w>')<EOL>f['<STR_LIT>']=freqs<EOL>f['<STR_LIT>']=P<EOL>f['<STR_LIT>']=ana_params.transient<EOL>f['<STR_LIT>']=ana_params.mlab<EOL>f['<STR_LIT>']=ana_params.NFFT<EOL>f['<STR_LIT>']=ana_params.noverlap<EOL>f['<STR_LIT>']=str(ana_params.window)<EOL>f['<STR_LIT>']=str(ana_params.Df)        <EOL>f.close()<EOL><DEDENT><DEDENT>return<EOL>
This function calculates the depth-resolved power spectrum of signals
    without taking into account any cross-correlation.