In [8]:
# import stuff
import sys,os
import numpy as np

%load_ext autoreload
%autoreload 2

sys.path.append( os.environ["PYTHONSCRIPT_DIR"] )

import matplotlib as mpl
import PlotSettings as pS
pS.loadPlotSettings(mpl)

rcParamsOrig  = mpl.rcParams.copy();

lineSettings = pS.generalSettings.defaultLineSettings 
defaultMarkerSize = pS.generalSettings.defaultMarkerSize

from Tools.Parsers.Utilities import parseNDArray

print(" HPCJobConfigurator: ", os.environ["HPCJOBCONFIGURATOR_DIR"])
sys.path.append( os.environ["HPCJOBCONFIGURATOR_DIR"])
import HPCJobConfigurator.jobGenerators.commonFunctions  as cf 


import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib.colors as colors

from skimage.io import imread
from skimage.filters import *
from skimage.morphology import *
from skimage import data
from skimage import img_as_float
from skimage.morphology import disk


#GUi shit
%matplotlib tk
#mpl.get_configdir()


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
Setting matplotlib settings from file: /home/zfmgpu/Desktop/Repository/SimulationFramework/SourceCode/Projects/SimulationFramework/Simulations/PythonScripts/PlotSettings/matplotlibrc
 HPCJobConfigurator:  /home/zfmgpu/Desktop/Repository/HPCJobConfigurator

GridFile


In [9]:
# GridFile
import re
import h5py
import glob2

class GridFile:
    
    class OOBB:
        pass;
    class Bounds:
        pass;
    
    def __init__(self,filePath):
        self.filePath = filePath
        self.h5file=h5py.File( self.filePath , 'r')
        
        self.dim = self.h5file["GridSettings/dimensions"][...].flatten().astype(int)
        
        self.oobb = GridFile.OOBB();
        self.oobb.minPoint = self.h5file["GridSettings/OOBB/minPoint"][...].flatten()
        self.oobb.maxPoint = self.h5file["GridSettings/OOBB/maxPoint"][...].flatten()
        self.oobb.R_KI = self.h5file["GridSettings/OOBB/R_KI"][...]
        
        self.bounds = GridFile.Bounds()
        self.bounds.min = self.h5file["GridSettings/Bounds/minPoint"][...].flatten()
        self.bounds.max = self.h5file["GridSettings/Bounds/maxPoint"][...].flatten()
        self.bounds.dx  = (self.bounds.max-self.bounds.min) / self.dim
        
        
        self.numIndices = self.dim.size
        self.numIndicesSqueezed = np.where(self.dim>1)[0].size
        
        self.states = []
        nFiles = len(self.h5file["Files"]);
        for name,s in self.h5file["States"].items():
             self.states.append( {"time": np.asscalar(s.attrs["time"]), 
                                  "stateIdx": np.asscalar(s.attrs["stateIdx"]),
                                  "globalStateIdx": 
                                          s.attrs["globalStateIdx"] if "globalStateIdx" in s.attrs  
                                          else (np.asscalar(s.attrs["stateIdx"]) if nFiles == 1 else -1 ),
                                  "h5Group":s} )
        
        self.states.sort(key=lambda x: x["time"])
        
    def __str__(self):
        return "<GridFile @ %s>" %self.filePath 
    
    def getAxisPoints(self,indexSlices,where="beg"):
        '''Builds the axis points on the grid, either at the beginning of each cell or '''
        indexSlices = self.buildGridSliceMinMax(indexSlices)
        print("AxisPoints for slice: ", indexSlices)
        axes = []
        for axis, sl in enumerate(indexSlices):
            p = np.array(range(0,self.dim[axis])[sl])
            if where=='beg':
                 axes.append(self.bounds.min[axis] + p*self.bounds.dx[axis])
            elif where=='mid':
                 axes.append(self.bounds.min[axis] + (p + 0.5)*self.bounds.dx[axis])
            else:
                 axes.append(self.bounds.min[axis] +(p + 1)*self.bounds.dx[axis])
        return axes
    
    def getPlotBounds(self,whichIndices):
        return np.vstack([self.bounds.min,self.bounds.max])[:,whichIndices].T.reshape((2*len(whichIndices),))
    
    def getStates(self):
        return self.states

    def readGrid(self,stateIdx,gridName, remove1Daxes=True):
        '''stateIdx can either be an int with value x corresponding to the "/State/S%i" % x group
           or the direct state h5file group object
        '''
        
        if isinstance(stateIdx,int):
            gridData = self.h5file["States/S%i/%s" % (stateIdx,gridName)][...]
        elif isinstance(stateIdx,h5py.Group):
            gridData = stateIdx[gridName][...]
        
        if(remove1Daxes):
            return np.squeeze(gridData)
        else:
            return gridData
    
    def getIndex(self,K_loc,axis=0):
        ''' K_loc is in K frame and relative to self.bounds.min (./Bounds/minPoint)'''
        assert axis in range(0,self.numIndices)
        i = ((K_loc - self.bounds.min[axis]) / self.bounds.dx[axis]).astype(int)
        return max(0,min(i,self.dim[axis]-1))
    
    def getIndices(self,K_p):
        ''' K_p is in K frame and relative to self.bounds.min (./Bounds/minPoint)'''
        i=((K_p - self.bounds.min) / self.bounds.dx).astype(int)
        return np.maximum(0,np.minimum(i,self.dim[axis]-1))


    def buildGridSliceMinMax(self,minMaxSlice):
        """
            A minMaxSlice in the form [ rangeAxis0, rangeAxis1,...], 
            is transformed into [ slice() , slice(), ... ] with indices in the grid
            if the rangeAxisX is already a slice() object it is not altered!
            allowing to combine slices and minMaxRanges
        """
        
        def makeSlice(minMax,axis):
            if minMax is None:
                return slice(0,None)
            
            if not isinstance(minMax,slice):
                if( len(minMax) > 1 ):
                    return slice(self.getIndex(minMax[0],axis),
                                 self.getIndex(minMax[1],axis))
                else:
                    # we only have one min value, take only this index
                    i = self.getIndex(minMax[0],axis)
                    return slice(i,i+1)
            else:
                return minMax
        # transform all minMaxSlices into index slices
        return [ makeSlice(minMax,axis) for axis, minMax in enumerate(minMaxSlice) ]
    
    
    def loadGrids(self,stateSlice=slice(0,None), 
                  gridName = "velocity", 
                  gridSlice = None, 
                  preSliceOperator  = lambda x: x,
                  postSliceOperator = lambda x: x,
                  **kwargs):
    
        data = []
        if stateSlice is not None:
            states = self.states[stateSlice]
        else:
            states = self.states
    
        for s in states:
            
            if gridSlice is None:
                grid = postSliceOperator(preSliceOperator(self.readGrid(s["h5Group"],gridName,**kwargs)))   
            else:
                sl = self.buildGridSliceMinMax(gridSlice)
                grid = postSliceOperator(preSliceOperator(self.readGrid(s["h5Group"],gridName,**kwargs))[sl])

            data.append({"grid" : grid })
        
        return data,states
    
    
    def assembleStates(self, data=None, **kwargs):
        """ Returns tensor (x,y,....,t) , where t is the time idx, and a list of all """
        if data is None:
            data,states = self.loadGrids(**kwargs)
            
        stateLength = len(data);
        
        assert stateLength > 0, "Time dimension == 0"
        
        # make new grid with one more dimensions which is the stateIdx
        timeData = np.ndarray(data[0]["grid"].shape + (stateLength,) ,
                              dtype= data[0]["grid"].dtype)
        
        # write all data to the timeData
        for tIdx,d in enumerate(data):
            timeData[...,tIdx] = d["grid"]
        
        return timeData,states

Settings


In [10]:
# Settings ===========================================================================
from scipy.ndimage.filters import gaussian_filter

def loadIniFile(file):
    # no interpolation is done!
    import configparser
    config = configparser.ConfigParser(interpolation=None)
    config.read(file)
    return config

def generateColorMap(min,max,name):
    jet = colorMap = plt.get_cmap(name) 
    cNorm  = colors.Normalize(vmin=min, vmax=max)
    scalarMap = cm.ScalarMappable(norm=cNorm, cmap=colorMap)
    return scalarMap;


def getAllFiles(globEx,regex, key=lambda m: int(m.group(1))):
    files = glob2.glob(globEx)
    l={}
    for f in files:
        try:
            l[ key(re.match(regex,f)) ] = f
        except:
            pass
    if not l:
        raise ValueError("No files found for %s " % globEx)  
    return l

def getAllGridFiles(globExpr):
    # Glob all files
    filePaths = sorted(glob2.glob(globExpr))

    filesPerStudyNr = {}
    for f in filePaths:
        m=re.match(".*P-(\d*).*",f);
        if(m):
            nr = int(m.group(1))
            if nr not in filesPerStudyNr:
                filesPerStudyNr[nr] = {}
            filesPerStudyNr[nr][os.path.basename(f)] = f
            
    return filesPerStudyNr

# All sort of plot settings ==========================================================
thisRootFolder = "../"
simulationJobsFolder =  os.path.join(thisRootFolder,"../SimulationJobs")
studyJobIniFile = os.path.join( simulationJobsFolder, "StudyConfig.ini")
studyConfig = loadIniFile(studyJobIniFile)["ParameterStudy"]

""" Add an anchored text to the axis """
def addText(ax, t, loc=2, textp = dict(size=12), pad = 0.1, borderpad = 0.5 ,
            frameon =True, 
            fc="white", ec="black" ,lw=1):

     return ax.annotate(t, (1,0), (0, -20), 
                 xycoords='axes fraction', 
                 textcoords='offset points', 
                 va='top', ha='right', 
                 **textp)


fileGlobbingExpression = "./gridVelocities/rough/GridVelocity-P-*/*.h5"
filesPerStudyNr = getAllGridFiles(fileGlobbingExpression)
print("Files: ", filesPerStudyNr)
studyNrs = sorted(list(filesPerStudyNr.keys()))

