def fig_lfp_corr(params, savefolders, transient=<NUM_LIT:200>,<EOL>channels=[<NUM_LIT:0>,<NUM_LIT:3>,<NUM_LIT:7>,<NUM_LIT:11>,<NUM_LIT>], Df=None,<EOL>mlab=True, NFFT=<NUM_LIT>, noverlap=<NUM_LIT>,<EOL>window=plt.mlab.window_hanning,<EOL>letterslist=['<STR_LIT>', '<STR_LIT>'], data_type = '<STR_LIT>'):
ana_params.set_PLOS_2column_fig_style(ratio=<NUM_LIT:0.5>)<EOL>fig = plt.figure()<EOL>fig.subplots_adjust(left=<NUM_LIT>, right=<NUM_LIT>, bottom=<NUM_LIT:0.1>, wspace=<NUM_LIT>, hspace=<NUM_LIT:0.1>)<EOL>gs = gridspec.GridSpec(<NUM_LIT:5>, <NUM_LIT:4>)<EOL>for i, (savefolder, letters) in enumerate(zip(savefolders, letterslist)):<EOL><INDENT>params.savefolder = os.path.join(os.path.split(params.savefolder)[<NUM_LIT:0>],<EOL>savefolder)<EOL>params.figures_path = os.path.join(params.savefolder, '<STR_LIT>')<EOL>params.spike_output_path = os.path.join(params.savefolder,<EOL>'<STR_LIT>')<EOL>params.networkSimParams['<STR_LIT>'] = params.spike_output_path<EOL>f = h5py.File(os.path.join(params.savefolder, ana_params.analysis_folder, data_type + ana_params.fname_psd),'<STR_LIT:r>')<EOL>freqs = f['<STR_LIT>'].value<EOL>LFP_PSD_corr = f['<STR_LIT>'].value<EOL>f.close()<EOL>f = h5py.File(os.path.join(params.savefolder, ana_params.analysis_folder, data_type +  ana_params.fname_psd_uncorr),'<STR_LIT:r>')<EOL>freqs = f['<STR_LIT>'].value<EOL>LFP_PSD_uncorr = f['<STR_LIT>'].value<EOL>f.close()<EOL>ax = fig.add_subplot(gs[<NUM_LIT:0>, (i % <NUM_LIT:2>)*<NUM_LIT:2>]) <EOL>phlp.remove_axis_junk(ax)<EOL>ax.loglog(freqs,LFP_PSD_corr[channels[<NUM_LIT:0>]], color='<STR_LIT:k>', label='<STR_LIT>')<EOL>ax.loglog(freqs,LFP_PSD_uncorr[channels[<NUM_LIT:0>]],<EOL>color='<STR_LIT>' if analysis_params.bw else analysis_params.colorP,<EOL>lw=<NUM_LIT:1>,<EOL>label='<STR_LIT>')<EOL>ax.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax.text(<NUM_LIT>,<NUM_LIT>,'<STR_LIT>' %(channels[<NUM_LIT:0>]+<NUM_LIT:1>),horizontalalignment='<STR_LIT:left>',<EOL>verticalalignment='<STR_LIT>',<EOL>fontsize=<NUM_LIT:6>, <EOL>transform=ax.transAxes)<EOL>ax.yaxis.set_minor_locator(plt.NullLocator())<EOL>ax.set_ylabel('<STR_LIT>', labelpad=<NUM_LIT:0.>)<EOL>ax.set_xticks([])<EOL>ax.set_xticklabels([])<EOL>ax.tick_params(axis='<STR_LIT:y>',which='<STR_LIT>',bottom='<STR_LIT>')<EOL>ax.set_xlim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_ylim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_yticks([<NUM_LIT>,<NUM_LIT>,<NUM_LIT>])<EOL>ax.set_title('<STR_LIT>')<EOL>phlp.annotate_subplot(ax, ncols=<NUM_LIT:4>, nrows=<NUM_LIT:5>, letter=letters[<NUM_LIT:0>],<EOL>linear_offset=<NUM_LIT>)       <EOL>ax = fig.add_subplot(gs[<NUM_LIT:1>, (i % <NUM_LIT:2>)*<NUM_LIT:2>])<EOL>phlp.remove_axis_junk(ax)<EOL>ax.loglog(freqs,LFP_PSD_corr[channels[<NUM_LIT:1>]], color='<STR_LIT:k>', label='<STR_LIT>')<EOL>ax.loglog(freqs,LFP_PSD_uncorr[channels[<NUM_LIT:1>]],<EOL>color='<STR_LIT>' if analysis_params.bw else analysis_params.colorP,<EOL>lw=<NUM_LIT:1>,<EOL>label='<STR_LIT>')<EOL>ax.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax.text(<NUM_LIT>,<NUM_LIT>,'<STR_LIT>' %(channels[<NUM_LIT:1>]+<NUM_LIT:1>),horizontalalignment='<STR_LIT:left>',<EOL>verticalalignment='<STR_LIT>',<EOL>fontsize=<NUM_LIT:6>, <EOL>transform=ax.transAxes)<EOL>ax.yaxis.set_minor_locator(plt.NullLocator())<EOL>ax.set_xticks([])<EOL>ax.set_xticklabels([])<EOL>ax.tick_params(axis='<STR_LIT:y>',which='<STR_LIT>',bottom='<STR_LIT>')<EOL>ax.set_xlim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_ylim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_yticks([<NUM_LIT>,<NUM_LIT>,<NUM_LIT>])<EOL>ax.set_yticklabels([])<EOL>ax = fig.add_subplot(gs[<NUM_LIT:2>, (i % <NUM_LIT:2>)*<NUM_LIT:2>])<EOL>phlp.remove_axis_junk(ax)<EOL>ax.loglog(freqs,LFP_PSD_corr[channels[<NUM_LIT:2>]], color='<STR_LIT:k>', label='<STR_LIT>')<EOL>ax.loglog(freqs,LFP_PSD_uncorr[channels[<NUM_LIT:2>]],<EOL>color='<STR_LIT>' if analysis_params.bw else analysis_params.colorP,<EOL>lw=<NUM_LIT:1>,<EOL>label='<STR_LIT>')   <EOL>ax.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax.text(<NUM_LIT>,<NUM_LIT>,'<STR_LIT>' %(channels[<NUM_LIT:2>]+<NUM_LIT:1>),horizontalalignment='<STR_LIT:left>',<EOL>verticalalignment='<STR_LIT>',<EOL>fontsize=<NUM_LIT:6>, <EOL>transform=ax.transAxes)<EOL>ax.yaxis.set_minor_locator(plt.NullLocator())<EOL>ax.set_xticks([])<EOL>ax.set_xticklabels([])<EOL>ax.tick_params(axis='<STR_LIT:y>',which='<STR_LIT>',bottom='<STR_LIT>')<EOL>ax.set_xlim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_ylim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_yticks([<NUM_LIT>,<NUM_LIT>,<NUM_LIT>])<EOL>ax.set_yticklabels([])<EOL>ax = fig.add_subplot(gs[<NUM_LIT:3>, (i % <NUM_LIT:2>)*<NUM_LIT:2>]) <EOL>phlp.remove_axis_junk(ax)<EOL>ax.loglog(freqs,LFP_PSD_corr[channels[<NUM_LIT:3>]], color='<STR_LIT:k>', label='<STR_LIT>')<EOL>ax.loglog(freqs,LFP_PSD_uncorr[channels[<NUM_LIT:3>]],<EOL>color='<STR_LIT>' if analysis_params.bw else analysis_params.colorP,<EOL>lw=<NUM_LIT:1>,<EOL>label='<STR_LIT>')   <EOL>ax.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax.text(<NUM_LIT>,<NUM_LIT>,'<STR_LIT>' %(channels[<NUM_LIT:3>]+<NUM_LIT:1>),horizontalalignment='<STR_LIT:left>',<EOL>verticalalignment='<STR_LIT>',<EOL>fontsize=<NUM_LIT:6>, <EOL>transform=ax.transAxes)<EOL>ax.yaxis.set_minor_locator(plt.NullLocator())<EOL>ax.set_xticks([])<EOL>ax.set_xticklabels([])<EOL>ax.tick_params(axis='<STR_LIT:y>',which='<STR_LIT>',bottom='<STR_LIT>')<EOL>ax.set_xlim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_ylim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_yticks([<NUM_LIT>,<NUM_LIT>,<NUM_LIT>])<EOL>ax.set_yticklabels([])<EOL>ax = fig.add_subplot(gs[<NUM_LIT:4>, (i % <NUM_LIT:2>)*<NUM_LIT:2>])<EOL>phlp.remove_axis_junk(ax)<EOL>ax.loglog(freqs,LFP_PSD_corr[channels[<NUM_LIT:4>]], color='<STR_LIT:k>', label='<STR_LIT>')<EOL>ax.loglog(freqs,LFP_PSD_uncorr[channels[<NUM_LIT:4>]],<EOL>color='<STR_LIT>' if analysis_params.bw else analysis_params.colorP,<EOL>lw=<NUM_LIT:1>,<EOL>label='<STR_LIT>')   <EOL>ax.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>ax.set_xlabel(r'<STR_LIT>', labelpad=<NUM_LIT>)<EOL>ax.text(<NUM_LIT>,<NUM_LIT>,'<STR_LIT>' %(channels[<NUM_LIT:4>]+<NUM_LIT:1>),horizontalalignment='<STR_LIT:left>',<EOL>verticalalignment='<STR_LIT>',<EOL>fontsize=<NUM_LIT:6>, <EOL>transform=ax.transAxes)<EOL>ax.yaxis.set_minor_locator(plt.NullLocator())<EOL>ax.tick_params(axis='<STR_LIT:y>',which='<STR_LIT>',bottom='<STR_LIT>')<EOL>ax.set_xlim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_ylim(<NUM_LIT>,<NUM_LIT>)<EOL>ax.set_yticks([<NUM_LIT>,<NUM_LIT>,<NUM_LIT>])<EOL>ax.set_yticklabels([])<EOL>ax = fig.add_subplot(gs[:, (i % <NUM_LIT:2>)*<NUM_LIT:2> + <NUM_LIT:1>]) <EOL>phlp.annotate_subplot(ax, ncols=<NUM_LIT:4>, nrows=<NUM_LIT:1>, letter=letters[<NUM_LIT:1>],<EOL>linear_offset=<NUM_LIT>)<EOL>phlp.remove_axis_junk(ax)<EOL>ax.set_title('<STR_LIT>')<EOL>PSD_ratio = LFP_PSD_corr/LFP_PSD_uncorr<EOL>zvec = np.r_[params.electrodeParams['<STR_LIT:z>']]<EOL>zvec = np.r_[zvec, zvec[-<NUM_LIT:1>] + np.diff(zvec)[-<NUM_LIT:1>]]<EOL>inds = freqs >= <NUM_LIT:1>  <EOL>im = ax.pcolormesh(freqs[inds], zvec+<NUM_LIT>, PSD_ratio[:, inds],<EOL>rasterized=False,<EOL>cmap=plt.get_cmap('<STR_LIT>', <NUM_LIT:12>) if analysis_params.bw else plt.get_cmap('<STR_LIT>', <NUM_LIT:12>),<EOL>vmin=<NUM_LIT:10>**-<NUM_LIT>,vmax=<NUM_LIT:10>**<NUM_LIT>,norm=LogNorm())<EOL>ax.set_xscale('<STR_LIT>')<EOL>ax.set_yticks(zvec)<EOL>yticklabels = ['<STR_LIT>' %i for i in np.arange(len(zvec))+<NUM_LIT:1>]<EOL>ax.set_yticklabels(yticklabels)<EOL>ax.set_xlabel(r'<STR_LIT>',labelpad=<NUM_LIT>)<EOL>plt.axis('<STR_LIT>')<EOL>ax.set_xlim([<NUM_LIT>, <NUM_LIT>])<EOL>cb = phlp.colorbar(fig, ax, im,<EOL>width=<NUM_LIT>, height=<NUM_LIT:0.5>,<EOL>hoffset=-<NUM_LIT>, voffset=<NUM_LIT:0.0>)<EOL>cb.set_label('<STR_LIT>', labelpad=<NUM_LIT:0.1>)<EOL><DEDENT>return fig<EOL>
This figure compares power spectra for correlated and uncorrelated signals