
load('Fig2andSupplement_ripple_stats_SWR_TFR')

figure, shadedErrorBar(linspace(-1,1 ,4001),mean(group_level_stat_input.all_trace,'omitnan'), ... 
    std(group_level_stat_input.all_trace,[],'omitnan')./sqrt(sum(~isnan(group_level_stat_input.all_trace),1)) )
xlim([-0.5 0.5]), ylim([-30 40]),set(gca,'LineWidth',2)


figure, pcolor(linspace(-1,1 ,4001),wFreq,mean(avg_zSWR_TFR,3,'omitnan'))
shading interp, colormap jet
set(gca, 'YScale', 'linear')
yticks([30 50 100 150 200 250])
xlim([-0.2 0.2])
caxis([0 5])