corrExperimentNr = 5;
expSettingsFile = os.path.join(thisRootFolder,"data/ExperimentSettings.json")
# Load ExperimentSettings json
expSettings = cf.jsonLoad(expSettingsFile)
expSet = expSettings["experiments"][str(corrExperimentNr)]
expFrameRate = expSettings["framerate"]
expStartIdx  = expSet["startIdx"]
expDeltaT    = 1.0/expFrameRate

# Load StudyEntryData
studyEntryDataFile  = os.path.join(thisRootFolder,"data/StudyEntryData.json")
studyEntryData = cf.jsonLoad(studyEntryDataFile)

#Scene file (if needed)
sceneFile = "./../data/SceneFile.xml"

# CIV stuff ============================================
expBackgroundFile = "./experimentBackground.jpg"
expBackground = np.flipud(img_as_float(imread(expBackgroundFile, as_grey = True))).transpose()
expOrigImageRegex = r".*?-(\d*).*"
expOrigImageFiles= getAllFiles("./experiment/*", expOrigImageRegex)
    
    
computeNewMask = True
otsuThMult = 0.7

civImageName = "data"
civMaskName = "finalMask"
civVelXName = "vx"
civVelYName = "vy"
civImageDataPostLoadOperator = lambda x : x.transpose() # the h5 file for the civ (acciv) uses (y,x, origin at lower-left corner) , thats why we transpose the image!
# tree mask
treeMaskFile = "./treemask.jpg"

# Get all CIV image files and sort according to frame number
civImageRegex = r".*?CIVRough.*?f-(\d*).*"
civImageFiles= getAllFiles("./civImageFiles/*",civImageRegex)

# Get all CIV grid files and sort according to frame number
civPassNr = 2
civGridRegex = r".*?CIVRough.*?p-%i-f-(\d*).*" % civPassNr
civGridFiles= getAllFiles("./civGridFiles/*",civGridRegex)
def getCIVFrameIdx(simRelTimeFromEntry, expDeltaT, expStartIdx):
    return int(round( simRelTimeFromEntry / expDeltaT )) + expStartIdx

# load treeMask (flip = origin at lower left corner, and make (x,y) indices)
treeMask = np.flipud(imread(treeMaskFile,as_grey = True)).transpose()

# =======================================================
    
    
    
# Slice specification =============================
gridFileName = "GridFileVelocityField.h5"
gridName   = "velocity"
maskName   = "mask"
stateSlice = slice(0,None)
gridSlice  = [ (-0.05,),(-0.15,0.15)]   
sliceSpec  = dict(name="vertical",stateSlice=stateSlice,gridSlice=gridSlice)

# make velocity magnitude
preSliceOperator  = lambda x:  x
postSliceOperator = lambda grid: gaussian_filter(np.sqrt(grid[...,0]**2 + grid[...,1]**2),sigma=7)

# velocity norm range ( [xmin,ymin],[xmax,ymax])
velocityRange = np.array([[0,-0.4],[-2.0,0.4]])
velocityMaxNorm =  np.around(np.linalg.norm(velocityRange[1] - velocityRange[0]),decimals=1)

# ================================================

# Some mask convertions ============================

def removeSmallObjects(g):
    return g #remove_small_objects(g,min_size=8000,connectivity=1)

def makeSimMask(g):
    if(len(g.shape)==3):
        # last index is time move over that one
        for i in range(g.shape[2]):
            g[:,:,i] = np.logical_not( 
                removeSmallObjects((treeMask*g[:,:,i]).astype(bool)) 
                 )
        return g
    else:
        return np.logical_not(removeSmallObjects((treeMask*g).astype(bool))) 

def makeCivMask(image,background):
    subtracted = np.abs(image - background)
    th = threshold_otsu(subtracted)
    # threshol with otsu
    binary = subtracted > otsuThMult*th
    return binary
# ==================================================


# figure stuff
oneSidePlot = True
labelLength = "B-14\hspace{0.2em}"

if oneSidePlot:
    figureSize= (pS.cm2inch(15.8),pS.cm2inch(10))
    legendProps = dict(prop=dict(size=10),borderpad=0.35,labelspacing=0.2,handletextpad=0.3,markerscale=1,borderaxespad=1)
else: 
    labelLength = 5.5 # für factor 1.0 -> 5.5
    figureSize= (pS.cm2inch(8),pS.cm2inch(6))
    legendProps = dict(prop=dict(size=6),borderpad=0.35,labelspacing=0.1,handletextpad=0.3,markerscale=1)

# label formatter
class LabelFormatter:
    def __init__(self,parameterStudyConfig):
        self.muList = cf.jsonParse(parameterStudyConfig["muList"])
    def __call__(self,studyNr, param=True,labelLength = labelLength):
        if studyNr == 15: 
            studyNr = 14
            add=r"$\overbar{\textnormal{B}}$"
        else:
            add="B"
        if param:
            return r"\parbox{\widthof{%s}}{%s-%i}, $\mu\!=\!%.1f$" % (labelLength,add,studyNr,self.muList[studyNr])
        else:
            return r"\parbox{\widthof{%s}}{%s-%i}" % (labelLength,add,studyNr)
        
labelFormatter = LabelFormatter(studyConfig)

# color map
studyCMapName = "spectral"
colorMap = generateColorMap(min(studyNrs),max(studyNrs),studyCMapName).to_rgba

# ====================================================================================


Files:  {3: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-3/GridFileVelocityField.h5'}, 4: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-4/GridFileVelocityField.h5'}, 5: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-5/GridFileVelocityField.h5'}, 6: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-6/GridFileVelocityField.h5'}, 7: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-7/GridFileVelocityField.h5'}, 8: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-8/GridFileVelocityField.h5'}, 9: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-9/GridFileVelocityField.h5'}, 10: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-10/GridFileVelocityField.h5'}, 11: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-11/GridFileVelocityField.h5'}, 12: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-12/GridFileVelocityField.h5'}, 13: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-13/GridFileVelocityField.h5'}, 14: {'GridFileVelocityField.h5': './gridVelocities/rough/GridVelocity-P-14/GridFileVelocityField.h5'}}

In [ ]:
studNr = 3
g=GridFile(filesPerStudyNr[studNr]["GridFileVelocityField.h5"])

gridVel = g.readGrid(stateIdx = 5, gridName="velocity")
gridVelMag = np.sqrt(gridVel[...,0]**2 + gridVel[...,1]**2)
print("Shape of Grid: ", gridVel.shape)
print("Shape of Grid mag.: ", gridVelMag.shape)

sl = g.buildGridSliceMinMax([(-0.7,-0.29),slice(100,200)])
print("Slice",sl)

stateSlice, states = g.assembleStates(stateSlice=slice(0,None), gridSlice=[(-0.7,-0.29),(0.1,)],gridName="velocity")
print("Slice:", stateSlice.shape)

Test Plot 2D


In [ ]:
# plot test
g = GridFile(filesPerStudyNr[3]["GridFileVelocityField.h5"])

bounds = g.getPlotBounds((0,1))
print("Bounds:",bounds)

gridVel = g.readGrid(3,"velocity")
gridVelMag = np.sqrt(gridVel[:,:,0]**2 + gridVel[:,:,1]**2)

from   mpl_toolkits.axes_grid1 import make_axes_locatable

plt.close("all")
# images for imshow and skimage are (M,N,{1,2,3}) where M are the vertical pixels (y-Axis) and N the horizontal (x-Axis)
# out grid is (M,N,{1,2,3}) where M is the x axis and N the y-Axis, so we transpose the grid 

fig = plt.figure(0)
ax = fig.add_subplot(111, aspect='equal', axisbg=[1,1,1])
im = ax.imshow(gridVelMag.T, origin='lower', extent=bounds, cmap=plt.get_cmap('jet') , interpolation='none')
divider = make_axes_locatable(ax)
cax1 = divider.append_axes("right", size="2%", pad=0.2)
fig.colorbar(im, cax = cax1)
im.set_clim(0,velocityMaxNorm)
ax.grid()
# ax.set_aspect('equal')
# ax.set_title(r'$||\mathbf{v}||$')

Build Slices over all GridFiles and Studies


In [11]:
# build slices over all files
def buildSlicesPerStudy(filesPerStudyNr, 
                gridFileName,
                gridName,
                sliceSpecs,
                postAssembleOperator = lambda x : x,
                **kwargs
               ):
    
    ''' spliceSpecs is a dictionary with "gridSlice" : gridSlice and a "stateSlice": stateSlice 
        which are handed over to GridFile.assembleStates which slices the grid with name gridName
        by the gridSlice and assembles all states sliced by stateSlice
    '''
    
    data = {}
    
    for studyNr, files in filesPerStudyNr.items():
        
        # for all slice specs 
        for slSpec in sliceSpecs:
            
            sliceName = slSpec["name"]
            gridSl = slSpec["gridSlice"]
            stateSl = slSpec["stateSlice"]
            
            g = GridFile(files[gridFileName])

            stateSlice, states = g.assembleStates(stateSlice=stateSl, 
                                                  gridSlice=gridSl,
                                                  gridName=gridName,**kwargs)
            stateSlice = postAssembleOperator(stateSlice)
            
            timeList = np.array([ s["time"] for s in states ])
            stateIndices = np.array([ s["stateIdx"] for s in states])

            data[studyNr] = {"gridFile" : g,
                             "slice":stateSlice, 
                             "time": timeList, 
                             "stateIndices" : stateIndices,
                             "sliceSpecs" : slSpec
                             }
    return data

In [ ]:
# Make plots (slices from above)

# Get 1D slices over all states
studyData = buildSlicesPerStudy(filesPerStudyNr,
                    gridFileName=gridFileName,
                    gridName=gridName,
                    sliceSpecs=[sliceSpec],
                    postAssembleOperator = lambda g: np.squeeze(g),
                    postSliceOperator = postSliceOperator,
                    preSliceOperator  = preSliceOperator
                   )


from mpl_toolkits.mplot3d import Axes3D
from matplotlib.collections import LineCollection
from matplotlib.colors import colorConverter
cc = lambda arg: colorConverter.to_rgba(arg, alpha=1.0)

fig = plt.figure(figsize=figureSize)
ax = fig.add_subplot(111,projection='3d')
#ax.ticklabel_format(style='sci',scilimits=(0,0),axis='y')

