Exemple #1
0
    pyv.SetWin3D(Ax=2, Ang=-PhiC)
    pyv.SetWin3D(Ax=0, Ang=-90)
    pyv.SetWin3D(Zoom=3)
    pyv.ShiftWin3D(-.185, 0)

    #Create labels
    mltHr = np.int(PhiC / 15) + 12
    mltStr = "MLT %d:00" % mltHr
    lcStr = "Critical Latitude = %d" % np.int(LatC)

    #yS = 0.075
    #dx = 0.025
    dx = 0.015
    yS = 0.15
    dy = 0.025
    mltLab = pyv.genTit(mltStr, Pos=(dx, yS + dy))
    lcLab = pyv.genTit(lcStr, Pos=(dx, yS))
    lcLab.height = 0.015

    #Show them all
    DrawPlots()
    print("Writing to %s at Phi=%f" % (fOut, PhiC))

    if (doGUI):
        OpenGUI()
    else:
        swa = GetSaveWindowAttributes()
        swa.fileName = fOut
        SetSaveWindowAttributes(swa)
        SaveWindow()
        ResetView()
Exemple #2
0
v.viewUp = (0.45071120230944, -0.295834995183637, 0.8422238821937293)
# v.viewNormal = (-0.7392846217267587, -0.5438270300292107, 0.3971276992202025)
# v.viewUp = (0.3130819684718471, 0.2445421036153976, 0.9177030241734793)
v.imageZoom = 1.0
SetView3D(v)

light = LightAttributes()
light.type = 1  # object
light.direction = (0, -0.75, -1)
light.brightness = 0.3
SetLight(1, light)

pyv.genPolarCoords2(dbs[2], 2, 10, 45, contours=True)

speciesStr = "Species: " + species
pyv.genTit(t**S=speciesStr, Pos=(0.7, 0.86), height=0.02)
pyv.genTit(t**S="Energies: All", Pos=(0.7, 0.89), height=0.02)
tit = pyv.genTit(t**S=title, Pos=(0.25, 0.955))
pyv.cleanLegends(plXs, plYs, plTits, plHt=0.015)
pyv.setAtts(pWidth=1000, VidDir=tmpvid)

DrawPlots()

md = GetMetaData(dbs[2])
dt = md.times[1] - md.times[0]
pyv.doTimeLoop(Ninit=0,
               Nfin=None,
               T0=T0,
               dt=dt,
               Save=True,
               tLabPos=(0.35, 0.05))
Exemple #3
0
pyv.addThreshold(varNames[vi], bnds[0], 1e10)

if plotB:
    pyv.plotContour(dbs[3],
                    'Bmag',
                    cmap='viridis',
                    values=(10, 20, 30, 40, 50, 60, 70, 80),
                    Legend=True,
                    lineWidth=0,
                    lineStyle='solid')
    # pyv.plotContour(dbs[3], 'Bz', cmap='RdYlBu', values=(-30,-20,-10,0,10,20,30), Legend=True, lineWidth=0, lineStyle='solid')
    pyv.to3D()

pyv.genPolarCoords(dbs[2], 2, 10, 45)
pyv.genMarkerXY(6.0, 90.0, 120.0, 0.5, color=(173, 27, 27, 255), lineWidth=2)

speciesStr = "Species: " + species
pyv.genTit(t**S=speciesStr, Pos=(0.7, 0.87), height=0.02)
pyv.genTit(t**S="Energies: All", Pos=(0.7, 0.91), height=0.02)
tit = pyv.genTit(t**S=title, Pos=(0.35, 0.955), height=0.03)
pyv.cleanLegends(plXs, plYs, plTits, plHt=0.015)
pyv.setAtts(pWidth=1000, VidDir=tmpvid)

DrawPlots()

md = GetMetaData(dbs[2])
dt = md.times[1] - md.times[0]
pyv.doTimeLoop(Ninit=0, Nfin=1, T0=T0, dt=dt, Save=True, tLabPos=(0.35, 0.05))

outVid = "vid_r_phi_" + varNames[vi] + "_all.mp4"
pyv.makeVid(outVid=outVid, vidDir=tmpvid, overwrite=True)
Exemple #4
0
    ActivateDatabase(dbs[1])
    SetActivePlots((1))
    pyv.onlyIn()

    #Focus on one energy if necessary
    if (not doSinj):
        AddOperator("Threshold", 0)
        tOps = GetOperatorOptions(0)
        tOps.SetListedVarNames('K0')
        tOps.lowerBounds = (K0 - 1)
        tOps.upperBounds = (K0 + 1)
        tOps.zonePortions = (1)
        SetOperatorOptions(tOps)

    #Gussy things up
    tit = pyv.genTit(t**S=t**S[n])
    pyv.cleanLegends(plXs, plYs, plTits)
    pyv.setAtts()

    #Let's see what we got
    DrawPlots()

    #Do time loop
    pyv.doTimeLoop(T0=T0, dt=dt, Save=True, tLabPos=(0.3, 0.05), Trim=True)

    outVid = Stubs[n] + ".mp4"
    pyv.makeVid(Clean=True, outVid=outVid, tScl=1)

    DeleteAllPlots()
    CloseDatabase(dbs[0])
    CloseDatabase(dbs[1])
Exemple #5
0
dx = 0.01
dy = 0.01
xScl = 0.65
yScl = 0.45
#dBz
x1 = 0.05
y1 = 0.125
P1 = GetAnnotationObject("Plot0001")
P1.drawMinMax = 0
P1.managePosition = 0
P1.position = (x1, y1)
P1.drawTitle = 0
P1.orientation = 2
P1.yScale = yScl
P1.fontHeight = fH
pyv.genTit("Residual Field [nT]", Pos=(x1, y1 + dy), height=fH)

#Pressure
P2 = GetAnnotationObject("Plot0002")
x2 = 0.85
y2 = 0.9
P2.drawMinMax = 0
P2.managePosition = 0
P2.position = (x2, y2)
P2.drawTitle = 0
P2.orientation = 0
P2.xScale = xScl
P2.yScale = 1.0
P2.fontHeight = fH
pyv.genTit("Pressure [nPa]", Pos=(x2 - 8 * dx, y2 + 2 * dy), height=fH)
Exemple #6
0
dbs = [Src0, Src1]

#Do some defaults
pyv.lfmExprs()

#Open databases
OpenDatabase(dbs[0])
OpenDatabase(dbs[1])

#Create database correlation
CreateDatabaseCorrelation("P2Fld", dbs, 0)

#Create fields/particle plots
pyv.lfmPCol(dbs[0], "dBz", vBds=dBzBds, pcOpac=0.7, Inv=True)
pyv.lfmPScat(dbs[1], v4="kev", vBds=kevBds, cMap=pCMap, Inv=False)

SetActivePlots((1, 2))
pyv.cutOut()

#Gussy things up
tit = pyv.genTit(t**S=t**S)
pyv.cleanLegends(plXs, plYs, plTits)
pyv.setAtts()

#Let's see what we got
DrawPlots()

#Do time loop
pyv.doTimeLoop(Nfin=None, T0=0.0, dt=dt, Save=True, tLabPos=(0.3, 0.05))