Ejemplo n.º 1
0
    for iSeg in range(0, len(oDataSegs)):
        t = oDataSegs[iSeg]['time_s']
        y = outList[iSeg][iSgnl]

        # Number of time segments and length of overlap, units of samples
        #lenSeg = 2**6 - 1
        lenSeg = int(1 * optSpec.freqRate * rps2hz)
        lenOverlap = 5

        # Compute Spectrum over time
        tSpec_s, freqSpec_rps, P_mag = FreqTrans.SpectTime(
            t, y, lenSeg, lenOverlap, optSpec)

        # Plot the Spectrogram
        fig = FreqTrans.Spectogram(tSpec_s, freqSpec_rps * rps2hz,
                                   20 * np.log10(P_mag))
        fig.suptitle(oDataSegs[iSeg]['Desc'] + ': Spectrogram - ' +
                     sigOutList[iSgnl])

#%% Nyquist Plots
inPlot = sigInList  # Elements of sigInList
outPlot = sigOutList  # Elements of sigOutList

if False:
    for iIn, inName in enumerate(inPlot):
        for iOut, outName in enumerate(outPlot):

            fig = None
            for iSeg in range(0, len(oDataSegs)):
                fig = FreqTrans.PlotNyquist(T[iSeg][iOut, iIn],
                                            TUnc[iSeg][iOut, iIn],
Ejemplo n.º 2
0
        x = vExcList[iSeg][iSgnlExc]
        y = vFbList[iSeg][iSgnlOut]

        # Number of time segments and length of overlap, units of samples
        #lenSeg = 2**6 - 1
        lenSeg = int(1.0 * optSpec.freqRate * rps2hz)
        lenOverlap = 1

        # Compute Spectrum over time
        tSpecY_s, freqSpecY_rps, P_Y_mag = FreqTrans.SpectTime(
            t, y, lenSeg, lenOverlap, optSpec)
        tSpecN_s, freqSpecN_rps, P_N_mag = FreqTrans.SpectTime(
            t, y, lenSeg, lenOverlap, optSpecN)

        # Plot the Spectrogram
        fig = FreqTrans.Spectogram(tSpecY_s, freqSpecY_rps * rps2hz,
                                   20 * np.log10(P_Y_mag))
        fig.suptitle(oDataSegs[iSeg]['Desc'] + ': Spectrogram - ' +
                     sigFbList[iSgnlOut])

        fig = FreqTrans.Spectogram(tSpecN_s, freqSpecN_rps * rps2hz,
                                   20 * np.log10(P_N_mag))
        fig.suptitle(oDataSegs[iSeg]['Desc'] + ': Spectrogram Null - ' +
                     sigFbList[iSgnlOut])

#%% Sigma Plot
fig = None
for iSeg in range(0, len(oDataSegs)):
    Cmin = np.min(np.min(C[iSeg], axis=0), axis=0)
    sNomMin = np.min(sNom[iSeg], axis=0)
    sCritMin = np.min(sUnc[iSeg], axis=0)
    sNomMinErr = sNomMin - sCritMin