studyRange = range(3,15,1)

for studyNr, data in studyData.items():
        
    if studyNr in studyRange:
        gridFile = data["gridFile"]

        #       sl = [slice(0,None,4),slice(0,None)]

        #       print("Plot slice: " , data["stateSlice"].shape)

        #       # get axes points
        axesPoints = gridFile.getAxisPoints(sliceSpec["gridSlice"])

        #plot wireframe
#         axisPointsM ,timePointsM = np.meshgrid(axesPoints[1],data["time"],indexing='ij')
#         ax.plot_wireframe(axisPointsM,timePointsM,data["stateSlice"], color=colorMap(studyNr))

        # plot 3d lines
        lines = np.ma.asarray(np.zeros(( len(data["time"]) , data["slice"].shape[0], 2 )))
        zValues = data["slice"].T
        lines[:,:,0] = axesPoints[1] # x values
        lines[:,:,1] = np.ma.masked_where((zValues<0.00), zValues) # zvalues, masking all values will result in plot failure
        lc = LineCollection( lines , colors=colorMap(studyNr) , linestyles = 'solid', linewidths=1)
        ax.set_xlim(axesPoints[1].min(),axesPoints[1].max())
        ax.set_ylim(data["time"].min(),data["time"].max())
        ax.set_zlim(zValues.min(),zValues.max())
        ax.add_collection3d(lc, zs=data["time"],zdir='y')

        ax.set_xlabel("y [m]")         
        ax.set_ylabel("t [s]")

In [12]:
# error metric
def maskOvelapRatio(data1,data2):
    # overlapRatio: sum( A intersect B) / sum(A union B)
    # how many pixels overlap of the total united region
    return np.sum(data1 & data2)/np.sum(data1 | data2)

# Grid Matching function
def rootMeanSqErrorMaskedData(data1,data2):
    rMeanSqErr = np.sqrt(((data1-data2)**2).mean())
    return rMeanSqErr,maskOvelapRatio(data1.mask,data2.mask)

Match Simulation and CIV Analysis


In [14]:
# Prepare data for best matching maskes of the sim. studies compared to the
# mask of the images of the CIV results

# load all maskes of the simulation grid files
sliceSpec  = dict(name="mask",stateSlice=None, gridSlice=None)

# Load Masks and Velocities from Simulation ===================
studyDataMasks = buildSlicesPerStudy(filesPerStudyNr,
                    gridFileName=gridFileName,
                    gridName=maskName,
                    sliceSpecs=[sliceSpec],
                    postAssembleOperator = lambda g: np.squeeze(g),
                    postSliceOperator  = lambda x: x,
                    preSliceOperator   = lambda x: x)

sliceSpec["name"] = "velocity"
studyDataVelMag = buildSlicesPerStudy(filesPerStudyNr,
                    gridFileName=gridFileName,
                    gridName=gridName,
                    sliceSpecs=[sliceSpec],
                    postAssembleOperator = lambda g: np.squeeze(g),
                    postSliceOperator  = lambda g: np.sqrt(g[:,:,0]**2 + g[:,:,1]**2), # make magnitude
                    preSliceOperator   = lambda x: x)

# set all masks
for studyNr,study in studyDataVelMag.items(): 
    study["slice"] =  np.ma.masked_array(study["slice"] , mask=makeSimMask( studyDataMasks[studyNr]["slice"] ) )
#===============================================================

# match masks with civ masks
loadedCIVMasks = {}
loadedCIVData  = {}

for studyNr,study in studyDataVelMag.items():
    
    entryTime = studyEntryData["studies"][str(studyNr)]["entryTime"]
    
    civMask   = np.zeros(expSettings["resolution"]+[len(study["time"])] ,dtype=np.uint8)
    civVelMag = np.zeros(expSettings["resolution"]+[len(study["time"])] ,dtype=float)
    print("Load CIV mask/data (shape: %s) for studyNr: %i" % (str(civMask.shape),studyNr))
    
    # for each time match the civ image and load mask and velocity
    civIndices = []
    for i,t in enumerate(study["time"]):
        
        print("match time: ", t)
        civIdx = getCIVFrameIdx(t-entryTime,expDeltaT,expStartIdx)
        civIndices.append(civIdx)
        print("civ idx: ", civIdx)
        
        # load the image file and get mask if not yet loaded
        if civIdx not in loadedCIVMasks:
            print("Load CIV %s for simTime: %f at frameIdx: %i" % (maskName,t,civIdx))
            f = h5py.File(civImageFiles[civIdx])
            
            if computeNewMask:
                # image is (y,x, origin at lower left corner)
                image = f[civImageName][...].transpose() # make it (x,y)
                mask = treeMask * makeCivMask(image,expBackground)
            else:
                mask = civImageDataPostLoadOperator(f[civMaskName][...].astype(np.uint8))
                
            loadedCIVMasks[civIdx] = mask
            
        # load the data file (velocities) if not yet loaded
        if civIdx not in loadedCIVData:
            print("Load CIV velocity for simTime: %f at frameIdx: %i" % (t,civIdx))
            f = h5py.File(civGridFiles[civIdx])
            velMag = np.sqrt(f[civVelXName][...]**2 + f[civVelYName][...]**2).T

            loadedCIVData[civIdx] = velMag
        
        civVelMag[:,:,i] = loadedCIVData[civIdx]    
        civMask[:,:,i]   = loadedCIVMasks[civIdx]
    
    # set all stuff for this study
    study["civVelMag"] = np.ma.masked_array(civVelMag, mask= np.logical_not(civMask) )
    study["civIndices"] = civIndices
    study["entryTime"] = entryTime
    
