"Bmag", vBds=[1, 500], cMap=SlcCmap, pcOpac=0.85, Legend=False, Log=True) AddOperator("Slice") sOp = GetOperatorOptions(0) sOp.axisType = 2 sOp.project2d = 0 #print(sOp) SetOperatorOptions(sOp) #Do field lines pyv.lfmStream(SrcF, "Bfld", x, y, z, cMap=FldCmap, tRad=tRadFld, Legend=False) icOp = GetOperatorOptions(0) icOp.criticalPointThreshold = 0.1 if (not doProd): icOp.maxSteps = 50 icOp.relTol = 1e-04 icOp.absTolAbsolute = 1.0e-4 SetOperatorOptions(icOp) #Change to constant colors pcOp = GetPlotOptions() pcOp.minFlag = 1 pcOp.maxFlag = 1 pcOp.min = -5.0 pcOp.max = -4.0 SetPlotOptions(pcOp)
AddPlot("Contour","MLat") cOps = GetPlotOptions() cOps.contourMethod = 1 cOps.contourValue = tuple([-LatC,LatC]) cOps.legendFlag = 0 cOps.lineWidth = 2 cOps.colorType = 0 SetPlotOptions(cOps) AddOperator("Slice") sOps = GetOperatorOptions(0); sOps.axisType=4; sOps.project2d=0 sOps.phi = 0; sOps.theta = PhiC SetOperatorOptions(sOps) #Do streams pyv.lfmStream(fIn,"Bfld",x,y,z,cMap="Cool",tRad=0.002) icOp = GetOperatorOptions(0) icOp.dataValue = 10 icOp.dataVariable = "dPhi" SetOperatorOptions(icOp) pcOp = GetPlotOptions() pcOp.legendFlag=1 pcOp.minFlag=1; pcOp.maxFlag=1 pcOp.min = -dpMax; pcOp.max = dpMax SetPlotOptions(pcOp) pyv.SetWin3D(Ax=2,Ang=-PhiC) pyv.SetWin3D(Ax=0,Ang=-90) pyv.SetWin3D(Zoom=2) #Show them all
sOps.axisType = 4 sOps.project2d = 0 sOps.phi = 0 sOps.theta = PhiC SetOperatorOptions(sOps) #Do streams if (doProd): #Only do streams for final version scMap = "RdBu" #scMap = "Cool" #scMap = "difference" pyv.lfmStream(fIn, "Bfld", x, y, z, cMap=scMap, tRad=0.001, Legend=False) icOp = GetOperatorOptions(0) icOp.dataValue = 10 icOp.dataVariable = "dPhi" SetOperatorOptions(icOp) pcOp = GetPlotOptions() pcOp.minFlag = 1 pcOp.maxFlag = 1 pcOp.min = -dpMax pcOp.max = dpMax SetPlotOptions(pcOp)
md = GetMetaData(fIn) #Metadata #Import definitions pyv.lfmExprsEB() #Start plotting pyv.setAtts() #Some defaults pyv.lfmPCol(db, "dBz", vBds=(-25, 25), Inv=True, pcOpac=pcOpac, Light=False) #Field slice, equatorial AddOperator("Slice") sOps = GetOperatorOptions(0) sOps.axisType = 2 sOps.project2d = 0 SetOperatorOptions(sOps) #Block out central cutout AddPlot("Contour", "RadAll") cOps = GetPlotOptions() cOps.contourMethod = 1 cOps.contourValue = (2.2) cOps.legendFlag = 0 SetPlotOptions(cOps) #Do streams pyv.lfmStream(fIn, "Bfld", x, y, z) #pyv.lfmStream(fIn,"V",x,y,z) #Show them all DrawPlots()