#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]) pyv.killAnnotations() os.system("mkdir tmpVid")
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)) outVid = "vid_r_phi_mag_" + varNames[vi] + "_all.mp4" pyv.makeVid(outVid=outVid, vidDir=tmpvid, overwrite=True)
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))