for studyNr,study in studyDataVelMag.items():    
    # Compute mask/velocity match quality from simulation to civMask
    
    print("Compute overlapRatio/meanError of CIV / SIM for study: ", studyNr)
    
    overlapRatio =  study["overlapRatioSimCiv"] = np.ndarray((len(study["time"])),dtype=float)
    rMeanError    =  study["velMagMeanError"]   = np.ndarray((len(study["time"])),dtype=float)
    
    for i,t in enumerate(study["time"]):
        civVelMag = study["civVelMag"][:,:,i]
        simVelMag = study["slice"][:,:,i]
        # compute ratio
        rMeanError[i], overlapRatio[i]  = rootMeanSqErrorMaskedData(simVelMag,civVelMag)


Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 3
match time:  0.242
civ idx:  340
Load CIV mask for simTime: 0.242000 at frameIdx: 340
Load CIV velocity for simTime: 0.242000 at frameIdx: 340
match time:  0.284
civ idx:  382
Load CIV mask for simTime: 0.284000 at frameIdx: 382
Load CIV velocity for simTime: 0.284000 at frameIdx: 382
match time:  0.326
civ idx:  424
Load CIV mask for simTime: 0.326000 at frameIdx: 424
Load CIV velocity for simTime: 0.326000 at frameIdx: 424
match time:  0.368
civ idx:  466
Load CIV mask for simTime: 0.368000 at frameIdx: 466
Load CIV velocity for simTime: 0.368000 at frameIdx: 466
match time:  0.41
civ idx:  508
Load CIV mask for simTime: 0.410000 at frameIdx: 508
Load CIV velocity for simTime: 0.410000 at frameIdx: 508
match time:  0.452
civ idx:  550
Load CIV mask for simTime: 0.452000 at frameIdx: 550
Load CIV velocity for simTime: 0.452000 at frameIdx: 550
match time:  0.494
civ idx:  592
Load CIV mask for simTime: 0.494000 at frameIdx: 592
Load CIV velocity for simTime: 0.494000 at frameIdx: 592
match time:  0.536
civ idx:  634
Load CIV mask for simTime: 0.536000 at frameIdx: 634
Load CIV velocity for simTime: 0.536000 at frameIdx: 634
match time:  0.578
civ idx:  676
Load CIV mask for simTime: 0.578000 at frameIdx: 676
Load CIV velocity for simTime: 0.578000 at frameIdx: 676
match time:  0.62
civ idx:  718
Load CIV mask for simTime: 0.620000 at frameIdx: 718
Load CIV velocity for simTime: 0.620000 at frameIdx: 718
match time:  0.662
civ idx:  760
Load CIV mask for simTime: 0.662000 at frameIdx: 760
Load CIV velocity for simTime: 0.662000 at frameIdx: 760
match time:  0.704
civ idx:  802
Load CIV mask for simTime: 0.704000 at frameIdx: 802
Load CIV velocity for simTime: 0.704000 at frameIdx: 802
match time:  0.746
civ idx:  844
Load CIV mask for simTime: 0.746000 at frameIdx: 844
Load CIV velocity for simTime: 0.746000 at frameIdx: 844
match time:  0.788
civ idx:  886
Load CIV mask for simTime: 0.788000 at frameIdx: 886
Load CIV velocity for simTime: 0.788000 at frameIdx: 886
match time:  0.83
civ idx:  928
Load CIV mask for simTime: 0.830000 at frameIdx: 928
Load CIV velocity for simTime: 0.830000 at frameIdx: 928
match time:  0.872
civ idx:  970
Load CIV mask for simTime: 0.872000 at frameIdx: 970
Load CIV velocity for simTime: 0.872000 at frameIdx: 970
match time:  0.914
civ idx:  1012
Load CIV mask for simTime: 0.914000 at frameIdx: 1012
Load CIV velocity for simTime: 0.914000 at frameIdx: 1012
match time:  0.956
civ idx:  1054
Load CIV mask for simTime: 0.956000 at frameIdx: 1054
Load CIV velocity for simTime: 0.956000 at frameIdx: 1054
match time:  0.998
civ idx:  1096
Load CIV mask for simTime: 0.998000 at frameIdx: 1096
Load CIV velocity for simTime: 0.998000 at frameIdx: 1096
match time:  1.04
civ idx:  1138
Load CIV mask for simTime: 1.040000 at frameIdx: 1138
Load CIV velocity for simTime: 1.040000 at frameIdx: 1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 4
match time:  0.244
civ idx:  340
match time:  0.286
civ idx:  382
match time:  0.328
civ idx:  424
match time:  0.37
civ idx:  466
match time:  0.412
civ idx:  508
match time:  0.454
civ idx:  550
match time:  0.496
civ idx:  592
match time:  0.538
civ idx:  634
match time:  0.58
civ idx:  676
match time:  0.622
civ idx:  718
match time:  0.664
civ idx:  760
match time:  0.706
civ idx:  802
match time:  0.748
civ idx:  844
match time:  0.79
civ idx:  886
match time:  0.832
civ idx:  928
match time:  0.874
civ idx:  970
match time:  0.916
civ idx:  1012
match time:  0.958
civ idx:  1054
match time:  1.0
civ idx:  1096
match time:  1.042
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 5
match time:  0.244
civ idx:  340
match time:  0.286
civ idx:  382
match time:  0.328
civ idx:  424
match time:  0.37
civ idx:  466
match time:  0.412
civ idx:  508
match time:  0.454
civ idx:  550
match time:  0.496
civ idx:  592
match time:  0.538
civ idx:  634
match time:  0.58
civ idx:  676
match time:  0.622
civ idx:  718
match time:  0.664
civ idx:  760
match time:  0.706
civ idx:  802
match time:  0.748
civ idx:  844
match time:  0.79
civ idx:  886
match time:  0.832
civ idx:  928
match time:  0.874
civ idx:  970
match time:  0.916
civ idx:  1012
match time:  0.958
civ idx:  1054
match time:  1.0
civ idx:  1096
match time:  1.042
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 6
match time:  0.246
civ idx:  340
match time:  0.288
civ idx:  382
match time:  0.33
civ idx:  424
match time:  0.372
civ idx:  466
match time:  0.414
civ idx:  508
match time:  0.456
civ idx:  550
match time:  0.498
civ idx:  592
match time:  0.54
civ idx:  634
match time:  0.582
civ idx:  676
match time:  0.624
civ idx:  718
match time:  0.666
civ idx:  760
match time:  0.708
civ idx:  802
match time:  0.75
civ idx:  844
match time:  0.792
civ idx:  886
match time:  0.834
civ idx:  928
match time:  0.876
civ idx:  970
match time:  0.918
civ idx:  1012
match time:  0.96
civ idx:  1054
match time:  1.002
civ idx:  1096
match time:  1.044
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 7
match time:  0.246
civ idx:  340
match time:  0.288
civ idx:  382
match time:  0.33
civ idx:  424
match time:  0.372
civ idx:  466
match time:  0.414
civ idx:  508
match time:  0.456
civ idx:  550
match time:  0.498
civ idx:  592
match time:  0.54
civ idx:  634
match time:  0.582
civ idx:  676
match time:  0.624
civ idx:  718
match time:  0.666
civ idx:  760
match time:  0.708
civ idx:  802
match time:  0.75
civ idx:  844
match time:  0.792
civ idx:  886
match time:  0.834
civ idx:  928
match time:  0.876
civ idx:  970
match time:  0.918
civ idx:  1012
match time:  0.96
civ idx:  1054
match time:  1.002
civ idx:  1096
match time:  1.044
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 8
match time:  0.248
civ idx:  340
match time:  0.29
civ idx:  382
match time:  0.332
civ idx:  424
match time:  0.374
civ idx:  466
match time:  0.416
civ idx:  508
match time:  0.458
civ idx:  550
match time:  0.5
civ idx:  592
match time:  0.542
civ idx:  634
match time:  0.584
civ idx:  676
match time:  0.626
civ idx:  718
match time:  0.668
civ idx:  760
match time:  0.71
civ idx:  802
match time:  0.752
civ idx:  844
match time:  0.794
civ idx:  886
match time:  0.836
civ idx:  928
match time:  0.878
civ idx:  970
match time:  0.92
civ idx:  1012
match time:  0.962
civ idx:  1054
match time:  1.004
civ idx:  1096
match time:  1.046
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 9
match time:  0.248
civ idx:  340
match time:  0.29
civ idx:  382
match time:  0.332
civ idx:  424
match time:  0.374
civ idx:  466
match time:  0.416
civ idx:  508
match time:  0.458
civ idx:  550
match time:  0.5
civ idx:  592
match time:  0.542
civ idx:  634
match time:  0.584
civ idx:  676
match time:  0.626
civ idx:  718
match time:  0.668
civ idx:  760
match time:  0.71
civ idx:  802
match time:  0.752
civ idx:  844
match time:  0.794
civ idx:  886
match time:  0.836
civ idx:  928
match time:  0.878
civ idx:  970
match time:  0.92
civ idx:  1012
match time:  0.962
civ idx:  1054
match time:  1.004
civ idx:  1096
match time:  1.046
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 10
match time:  0.248
civ idx:  340
match time:  0.29
civ idx:  382
match time:  0.332
civ idx:  424
match time:  0.374
civ idx:  466
match time:  0.416
civ idx:  508
match time:  0.458
civ idx:  550
match time:  0.5
civ idx:  592
match time:  0.542
civ idx:  634
match time:  0.584
civ idx:  676
match time:  0.626
civ idx:  718
match time:  0.668
civ idx:  760
match time:  0.71
civ idx:  802
match time:  0.752
civ idx:  844
match time:  0.794
civ idx:  886
match time:  0.836
civ idx:  928
match time:  0.878
civ idx:  970
match time:  0.92
civ idx:  1012
match time:  0.962
civ idx:  1054
match time:  1.004
civ idx:  1096
match time:  1.046
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 11
match time:  0.248
civ idx:  340
match time:  0.29
civ idx:  382
match time:  0.332
civ idx:  424
match time:  0.374
civ idx:  466
match time:  0.416
civ idx:  508
match time:  0.458
civ idx:  550
match time:  0.5
civ idx:  592
match time:  0.542
civ idx:  634
match time:  0.584
civ idx:  676
match time:  0.626
civ idx:  718
match time:  0.668
civ idx:  760
match time:  0.71
civ idx:  802
match time:  0.752
civ idx:  844
match time:  0.794
civ idx:  886
match time:  0.836
civ idx:  928
match time:  0.878
civ idx:  970
match time:  0.92
civ idx:  1012
match time:  0.962
civ idx:  1054
match time:  1.004
civ idx:  1096
match time:  1.046
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 12
match time:  0.25
civ idx:  340
match time:  0.292
civ idx:  382
match time:  0.334
civ idx:  424
match time:  0.376
civ idx:  466
match time:  0.418
civ idx:  508
match time:  0.46
civ idx:  550
match time:  0.502
civ idx:  592
match time:  0.544
civ idx:  634
match time:  0.586
civ idx:  676
match time:  0.628
civ idx:  718
match time:  0.67
civ idx:  760
match time:  0.712
civ idx:  802
match time:  0.754
civ idx:  844
match time:  0.796
civ idx:  886
match time:  0.838
civ idx:  928
match time:  0.88
civ idx:  970
match time:  0.922
civ idx:  1012
match time:  0.964
civ idx:  1054
match time:  1.006
civ idx:  1096
match time:  1.048
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 13
match time:  0.25
civ idx:  340
match time:  0.292
civ idx:  382
match time:  0.334
civ idx:  424
match time:  0.376
civ idx:  466
match time:  0.418
civ idx:  508
match time:  0.46
civ idx:  550
match time:  0.502
civ idx:  592
match time:  0.544
civ idx:  634
match time:  0.586
civ idx:  676
match time:  0.628
civ idx:  718
match time:  0.67
civ idx:  760
match time:  0.712
civ idx:  802
match time:  0.754
civ idx:  844
match time:  0.796
civ idx:  886
match time:  0.838
civ idx:  928
match time:  0.88
civ idx:  970
match time:  0.922
civ idx:  1012
match time:  0.964
civ idx:  1054
match time:  1.006
civ idx:  1096
match time:  1.048
civ idx:  1138
Load CIV mask/data (shape: (800, 600, 20)) for studyNr: 14
match time:  0.248
civ idx:  340
match time:  0.29
civ idx:  382
match time:  0.332
civ idx:  424
match time:  0.374
civ idx:  466
match time:  0.416
civ idx:  508
match time:  0.458
civ idx:  550
match time:  0.5
civ idx:  592
match time:  0.542
civ idx:  634
match time:  0.584
civ idx:  676
match time:  0.626
civ idx:  718
match time:  0.668
civ idx:  760
match time:  0.71
civ idx:  802
match time:  0.752
civ idx:  844
match time:  0.794
civ idx:  886
match time:  0.836
civ idx:  928
match time:  0.878
civ idx:  970
match time:  0.92
civ idx:  1012
match time:  0.962
civ idx:  1054
match time:  1.004
civ idx:  1096
match time:  1.046
civ idx:  1138
Compute overlapRatio/meanError of CIV / SIM for study:  3
Compute overlapRatio/meanError of CIV / SIM for study:  4
Compute overlapRatio/meanError of CIV / SIM for study:  5
Compute overlapRatio/meanError of CIV / SIM for study:  6
Compute overlapRatio/meanError of CIV / SIM for study:  7
Compute overlapRatio/meanError of CIV / SIM for study:  8
Compute overlapRatio/meanError of CIV / SIM for study:  9
Compute overlapRatio/meanError of CIV / SIM for study:  10
Compute overlapRatio/meanError of CIV / SIM for study:  11
Compute overlapRatio/meanError of CIV / SIM for study:  12
Compute overlapRatio/meanError of CIV / SIM for study:  13
Compute overlapRatio/meanError of CIV / SIM for study:  14

In [26]:
# make plot of matching quality over time
plt.close("all")
fig = plt.figure(figsize=figureSize)
ax = fig.add_subplot(111)
ax.set_axisbelow(True)
ax.set_ylabel(r"overlap ratio $\frac{\sum (\mmB_{\mathrm{S}} \land \mmB_{\mathrm{E}})}{\sum (\mmB_{\mathrm{S}} \lor \mmB_{\mathrm{E}})}$")
ax.set_xlabel("relative time after entry [$\mathrm{s}$]")

