Пример #1
0
                   % (cfg.general.resDir, powerName, int(cfg.stat.chunkWidth),
                      srcPostfix))
perioSTD = np.loadtxt('%s/power/%sSTD_chunk%d%s.txt' \
                      % (cfg.general.resDir, powerName, int(cfg.stat.chunkWidth),
                         srcPostfix))
freq = np.loadtxt('%s/power/freq_chunk%d%s.txt' \
                  % (cfg.general.resDir, cfg.stat.chunkWidth,
                     srcPostfix))
        
# Plot CCF
print 'Plotting correlation function...'
(fig, ax) = ergoPlot.plotCCF(ccf, lags, ylabel=corrLabel, plotPositive=True)
plt.savefig('%s/plot/correlation/%s_lag%d%s.%s'\
           % (cfg.general.resDir, corrName, int(cfg.stat.lagMax),
              srcPostfix, ergoPlot.figFormat),
            dpi=ergoPlot.dpi, bbox_inches=ergoPlot.bbox_inches)

# Plot perio
print 'Plotting periodogram...'
angFreq = freq * 2 * np.pi
(fig, ax) = ergoPlot.plotPerio(perio, perioSTD=perioSTD, freq=angFreq,
                               ylabel=powerLabel, plotPositive=True,
                               absUnit='', yscale='log',
                               xlim=(0, cfg.stat.angFreqMax),
                               ylim=(cfg.stat.powerMin, cfg.stat.powerMax))
plt.savefig('%s/plot/power/%s_chunk%d%s.%s'\
            % (cfg.general.resDir, powerName, int(cfg.stat.chunkWidth),
               srcPostfix, ergoPlot.figFormat),
            dpi=ergoPlot.dpi, bbox_inches=ergoPlot.bbox_inches)

Пример #2
0
np.savetxt('%s/power/powerSampleSTD%s_chunk%dyr.txt' \
           % (cfg.general.resDir, dstPostfix,
              cfg.stat.chunkWidth), powerSampleSTD)
np.savetxt('%s/power/freq%s_chunk%dyr.txt' \
           % (cfg.general.resDir, dstPostfix,
              cfg.stat.chunkWidth), freq)

# Plot corrSample
print 'Plotting correlation function...'
(fig, ax) = ergoPlot.plotCCF(corrSample, lags, plotPositive=True)
plt.savefig('%s/correlation/corrSample%s_lagMax%dyr.%s'\
            % (cfg.general.plotDir, dstPostfix,
               cfg.stat.lagMax, ergoPlot.figFormat),
            dpi=ergoPlot.dpi, bbox_inches=ergoPlot.bbox_inches)

# Plot powerSample
print 'Plotting powerSampledogram...'
angFreq = freq * 2 * np.pi
(fig, ax) = ergoPlot.plotPerio(powerSample,
                               perioSTD=powerSampleSTD,
                               freq=angFreq,
                               plotPositive=True,
                               absUnit='',
                               yscale='log',
                               xlim=(0, cfg.stat.angFreqMax),
                               ylim=(cfg.stat.powerMin, cfg.stat.powerMax))
fig.savefig('%s/power/powerSample%s_chunk%dyr.%s'\
            % (cfg.general.plotDir, dstPostfix,
               cfg.stat.chunkWidth, ergoPlot.figFormat),
            dpi=ergoPlot.dpi, bbox_inches=ergoPlot.bbox_inches)
Пример #3
0
        # Plot CORRSAMPLE
        print "Plotting correlation function..."
        (fig, ax) = ergoPlot.plotCCF(corrSample, lags, plotPositive=True)
        plt.savefig(
            "%s/%s/corrSample%s_nSeeds%d_lagMax%dyr.%s"
            % (cfg.general.plotDir, outDir, postfix, nSeeds, cfg.stat.lagMax, ergoPlot.figFormat),
            dpi=ergoPlot.dpi,
            bbox_inches=ergoPlot.bbox_inches,
        )

        # Plot powerSample
        print "Plotting powerSampledogram..."
        angFreq = freq * 2 * np.pi
        (fig, ax) = ergoPlot.plotPerio(
            powerSample,
            perioSTD=powerSampleSTD,
            freq=angFreq,
            plotPositive=True,
            absUnit="",
            yscale="log",
            xlim=(0, cfg.stat.angFreqMax),
            ylim=(cfg.stat.yminPower, cfg.stat.ymaxPower),
        )
        fig.savefig(
            "%s/%s/powerSample%s_nSeeds%d_chunk%dyr.%s"
            % (cfg.general.plotDir, outDir, postfix, nSeeds, cfg.stat.chunkWidth, ergoPlot.figFormat),
            dpi=ergoPlot.dpi,
            bbox_inches=ergoPlot.bbox_inches,
        )