Ejemplo n.º 1
0
                       monet.calcWOP(repRto, thwS))
 (minS, maxS) = monet.calcMinMax(repRto)
 rapS = monet.getRatioAtTime(repRto, tapS)
 #######################################################################
 # Calculate Quantiles
 #######################################################################
 ttiSQ = [np.nanquantile(tti, qnt) for tti in ttiS]
 ttoSQ = [np.nanquantile(tto, 1 - qnt) for tto in ttoS]
 wopSQ = [np.nanquantile(wop, 1 - qnt) for wop in wopS]
 rapSQ = [np.nanquantile(rap, qnt) for rap in rapS]
 mniSQ = (np.nanquantile(minS[0], qnt), np.nanquantile(minS[1], qnt))
 mnxSQ = (np.nanquantile(maxS[0], qnt), np.nanquantile(maxS[1], 1 - qnt))
 #######################################################################
 # Update in Dataframes
 #######################################################################
 xpid = fun.getXpId(fPath, xpidIx)
 updates = [
     xpid + i
     for i in (ttiSQ, ttoSQ, wopSQ, rapSQ, list(mniSQ) + list(mnxSQ))
 ]
 for df in zip(outDFs, updates):
     df[0].iloc[i] = df[1]
 #######################################################################
 # Update in Dictionaries
 #######################################################################
 if mlr:
     outDict = [{int(i[0] * 100): i[1]
                 for i in zip(thiS, ttiS)},
                {int(i[0] * 100): i[1]
                 for i in zip(thoS, ttoS)},
                {int(i[0] * 100): i[1]
Ejemplo n.º 2
0
(fltrPattern, globPattern) = ('dummy', PT_PRE + '*' + AOI + '*srp*')
if FZ:
    fltrPattern = PT_PRE + '*_00_*' + AOI + '*srp*'
repFiles = monet.getFilteredFiles(fltrPattern, globPattern)
repFiles.reverse()
###########################################################################
# Iterate through experiments
###########################################################################
(fNum, digs) = monet.lenAndDigits(repFiles)
fmtStr = '{}+ File: {}/{}'
(i, repFile) = (0, repFiles[0])
for (i, repFile) in enumerate(repFiles):
    padi = str(i + 1).zfill(digs)
    print(fmtStr.format(monet.CBBL, padi, fNum, monet.CEND), end='\r')
    (repDta, xpid) = (pkl.load(repFile),
                      fun.getXpId(repFile, (1, 2, 3, 4, 5, 7)))
    xpRow = [
        da.filterDFWithID(i, xpid)
        for i in (dfTTI, dfTTO, dfWOP, dfMNX, dfPOE, dfCPT)
    ]
    (tti, tto, wop) = [float(row[THS]) for row in xpRow[:3]]
    (mnf, mnd, poe, cpt) = (float(xpRow[3]['min']), float(xpRow[3]['minx']),
                            float(xpRow[4]['POE']), float(xpRow[5]['CPT']))
    # Traces ------------------------------------------------------------------
    if LND == 'PAN':
        tStable = 0
    pop = repDta['landscapes'][0][tStable][-1]
    STYLE['yRange'] = (0, pop + pop * .5)
    if AOI == 'ECO':
        STYLE['yRange'] = (STYLE['yRange'][0], STYLE['yRange'][1] * 2)
    STYLE['aspect'] = monet.scaleAspect(1, STYLE)