for studyNr in reversed(studyNrs):
    study = studyDataVelMag[studyNr]
    time = study["time"] - study["time"][0] 
    ax.plot(time,study["overlapRatioSimCiv"],color=colorMap(studyNr),label=labelFormatter(studyNr,True),
            marker='o',ms=defaultMarkerSize,lw=lineSettings["thin"])
    
ax.set_ylim([None,1])
ax.legend(loc=3, **legendProps) # bbox_to_anchor=(0.02,0.02)
ax.grid(which='minor', alpha=0.15, linestyle=':')
ax.margins(0.04, 0.04)
fig.tight_layout(pad=0.1)
pS.defaultFormatAxes(ax)
plt.subplots_adjust(left=0.12)
fig.savefig("overlapRatio.pdf")


fig = plt.figure(figsize=figureSize)
ax = fig.add_subplot(111)
ax.set_axisbelow(True)
ax.set_xlabel("relative time after entry [$\mathrm{s}$]")
ax.set_ylabel(r"$\mathrm{RMSE}(\mathbf{V}_\mathrm{M,S},\mathbf{V}_\mathrm{M,E})$ [$\mathrm{m/s}$]")

for studyNr in (studyNrs):
    study = studyDataVelMag[studyNr]
    time = study["time"] - study["time"][0] 
    ax.plot(time[1:-1], study["velMagMeanError"][1:-1],color=colorMap(studyNr),label=labelFormatter(studyNr,False),
            marker='o',ms=defaultMarkerSize, lw=lineSettings["thin"])
    
ax.legend(loc=3,ncol=3,columnspacing=0.5,**legendProps)
ax.grid(which='minor', alpha=0.15, linestyle=':')
fig.tight_layout(pad=0.1)
pS.defaultFormatAxes(ax)
fig.savefig("rootMeanSquareError.pdf")
# plt.subplots_adjust(left=0.22, bottom=0.2, right=0.99, top=0.95, wspace=0, hspace=0)

In [13]:
from mpl_toolkits.axes_grid import make_axes_locatable
import matplotlib.ticker as ticker
from matplotlib.ticker import MultipleLocator
# define function for plotting a 2d grid
def plotGridData2d(ax,
                   data,
                   bounds, 
                   timeAnnotation=False,
                   climRange=[0,velocityMaxNorm],
                   cbarFormat = ticker.FuncFormatter(lambda x,pos: r"$%0.1f$"%x),
                   xLabel = r'$x$ [m]', yLabel = r'$y$ [m]',
                   cbarTitle = r'$[\mathrm{m/s}]$',
                   noLabels = False,
                  ):

    ax.set_axisbelow(True)
    if not noLabels:
        ax.set_xlabel(xLabel)
        ax.set_ylabel(yLabel)
    #image
    im = ax.imshow(data, origin='lower', extent=bounds, cmap=plt.get_cmap('jet') , 
                   interpolation='nearest',zorder=1.2, clim=climRange)
    
    # colorbar
    if cbarFormat:
        divider = make_axes_locatable(ax)
        cax1 = divider.append_axes("right", size="3%", pad=0.2)
        cax1.tick_params(length=3)
        c=fig.colorbar(im, cax = cax1, format=cbarFormat)
        for l  in cax1.yaxis.get_ticklabels()[1::2]:
              l.set_visible(False)
        cax1.set_title(cbarTitle,fontsize=10)
    # grid
    ax.grid(linestyle="-",linewidth=lineSettings["extra-thin"], color=[0.5]*3)
    
    # remove every second label
    for label in ax.xaxis.get_ticklabels()[::2]:
        label.set_visible(False)
    # ticks
    ax.tick_params(top='off',right='off',bottom='off',left='off')
    
    # mark time
    timeText = None
    if timeAnnotation:
        timeText =  ax.annotate(timeAnnotation, (0,1.0), (0, 10), xycoords='axes fraction', 
                    textcoords='offset points', va='top', ha='left',size=pS.defaultFontSize-2)
    
    fig.tight_layout(pad=0.1)    
    pS.defaultFormatAxes(ax)
    
    if cbarFormat:
        pS.defaultFormatColorbar(c)

    return im,timeText

In [21]:
# Plot CIV grid and SIM grid
plt.close("all")
for studyNr in [9,14]:
    study = studyDataVelMag[studyNr]
    bounds=study["gridFile"].getPlotBounds((0,1))
    print(bounds)
    i = 10
    print(velocityMaxNorm)
    for name, data in [ ("VelGrid",study["slice"][:,:,i].T), ("CIVVelGrid", study["civVelMag"][:,:,i].T ) ]:

        fig = plt.figure(figsize=figureSize)
        ax = fig.add_subplot(111, aspect='equal')

        plotGridData2d(
                    ax,
                    data,
                    bounds, 
                    timeAnnotation="$t$: %.04f s" % (study["time"][i]-study["entryTime"]))

        fig.savefig("%s-P-%i-i-%i.pdf" %(name,studyNr,i),dpi=400)
        plt.show()


[-0.80922446  0.01756937 -0.3214161   0.29867927]
2.2
/opt/python3.4Env/lib/python3.4/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
/opt/python3.4Env/lib/python3.4/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
[-0.80922446  0.01756937 -0.3214161   0.29867927]
2.2
/opt/python3.4Env/lib/python3.4/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
/opt/python3.4Env/lib/python3.4/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):

In [ ]:
# test stuff to delete
def insideImageMask(mask,x,y):
    return mask[x,y]
        
gridSize = [600,800]


bounds = [0,0.5,0,0.5]
dim = np.array([gridSize[1],gridSize[0]],dtype=int) # acciv grid is (y,x) indexed with left-bottom corner as
mask = np.random.randint(0,2,size=dim).astype(bool)
plt.imshow(mask)
print(dim)
minPoint = np.array([bounds[0],bounds[2]],dtype=float)
print(minPoint)
maxPoint = np.array([bounds[0+1],bounds[2+1]],dtype=float)
dxInv = 1.0/((maxPoint - minPoint) / dim)
points = np.random.random(size=(20000,2))
#print("points\n",points)
indices = ((points - minPoint) * dxInv).astype(int)
#print("indices",indices)
validIndices = np.logical_not(
                 ((indices[:,0] < 0) | (indices[:,0] >= dim[0])) |
                 ((indices[:,1] < 0) | (indices[:,1] >= dim[1]))
                )

allPoints = points[validIndices]
allIndices = indices[validIndices]
print("all indices",allIndices)

indexMask = np.logical_not(mask[allIndices[:,0],allIndices[:,1]])

print(indexMask)

Video Frames Rendering


In [15]:
# load all grid files
fileGlobbingExpression = "./gridVelocities/all/GridVelocity-P-*/*.h5"
filesPerStudyNr = getAllGridFiles(fileGlobbingExpression)
print("Files: ", filesPerStudyNr)
studyNrs = sorted(list(filesPerStudyNr.keys()))

# Load Masks and Velocities from Simulation ===================
studyData = {}
for studyNr,file in filesPerStudyNr.items():
    print("Open file: file %s", file[gridFileName])
    studyData[studyNr] = { "gridFile" : GridFile(file[gridFileName]) }
    
# output file
outputFolder = "plots-p%d/comparisonPlotsVelMag" % civPassNr
os.makedirs(outputFolder,exist_ok=True)
outputFileTemplate = os.path.join(outputFolder, "%s-P-%i-i-%i.jpg" )


Files:  {0: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-0/GridFileVelocityField.h5'}, 1: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-1/GridFileVelocityField.h5'}, 2: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-2/GridFileVelocityField.h5'}, 3: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-3/GridFileVelocityField.h5'}, 4: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-4/GridFileVelocityField.h5'}, 5: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-5/GridFileVelocityField.h5'}, 6: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-6/GridFileVelocityField.h5'}, 7: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-7/GridFileVelocityField.h5'}, 8: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-8/GridFileVelocityField.h5'}, 9: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-9/GridFileVelocityField.h5'}, 10: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-10/GridFileVelocityField.h5'}, 11: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-11/GridFileVelocityField.h5'}, 12: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-12/GridFileVelocityField.h5'}, 13: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-13/GridFileVelocityField.h5'}, 14: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-14/GridFileVelocityField.h5'}, 15: {'GridFileVelocityField.h5': './gridVelocities/all/GridVelocity-P-15/GridFileVelocityField.h5'}}
Open file: file %s ./gridVelocities/all/GridVelocity-P-0/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-1/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-2/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-3/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-4/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-5/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-6/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-7/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-8/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-9/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-10/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-11/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-12/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-13/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-14/GridFileVelocityField.h5
Open file: file %s ./gridVelocities/all/GridVelocity-P-15/GridFileVelocityField.h5

In [ ]:
plt.close("all")
import gc
from matplotlib import figure
mpl.use('Agg')
%matplotlib inline
mpl.rcParams.update ( {'font.family' : 'sans-serif', 'font.size' : 8, 'font.weight' : 'bold',
                       'text.latex.preamble' : rcParamsOrig['text.latex.preamble'],
                       'verbose.level' : 'debug'
                      })

skipAlreadyPlotted = True

def changeAxis(ax,size):
    for label in (ax.get_xticklabels() + ax.get_yticklabels()):
        label.set_visible(True)
        label.set_fontsize(size) # Size here overrides font_prop
        
makeMag = lambda g : np.sqrt(g[:,:,0]**2 + g[:,:,1]**2)
makeMag2 = lambda x,y : np.sqrt(x[...]**2 + y[...]**2)

# iterate over all grid velocities
for studyNr, data in studyData.items():
    
    # iterate over all state
    g = data["gridFile"];
    bounds=data["gridFile"].getPlotBounds((0,1))
    
    for state in g.getStates():
        stateIdx = state["globalStateIdx"]
        time = state["time"]
        filePath = outputFileTemplate %("VelocityMag",studyNr,stateIdx);
        if skipAlreadyPlotted:
            if os.path.exists(filePath):
#                 print("skip: ", filePath)
                continue;
        
        print("Save to: %s" % filePath)

        # load mask
        mask = g.readGrid(state["h5Group"],gridName=maskName)
        # load velocity
        velMag = makeMag(g.readGrid(state["h5Group"],gridName=gridName))
        velMag = np.ma.masked_array(velMag , mask=makeSimMask( mask )) 
        print("Vel. Shape: ", velMag.shape)                   
        # load civ file
        entryTime = studyEntryData["studies"][str(studyNr)]["entryTime"]
        civMask   = np.zeros(expSettings["resolution"] ,dtype=np.uint8)
        civVelMag = np.zeros(expSettings["resolution"] ,dtype=float)
        print("Load CIV mask/data (shape: %s) for studyNr: %i" % (str(civMask.shape),studyNr))
        print("match time: ", time , " at stateIdx: ", stateIdx)
        civIdx = getCIVFrameIdx(time-entryTime,expDeltaT,expStartIdx)
        print("civ idx: ", civIdx)
        
        # load the image file and get mask 
        print("Load CIV %s for simTime: %f at civIdx: %i" % (maskName,time,civIdx))
        f = h5py.File(civImageFiles[civIdx])
        if computeNewMask:
            # image is (y,x, origin at lower left corner)
            image = f[civImageName][...].transpose() # make it (x,y)
            civMask = treeMask * makeCivMask(image,expBackground)
        else:
            image = f[civImageName][...].transpose() # make it (x,y)
            civMask = civImageDataPostLoadOperator(f[civMaskName][...].astype(np.uint8))
        f.close()
        
        # load the data file (velocities)
        print("Load CIV velocity for simTime: %f at frameIdx: %i" % (time,civIdx))
        f = h5py.File(civGridFiles[civIdx])
        civVelMag = makeMag2(f[civVelXName], f[civVelYName]).T
        f.close()
        # mask civ data
        civVelMag = np.ma.masked_array(civVelMag, mask= np.logical_not(civMask) )
        #print("CIV Vel. Shape: ", civVelMag.shape)
        
        # plot grid
        #print(bounds)
        fig = figure.Figure(figsize=[6,3.5])
        ax1 = fig.add_subplot(1,2,1, aspect='equal')
        #im1, timeText1 =  
        plotGridData2d(ax1,velMag,
                           bounds = [bounds[2],bounds[3],bounds[0],bounds[1]],
                           #timeAnnotation="$t$: %.04f s" % (time-entryTime),
                           cbarFormat = False,
                           noLabels = True   
                          )
        ax1.set_title(r"\textsf{\textbf{Simulation Grid}}", fontdict={"fontsize":pS.defaultFontSize})
        changeAxis(ax1,8)
        
        ax2 = fig.add_subplot(1,2,2, aspect='equal')
        #im2, timeText2 = 
        plotGridData2d(ax2,civVelMag,
                           bounds = [bounds[2],bounds[3],bounds[0],bounds[1]], 
                           #timeAnnotation="$t$: %.04f s" % (time-entryTime),
#                            cbarFormat = False,
                           cbarFormat = ticker.FuncFormatter(lambda x,pos: r"$\mathbf{%0.1f}$"%x),
                           noLabels = True   
                          )
        ax2.set_title(r"\textsf{\textbf{Experiment CIV}}", fontdict={"fontsize":pS.defaultFontSize})
        changeAxis(ax2,8)
        
        ax2.yaxis.set_major_formatter(plt.NullFormatter())
        
        fig.text(0.43,0.95,r"$t$: $\mathtt{%.04f}$ \si{\second}" % (time-entryTime), size=10)
        
        fig.tight_layout(pad=0.1)
        fig.subplots_adjust(top=0.93, bottom=0.05)
        fig.savefig(filePath, dpi=300)
        
        # clean up
        fig.clear()
        plt.close(fig)
        plt.close("all")
        del fig, velMag, civVelMag, mask, civMask, image, f
        gc.collect()

        #raise NameError("asd")


/opt/python3.4Env/lib/python3.4/site-packages/matplotlib/__init__.py:1318: UserWarning:  This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)
/opt/python3.4Env/lib/python3.4/site-packages/matplotlib/tight_layout.py:225: UserWarning: tight_layout : falling back to Agg renderer
  warnings.warn("tight_layout : falling back to Agg renderer")
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-107.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.21400000000000408  at stateIdx:  107
civ idx:  340
Load CIV mask for simTime: 0.214000 at civIdx: 340
Load CIV velocity for simTime: 0.214000 at frameIdx: 340
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-108.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.21600000000000413  at stateIdx:  108
civ idx:  342
Load CIV mask for simTime: 0.216000 at civIdx: 342
Load CIV velocity for simTime: 0.216000 at frameIdx: 342
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-109.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2180000000000042  at stateIdx:  109
civ idx:  344
Load CIV mask for simTime: 0.218000 at civIdx: 344
Load CIV velocity for simTime: 0.218000 at frameIdx: 344
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-110.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.22000000000000425  at stateIdx:  110
civ idx:  346
Load CIV mask for simTime: 0.220000 at civIdx: 346
Load CIV velocity for simTime: 0.220000 at frameIdx: 346
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-111.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2220000000000043  at stateIdx:  111
civ idx:  348
Load CIV mask for simTime: 0.222000 at civIdx: 348
Load CIV velocity for simTime: 0.222000 at frameIdx: 348
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-112.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.22400000000000436  at stateIdx:  112
civ idx:  350
Load CIV mask for simTime: 0.224000 at civIdx: 350
Load CIV velocity for simTime: 0.224000 at frameIdx: 350
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-113.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.22600000000000442  at stateIdx:  113
civ idx:  352
Load CIV mask for simTime: 0.226000 at civIdx: 352
Load CIV velocity for simTime: 0.226000 at frameIdx: 352
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-114.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.22800000000000448  at stateIdx:  114
civ idx:  354
Load CIV mask for simTime: 0.228000 at civIdx: 354
Load CIV velocity for simTime: 0.228000 at frameIdx: 354
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-115.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.23000000000000453  at stateIdx:  115
civ idx:  356
Load CIV mask for simTime: 0.230000 at civIdx: 356
Load CIV velocity for simTime: 0.230000 at frameIdx: 356
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-116.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2320000000000046  at stateIdx:  116
civ idx:  358
Load CIV mask for simTime: 0.232000 at civIdx: 358
Load CIV velocity for simTime: 0.232000 at frameIdx: 358
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-117.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.23400000000000465  at stateIdx:  117
civ idx:  360
Load CIV mask for simTime: 0.234000 at civIdx: 360
Load CIV velocity for simTime: 0.234000 at frameIdx: 360
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-118.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2360000000000047  at stateIdx:  118
civ idx:  362
Load CIV mask for simTime: 0.236000 at civIdx: 362
Load CIV velocity for simTime: 0.236000 at frameIdx: 362
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-119.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.23800000000000476  at stateIdx:  119
civ idx:  364
Load CIV mask for simTime: 0.238000 at civIdx: 364
Load CIV velocity for simTime: 0.238000 at frameIdx: 364
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-120.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.24000000000000482  at stateIdx:  120
civ idx:  366
Load CIV mask for simTime: 0.240000 at civIdx: 366
Load CIV velocity for simTime: 0.240000 at frameIdx: 366
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-121.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.24200000000000488  at stateIdx:  121
civ idx:  368
Load CIV mask for simTime: 0.242000 at civIdx: 368
Load CIV velocity for simTime: 0.242000 at frameIdx: 368
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-122.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.24400000000000494  at stateIdx:  122
civ idx:  370
Load CIV mask for simTime: 0.244000 at civIdx: 370
Load CIV velocity for simTime: 0.244000 at frameIdx: 370
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-123.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.246000000000005  at stateIdx:  123
civ idx:  372
Load CIV mask for simTime: 0.246000 at civIdx: 372
Load CIV velocity for simTime: 0.246000 at frameIdx: 372
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-124.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.24800000000000505  at stateIdx:  124
civ idx:  374
Load CIV mask for simTime: 0.248000 at civIdx: 374
Load CIV velocity for simTime: 0.248000 at frameIdx: 374
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-125.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2500000000000051  at stateIdx:  125
civ idx:  376
Load CIV mask for simTime: 0.250000 at civIdx: 376
Load CIV velocity for simTime: 0.250000 at frameIdx: 376
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-126.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2520000000000049  at stateIdx:  126
civ idx:  378
Load CIV mask for simTime: 0.252000 at civIdx: 378
Load CIV velocity for simTime: 0.252000 at frameIdx: 378
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-127.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.25400000000000467  at stateIdx:  127
civ idx:  380
Load CIV mask for simTime: 0.254000 at civIdx: 380
Load CIV velocity for simTime: 0.254000 at frameIdx: 380
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-128.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.25600000000000445  at stateIdx:  128
civ idx:  382
Load CIV mask for simTime: 0.256000 at civIdx: 382
Load CIV velocity for simTime: 0.256000 at frameIdx: 382
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-129.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2580000000000042  at stateIdx:  129
civ idx:  384
Load CIV mask for simTime: 0.258000 at civIdx: 384
Load CIV velocity for simTime: 0.258000 at frameIdx: 384
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-130.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.260000000000004  at stateIdx:  130
civ idx:  386
Load CIV mask for simTime: 0.260000 at civIdx: 386
Load CIV velocity for simTime: 0.260000 at frameIdx: 386
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-131.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2620000000000038  at stateIdx:  131
civ idx:  388
Load CIV mask for simTime: 0.262000 at civIdx: 388
Load CIV velocity for simTime: 0.262000 at frameIdx: 388
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-132.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.26400000000000357  at stateIdx:  132
civ idx:  390
Load CIV mask for simTime: 0.264000 at civIdx: 390
Load CIV velocity for simTime: 0.264000 at frameIdx: 390
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-133.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.26600000000000334  at stateIdx:  133
civ idx:  392
Load CIV mask for simTime: 0.266000 at civIdx: 392
Load CIV velocity for simTime: 0.266000 at frameIdx: 392
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-134.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2680000000000031  at stateIdx:  134
civ idx:  394
Load CIV mask for simTime: 0.268000 at civIdx: 394
Load CIV velocity for simTime: 0.268000 at frameIdx: 394
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-135.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2700000000000029  at stateIdx:  135
civ idx:  396
Load CIV mask for simTime: 0.270000 at civIdx: 396
Load CIV velocity for simTime: 0.270000 at frameIdx: 396
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-136.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2720000000000027  at stateIdx:  136
civ idx:  398
Load CIV mask for simTime: 0.272000 at civIdx: 398
Load CIV velocity for simTime: 0.272000 at frameIdx: 398
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-137.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.27400000000000246  at stateIdx:  137
civ idx:  400
Load CIV mask for simTime: 0.274000 at civIdx: 400
Load CIV velocity for simTime: 0.274000 at frameIdx: 400
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-138.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.27600000000000224  at stateIdx:  138
civ idx:  402
Load CIV mask for simTime: 0.276000 at civIdx: 402
Load CIV velocity for simTime: 0.276000 at frameIdx: 402
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-139.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.278000000000002  at stateIdx:  139
civ idx:  404
Load CIV mask for simTime: 0.278000 at civIdx: 404
Load CIV velocity for simTime: 0.278000 at frameIdx: 404
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-140.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2800000000000018  at stateIdx:  140
civ idx:  406
Load CIV mask for simTime: 0.280000 at civIdx: 406
Load CIV velocity for simTime: 0.280000 at frameIdx: 406
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-141.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2820000000000016  at stateIdx:  141
civ idx:  408
Load CIV mask for simTime: 0.282000 at civIdx: 408
Load CIV velocity for simTime: 0.282000 at frameIdx: 408
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-142.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.28400000000000136  at stateIdx:  142
civ idx:  410
Load CIV mask for simTime: 0.284000 at civIdx: 410
Load CIV velocity for simTime: 0.284000 at frameIdx: 410
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-143.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.28600000000000114  at stateIdx:  143
civ idx:  412
Load CIV mask for simTime: 0.286000 at civIdx: 412
Load CIV velocity for simTime: 0.286000 at frameIdx: 412
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-144.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2880000000000009  at stateIdx:  144
civ idx:  414
Load CIV mask for simTime: 0.288000 at civIdx: 414
Load CIV velocity for simTime: 0.288000 at frameIdx: 414
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-145.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2900000000000007  at stateIdx:  145
civ idx:  416
Load CIV mask for simTime: 0.290000 at civIdx: 416
Load CIV velocity for simTime: 0.290000 at frameIdx: 416
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-146.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2920000000000005  at stateIdx:  146
civ idx:  418
Load CIV mask for simTime: 0.292000 at civIdx: 418
Load CIV velocity for simTime: 0.292000 at frameIdx: 418
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-147.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.29400000000000026  at stateIdx:  147
civ idx:  420
Load CIV mask for simTime: 0.294000 at civIdx: 420
Load CIV velocity for simTime: 0.294000 at frameIdx: 420
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-148.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.29600000000000004  at stateIdx:  148
civ idx:  422
Load CIV mask for simTime: 0.296000 at civIdx: 422
Load CIV velocity for simTime: 0.296000 at frameIdx: 422
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-149.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2979999999999998  at stateIdx:  149
civ idx:  424
Load CIV mask for simTime: 0.298000 at civIdx: 424
Load CIV velocity for simTime: 0.298000 at frameIdx: 424
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-150.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.2999999999999996  at stateIdx:  150
civ idx:  426
Load CIV mask for simTime: 0.300000 at civIdx: 426
Load CIV velocity for simTime: 0.300000 at frameIdx: 426
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-151.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3019999999999994  at stateIdx:  151
civ idx:  428
Load CIV mask for simTime: 0.302000 at civIdx: 428
Load CIV velocity for simTime: 0.302000 at frameIdx: 428
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-152.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.30399999999999916  at stateIdx:  152
civ idx:  430
Load CIV mask for simTime: 0.304000 at civIdx: 430
Load CIV velocity for simTime: 0.304000 at frameIdx: 430
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-153.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.30599999999999894  at stateIdx:  153
civ idx:  432
Load CIV mask for simTime: 0.306000 at civIdx: 432
Load CIV velocity for simTime: 0.306000 at frameIdx: 432
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-154.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3079999999999987  at stateIdx:  154
civ idx:  434
Load CIV mask for simTime: 0.308000 at civIdx: 434
Load CIV velocity for simTime: 0.308000 at frameIdx: 434
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-155.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3099999999999985  at stateIdx:  155
civ idx:  436
Load CIV mask for simTime: 0.310000 at civIdx: 436
Load CIV velocity for simTime: 0.310000 at frameIdx: 436
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-156.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3119999999999983  at stateIdx:  156
civ idx:  438
Load CIV mask for simTime: 0.312000 at civIdx: 438
Load CIV velocity for simTime: 0.312000 at frameIdx: 438
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-157.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.31399999999999806  at stateIdx:  157
civ idx:  440
Load CIV mask for simTime: 0.314000 at civIdx: 440
Load CIV velocity for simTime: 0.314000 at frameIdx: 440
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-158.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.31599999999999784  at stateIdx:  158
civ idx:  442
Load CIV mask for simTime: 0.316000 at civIdx: 442
Load CIV velocity for simTime: 0.316000 at frameIdx: 442
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-159.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3179999999999976  at stateIdx:  159
civ idx:  444
Load CIV mask for simTime: 0.318000 at civIdx: 444
Load CIV velocity for simTime: 0.318000 at frameIdx: 444
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-160.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3199999999999974  at stateIdx:  160
civ idx:  446
Load CIV mask for simTime: 0.320000 at civIdx: 446
Load CIV velocity for simTime: 0.320000 at frameIdx: 446
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-161.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3219999999999972  at stateIdx:  161
civ idx:  448
Load CIV mask for simTime: 0.322000 at civIdx: 448
Load CIV velocity for simTime: 0.322000 at frameIdx: 448
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-162.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.32399999999999696  at stateIdx:  162
civ idx:  450
Load CIV mask for simTime: 0.324000 at civIdx: 450
Load CIV velocity for simTime: 0.324000 at frameIdx: 450
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-163.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.32599999999999674  at stateIdx:  163
civ idx:  452
Load CIV mask for simTime: 0.326000 at civIdx: 452
Load CIV velocity for simTime: 0.326000 at frameIdx: 452
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-164.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3279999999999965  at stateIdx:  164
civ idx:  454
Load CIV mask for simTime: 0.328000 at civIdx: 454
Load CIV velocity for simTime: 0.328000 at frameIdx: 454
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-165.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3299999999999963  at stateIdx:  165
civ idx:  456
Load CIV mask for simTime: 0.330000 at civIdx: 456
Load CIV velocity for simTime: 0.330000 at frameIdx: 456
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-166.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3319999999999961  at stateIdx:  166
civ idx:  458
Load CIV mask for simTime: 0.332000 at civIdx: 458
Load CIV velocity for simTime: 0.332000 at frameIdx: 458
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-167.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.33399999999999586  at stateIdx:  167
civ idx:  460
Load CIV mask for simTime: 0.334000 at civIdx: 460
Load CIV velocity for simTime: 0.334000 at frameIdx: 460
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-168.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.33599999999999564  at stateIdx:  168
civ idx:  462
Load CIV mask for simTime: 0.336000 at civIdx: 462
Load CIV velocity for simTime: 0.336000 at frameIdx: 462
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-169.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3379999999999954  at stateIdx:  169
civ idx:  464
Load CIV mask for simTime: 0.338000 at civIdx: 464
Load CIV velocity for simTime: 0.338000 at frameIdx: 464
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-170.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3399999999999952  at stateIdx:  170
civ idx:  466
Load CIV mask for simTime: 0.340000 at civIdx: 466
Load CIV velocity for simTime: 0.340000 at frameIdx: 466
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-171.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.341999999999995  at stateIdx:  171
civ idx:  468
Load CIV mask for simTime: 0.342000 at civIdx: 468
Load CIV velocity for simTime: 0.342000 at frameIdx: 468
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-172.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.34399999999999475  at stateIdx:  172
civ idx:  470
Load CIV mask for simTime: 0.344000 at civIdx: 470
Load CIV velocity for simTime: 0.344000 at frameIdx: 470
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-173.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.34599999999999453  at stateIdx:  173
civ idx:  472
Load CIV mask for simTime: 0.346000 at civIdx: 472
Load CIV velocity for simTime: 0.346000 at frameIdx: 472
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-174.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3479999999999943  at stateIdx:  174
civ idx:  474
Load CIV mask for simTime: 0.348000 at civIdx: 474
Load CIV velocity for simTime: 0.348000 at frameIdx: 474
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-175.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3499999999999941  at stateIdx:  175
civ idx:  476
Load CIV mask for simTime: 0.350000 at civIdx: 476
Load CIV velocity for simTime: 0.350000 at frameIdx: 476
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-176.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3519999999999939  at stateIdx:  176
civ idx:  478
Load CIV mask for simTime: 0.352000 at civIdx: 478
Load CIV velocity for simTime: 0.352000 at frameIdx: 478
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-177.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.35399999999999365  at stateIdx:  177
civ idx:  480
Load CIV mask for simTime: 0.354000 at civIdx: 480
Load CIV velocity for simTime: 0.354000 at frameIdx: 480
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-178.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.35599999999999343  at stateIdx:  178
civ idx:  482
Load CIV mask for simTime: 0.356000 at civIdx: 482
Load CIV velocity for simTime: 0.356000 at frameIdx: 482
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-179.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3579999999999932  at stateIdx:  179
civ idx:  484
Load CIV mask for simTime: 0.358000 at civIdx: 484
Load CIV velocity for simTime: 0.358000 at frameIdx: 484
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-180.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.359999999999993  at stateIdx:  180
civ idx:  486
Load CIV mask for simTime: 0.360000 at civIdx: 486
Load CIV velocity for simTime: 0.360000 at frameIdx: 486
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-181.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.36199999999999277  at stateIdx:  181
civ idx:  488
Load CIV mask for simTime: 0.362000 at civIdx: 488
Load CIV velocity for simTime: 0.362000 at frameIdx: 488
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-182.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.36399999999999255  at stateIdx:  182
civ idx:  490
Load CIV mask for simTime: 0.364000 at civIdx: 490
Load CIV velocity for simTime: 0.364000 at frameIdx: 490
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-183.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.36599999999999233  at stateIdx:  183
civ idx:  492
Load CIV mask for simTime: 0.366000 at civIdx: 492
Load CIV velocity for simTime: 0.366000 at frameIdx: 492
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-184.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3679999999999921  at stateIdx:  184
civ idx:  494
Load CIV mask for simTime: 0.368000 at civIdx: 494
Load CIV velocity for simTime: 0.368000 at frameIdx: 494
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-185.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3699999999999919  at stateIdx:  185
civ idx:  496
Load CIV mask for simTime: 0.370000 at civIdx: 496
Load CIV velocity for simTime: 0.370000 at frameIdx: 496
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-186.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.37199999999999167  at stateIdx:  186
civ idx:  498
Load CIV mask for simTime: 0.372000 at civIdx: 498
Load CIV velocity for simTime: 0.372000 at frameIdx: 498
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-187.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.37399999999999145  at stateIdx:  187
civ idx:  500
Load CIV mask for simTime: 0.374000 at civIdx: 500
Load CIV velocity for simTime: 0.374000 at frameIdx: 500
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-188.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.37599999999999123  at stateIdx:  188
civ idx:  502
Load CIV mask for simTime: 0.376000 at civIdx: 502
Load CIV velocity for simTime: 0.376000 at frameIdx: 502
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-189.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.377999999999991  at stateIdx:  189
civ idx:  504
Load CIV mask for simTime: 0.378000 at civIdx: 504
Load CIV velocity for simTime: 0.378000 at frameIdx: 504
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-190.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3799999999999908  at stateIdx:  190
civ idx:  506
Load CIV mask for simTime: 0.380000 at civIdx: 506
Load CIV velocity for simTime: 0.380000 at frameIdx: 506
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-191.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.38199999999999057  at stateIdx:  191
civ idx:  508
Load CIV mask for simTime: 0.382000 at civIdx: 508
Load CIV velocity for simTime: 0.382000 at frameIdx: 508
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-192.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.38399999999999035  at stateIdx:  192
civ idx:  510
Load CIV mask for simTime: 0.384000 at civIdx: 510
Load CIV velocity for simTime: 0.384000 at frameIdx: 510
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-193.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.38599999999999013  at stateIdx:  193
civ idx:  512
Load CIV mask for simTime: 0.386000 at civIdx: 512
Load CIV velocity for simTime: 0.386000 at frameIdx: 512
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-194.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3879999999999899  at stateIdx:  194
civ idx:  514
Load CIV mask for simTime: 0.388000 at civIdx: 514
Load CIV velocity for simTime: 0.388000 at frameIdx: 514
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-195.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3899999999999897  at stateIdx:  195
civ idx:  516
Load CIV mask for simTime: 0.390000 at civIdx: 516
Load CIV velocity for simTime: 0.390000 at frameIdx: 516
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-196.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.39199999999998947  at stateIdx:  196
civ idx:  518
Load CIV mask for simTime: 0.392000 at civIdx: 518
Load CIV velocity for simTime: 0.392000 at frameIdx: 518
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-197.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.39399999999998925  at stateIdx:  197
civ idx:  520
Load CIV mask for simTime: 0.394000 at civIdx: 520
Load CIV velocity for simTime: 0.394000 at frameIdx: 520
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-198.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.395999999999989  at stateIdx:  198
civ idx:  522
Load CIV mask for simTime: 0.396000 at civIdx: 522
Load CIV velocity for simTime: 0.396000 at frameIdx: 522
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-199.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3979999999999888  at stateIdx:  199
civ idx:  524
Load CIV mask for simTime: 0.398000 at civIdx: 524
Load CIV velocity for simTime: 0.398000 at frameIdx: 524
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-200.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.3999999999999886  at stateIdx:  200
civ idx:  526
Load CIV mask for simTime: 0.400000 at civIdx: 526
Load CIV velocity for simTime: 0.400000 at frameIdx: 526
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-201.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.40199999999998837  at stateIdx:  201
civ idx:  528
Load CIV mask for simTime: 0.402000 at civIdx: 528
Load CIV velocity for simTime: 0.402000 at frameIdx: 528
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-202.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.40399999999998815  at stateIdx:  202
civ idx:  530
Load CIV mask for simTime: 0.404000 at civIdx: 530
Load CIV velocity for simTime: 0.404000 at frameIdx: 530
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-203.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4059999999999879  at stateIdx:  203
civ idx:  532
Load CIV mask for simTime: 0.406000 at civIdx: 532
Load CIV velocity for simTime: 0.406000 at frameIdx: 532
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-204.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4079999999999877  at stateIdx:  204
civ idx:  534
Load CIV mask for simTime: 0.408000 at civIdx: 534
Load CIV velocity for simTime: 0.408000 at frameIdx: 534
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-205.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4099999999999875  at stateIdx:  205
civ idx:  536
Load CIV mask for simTime: 0.410000 at civIdx: 536
Load CIV velocity for simTime: 0.410000 at frameIdx: 536
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-206.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.41199999999998727  at stateIdx:  206
civ idx:  538
Load CIV mask for simTime: 0.412000 at civIdx: 538
Load CIV velocity for simTime: 0.412000 at frameIdx: 538
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-207.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.41399999999998705  at stateIdx:  207
civ idx:  540
Load CIV mask for simTime: 0.414000 at civIdx: 540
Load CIV velocity for simTime: 0.414000 at frameIdx: 540
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-208.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4159999999999868  at stateIdx:  208
civ idx:  542
Load CIV mask for simTime: 0.416000 at civIdx: 542
Load CIV velocity for simTime: 0.416000 at frameIdx: 542
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-209.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4179999999999866  at stateIdx:  209
civ idx:  544
Load CIV mask for simTime: 0.418000 at civIdx: 544
Load CIV velocity for simTime: 0.418000 at frameIdx: 544
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-210.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4199999999999864  at stateIdx:  210
civ idx:  546
Load CIV mask for simTime: 0.420000 at civIdx: 546
Load CIV velocity for simTime: 0.420000 at frameIdx: 546
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-211.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.42199999999998616  at stateIdx:  211
civ idx:  548
Load CIV mask for simTime: 0.422000 at civIdx: 548
Load CIV velocity for simTime: 0.422000 at frameIdx: 548
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-212.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.42399999999998594  at stateIdx:  212
civ idx:  550
Load CIV mask for simTime: 0.424000 at civIdx: 550
Load CIV velocity for simTime: 0.424000 at frameIdx: 550
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-213.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4259999999999857  at stateIdx:  213
civ idx:  552
Load CIV mask for simTime: 0.426000 at civIdx: 552
Load CIV velocity for simTime: 0.426000 at frameIdx: 552
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-214.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4279999999999855  at stateIdx:  214
civ idx:  554
Load CIV mask for simTime: 0.428000 at civIdx: 554
Load CIV velocity for simTime: 0.428000 at frameIdx: 554
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-215.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4299999999999853  at stateIdx:  215
civ idx:  556
Load CIV mask for simTime: 0.430000 at civIdx: 556
Load CIV velocity for simTime: 0.430000 at frameIdx: 556
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-216.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.43199999999998506  at stateIdx:  216
civ idx:  558
Load CIV mask for simTime: 0.432000 at civIdx: 558
Load CIV velocity for simTime: 0.432000 at frameIdx: 558
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-217.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.43399999999998484  at stateIdx:  217
civ idx:  560
Load CIV mask for simTime: 0.434000 at civIdx: 560
Load CIV velocity for simTime: 0.434000 at frameIdx: 560
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-218.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4359999999999846  at stateIdx:  218
civ idx:  562
Load CIV mask for simTime: 0.436000 at civIdx: 562
Load CIV velocity for simTime: 0.436000 at frameIdx: 562
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-219.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4379999999999844  at stateIdx:  219
civ idx:  564
Load CIV mask for simTime: 0.438000 at civIdx: 564
Load CIV velocity for simTime: 0.438000 at frameIdx: 564
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-220.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4399999999999842  at stateIdx:  220
civ idx:  566
Load CIV mask for simTime: 0.440000 at civIdx: 566
Load CIV velocity for simTime: 0.440000 at frameIdx: 566
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-221.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.44199999999998396  at stateIdx:  221
civ idx:  568
Load CIV mask for simTime: 0.442000 at civIdx: 568
Load CIV velocity for simTime: 0.442000 at frameIdx: 568
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-222.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.44399999999998374  at stateIdx:  222
civ idx:  570
Load CIV mask for simTime: 0.444000 at civIdx: 570
Load CIV velocity for simTime: 0.444000 at frameIdx: 570
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-223.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4459999999999835  at stateIdx:  223
civ idx:  572
Load CIV mask for simTime: 0.446000 at civIdx: 572
Load CIV velocity for simTime: 0.446000 at frameIdx: 572
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-224.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4479999999999833  at stateIdx:  224
civ idx:  574
Load CIV mask for simTime: 0.448000 at civIdx: 574
Load CIV velocity for simTime: 0.448000 at frameIdx: 574
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-225.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4499999999999831  at stateIdx:  225
civ idx:  576
Load CIV mask for simTime: 0.450000 at civIdx: 576
Load CIV velocity for simTime: 0.450000 at frameIdx: 576
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-226.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.45199999999998286  at stateIdx:  226
civ idx:  578
Load CIV mask for simTime: 0.452000 at civIdx: 578
Load CIV velocity for simTime: 0.452000 at frameIdx: 578
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-227.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.45399999999998264  at stateIdx:  227
civ idx:  580
Load CIV mask for simTime: 0.454000 at civIdx: 580
Load CIV velocity for simTime: 0.454000 at frameIdx: 580
Save to: plots-p2/comparisonPlotsVelMag/VelocityMag-P-0-i-228.jpg
Vel. Shape:  (800, 600)
Load CIV mask/data (shape: (800, 600)) for studyNr: 0
match time:  0.4559999999999824  at stateIdx:  228
civ idx:  582
Load CIV mask for simTime: 0.456000 at civIdx: 582
Load CIV velocity for simTime: 0.456000 at frameIdx: 582

In [ ]: