Compare only 1 Body's Simfile


In [2]:
import sys,os

import numpy as np
import matplotlib as mpl
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import matplotlib.gridspec as gridspec


#this works apparently only for savefig stuff
mpl.rcParams['figure.figsize']=(16.0,8.0)    #(6.0,4.0)
mpl.rcParams['font.size']=12                #10 
mpl.rcParams['savefig.dpi']=100             #72 

mpl.rcParams['figure.subplot.bottom']=.1    #.125


plt.rc('font', family='serif')
plt.rc('text', usetex=True)

#inline Shit
%matplotlib inline
%config InlineBackend.figure_format='svg'
%config InlineBackend.rc = {'figure.facecolor': 'white', 'figure.subplot.bottom': 0.125, 'figure.edgecolor': 'white', 'savefig.dpi': 300, 'figure.figsize': (12.0, 8.0), 'font.size': 10}

#GUi shit
%matplotlib tk

mpl.get_configdir()

# Import General Packages from me
from Tools.Parsers import *
from Tools.BoundingBox import *

In [8]:
def plotBodies():
        
    plt.close('all')
    
    nBodies = 1
    
    width_ratios=[1]
    height_ratios=[3,3]
    nSubplots  = 2      
                           
    if(dynState2.bodies[bodyIdx].additionalBytesType == 5):
        height_ratios.append(1)
        nSubplots +=1
        
    if(calculateDiff):
        height_ratios.append(1)
        height_ratios.append(1)
        nSubplots +=2
        
    if(calculateTol):
        height_ratios.append(3)
        nSubplots +=1    
    
    gs = gridspec.GridSpec(nSubplots, 1, width_ratios=width_ratios, height_ratios=height_ratios)
    
    jet = plt.get_cmap('jet') 
    cNorm  = colors.Normalize(vmin=0, vmax=nBodies)
    scalarMap = cm.ScalarMappable(norm=cNorm, cmap=jet)
    
    fig1 = plt.figure()
    ax10 = plt.subplot(gs[0]);
    # Position       
    ax10.plot(dynState1.t, dynState1.bodies[bodyIdx].q[:,0:3], color= scalarMap.to_rgba(0), label=label1, marker='.');
    ax10.plot(dynState2.t, dynState2.bodies[bodyIdx].q[:,0:3], color= scalarMap.to_rgba(0), linestyle='-.', label=label2, marker='.');
    
    ax11 = plt.subplot(gs[1], sharex= ax10);
    ax11.plot(dynState1.t, dynState1.bodies[bodyIdx].q[:,3:7], color= scalarMap.to_rgba(0),marker='.');
    ax11.plot(dynState2.t, dynState2.bodies[bodyIdx].q[:,3:7], color= scalarMap.to_rgba(0),linestyle='-.',marker='.');
    
    gsIdx = 1;
    if(dynState1.bodies[bodyIdx].additionalBytesType == 5):
        gsIdx+=1
        ax12 = plt.subplot(gs[gsIdx], sharex= ax10);
        ax12.plot( dynState1.t , dynState1.bodies[bodyIdx].addData["rank"] , color= scalarMap.to_rgba(0), marker='o')
        ax12.grid(True)
        ax12.set_ymargin(0.2)
        ax12.set_title('MPI Ranks %s' % label1 );
        ax12.autoscale(True,'both',False)
        
    if(calculateTol):
        gsIdx+=1
        ax14 = plt.subplot(gs[gsIdx], sharex= ax10);
        ax14.plot( dynState1.t , absDiffQMax , color= 'red', linestyle='-')
        ax14.grid(True)
        ax14.set_ymargin(0.2)
        ax14.set_title('Max. Abs Tol');
        ax14.autoscale(True,'both',False)
        
    if(calculateDiff):
        # q
        gsIdx+=1
        ax13 = plt.subplot(gs[gsIdx], sharex = ax10);    
        # make a color map of fixed colors
        cmap = mpl.colors.ListedColormap(['red','green'])
        bounds=[0,0.5,1]
        norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
        # tell imshow about color map so that only set colors are used
        im = plt.imshow(difference[0],interpolation='nearest', cmap = cmap, norm=norm, extent = [dynState1.t[0],dynState1.t[minRange-1],0,1])
        ax13.plot(dynState1.t[0:minRange],difference[0][0,:],'ko')
        plt.gca().set_aspect('auto')
        
        # time
        gsIdx+=1
        ax14 = plt.subplot(gs[gsIdx], sharex = ax10);    
        # make a color map of fixed colors
        cmap = mpl.colors.ListedColormap(['red','green'])
        bounds=[0,0.5,1]
        norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
        # tell imshow about color map so that only set colors are used
        im = ax14.imshow(difference[2],interpolation='nearest', cmap = cmap, norm=norm, extent = [dynState1.t[0],dynState1.t[minRange-1],0,1])
        ax14.plot(dynState1.t[0:minRange],difference[2][0,:],'ko')
        ax13.set_title('Validity q');
        ax14.set_title('Validity t');
    
    
    
        
    ax10.legend()
    ax10.grid(True)
    ax10.set_title('Position, Timesteps: ' + str(timesteps));
    ax10.set_ylabel('\mathbf{r}_S(t)');
    ax10.set_ymargin(0.2)
    ax10.autoscale(True,'both',False)
    
    ax11.grid(True)
    ax11.set_title('Quaternion');
    ax11.set_ylabel('\mathbf{a}_{KI}(t)');
    ax11.set_ymargin(0.2)
    ax11.autoscale(True,'both',False)
    
    
    
    gs.tight_layout(fig1)
    plt.show()
    
    
    # Velocity
    fig2 = plt.figure()
    ax20 = plt.subplot(gs[0]);           
    ax20.plot(dynState1.t, dynState1.bodies[bodyIdx].u[:,0:3], color= scalarMap.to_rgba(0),marker='.');
    ax20.plot(dynState2.t, dynState2.bodies[bodyIdx].u[:,0:3], color= scalarMap.to_rgba(0),linestyle='-.',marker='.');
    
    ax21 = plt.subplot(gs[1], sharex=ax20);
    ax21.plot(dynState1.t, dynState1.bodies[bodyIdx].u[:,3:6], color= scalarMap.to_rgba(0),marker='.');
    ax21.plot(dynState2.t, dynState2.bodies[bodyIdx].u[:,3:6], color= scalarMap.to_rgba(0),linestyle='-.',marker='.');
    
    gsIdx = 1;
    
    if(dynState2.bodies[bodyIdx].additionalBytesType == 5):
        gsIdx+=1
        ax22 = plt.subplot(gs[gsIdx], sharex= ax20);
        ax22.plot( dynState2.t , dynState2.bodies[bodyIdx].addData["rank"] , color= scalarMap.to_rgba(0), marker='o')
        ax22.grid(True)
        ax22.set_ymargin(0.2)
        ax22.set_title('MPI Ranks %s' % label2);
        ax22.autoscale(True,'both',False)
        
    if(calculateTol):
        gsIdx+=1
        ax24 = plt.subplot(gs[gsIdx], sharex= ax20);
        ax24.plot( dynState1.t , absDiffUMax , color= 'blue', linestyle='-')
        ax24.grid(True)
        ax24.set_ymargin(0.2)
        ax24.set_title('Max. Abs Tol');
        ax24.autoscale(True,'both',False)
        
    if(calculateDiff):
        gsIdx+=1
        ax23 = plt.subplot(gs[gsIdx], sharex = ax20);    
        # make a color map of fixed colors
        cmap = mpl.colors.ListedColormap(['red','green'])
        bounds=[0,0.5,1]
        norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
        # tell imshow about color map so that only set colors are used
        im = ax23.imshow(difference[1],interpolation='nearest', cmap = cmap, norm=norm, extent = [dynState1.t[0],dynState1.t[minRange-1],0,1])
        plt.gca().set_aspect('auto')
        ax23.plot(dynState1.t[0:minRange],difference[1][0,:],'ko')
        ax23.set_title('Validity u');
    
    
    ax20.grid(True)
    ax20.set_title('Velocity');
    ax20.set_ylabel('\mathbf{v}_S(t)');
    ax20.set_xmargin(0.0)
    ax20.set_ymargin(0.1)
    
    ax21.grid(True)
    ax21.set_title('Angular Velocity');
    ax21.set_ylabel('\mathbf{\omega}_{KI}(t)');
    ax21.set_xmargin(0.0)
    ax21.set_ymargin(0.1)
    
    
    
    gs.tight_layout(fig2)
    plt.show()

In [10]:
scriptpath = "./"
# Add the directory containing your module to the Python path (wants absolute paths)
sys.path.append(os.path.abspath(scriptpath))

SimFileReader.ReadInSimFile

bodyIdx = 456
bodyRange = [bodyIdx,bodyIdx]
label1='Grid';
label2='KdTree';


timeRange = [0,1.5]
calculateDiff = True
calculateTol = True
readLogs = False; # Not implemented so far
folderNumber = 0
#For single file which contains multiple bodies
dynState1 = SimFileReader.ReadInSimFile("./../SimFiles/SimDataRECORDGRID/SimState.sim" ,timeRange,bodyRange,False)
print(dynState1)
#print(dynState1.bodies)

folderNumber2 = 1
dynState2 = SimFileReader.ReadInSimFile("./../SimFiles/SimDataRECORDKDTREE/SimState.sim" ,timeRange,bodyRange,False)
# dynState2 = ReadInSimFile("./../GlobalFolder/SimFiles/SimDataRECORDMPI_%d/SimState.sim" % folderNumber2, timeRange , bodyRange , False)
print(dynState2)
#print(dynState2.bodies)

if(len(dynState1.t) != len(dynState2.t)):
    print("WARNING: STATES have no equal length!")

timesteps = len(dynState1.t)


if(calculateDiff):

    minRange = min(len(dynState1.t),len(dynState2.t))
    difference = ( np.zeros((1,minRange)) , np.zeros((1,minRange)), np.zeros((1,minRange)));  #(differences in q, diffs in u, t)
    for i in range(minRange):
        if( (dynState1.bodies[bodyIdx][0][i,0:7] == dynState2.bodies[bodyIdx][0][i,0:7]).all() ):
            difference[0][0,i] = 1;
            
        if( (dynState1.bodies[bodyIdx][1][i,0:6] == dynState2.bodies[bodyIdx][1][i,0:6]).all() ):
            difference[1][0,i] = 1;
            
        if( dynState1.t[i] == dynState2.t[i]):
            difference[2][0,i] = 1;
            
if(calculateTol):
    absDiffU = np.absolute(dynState1.bodies[bodyIdx][1]-dynState2.bodies[bodyIdx][1])
    absDiffUMax = absDiffU.max(axis=1)
    absDiffQ = np.absolute(dynState1.bodies[bodyIdx][0]-dynState2.bodies[bodyIdx][0])
    absDiffQMax = absDiffQ.max(axis=1)
    
plotBodies();


Read in SimFile at: ./../SimFiles/SimDataRECORDGRID/SimState.sim
--> File has: 1134.2308387756348 mb
--> SimFile signature: b'MBSF' found
--> SimFile version: 2
--> nSimBodies: 10000
--> nDofqObj: 7
--> nDofuObj: 6
--> Add. Bytes Type: 5
--> Add. Bytes Per Body: 20
--> nBytesHeader: 28
--> nBytesBodyState: 132
--> nBytesState: 1320008
--> nStates: 901
--> nAdditionalWrongBytes: 0
--> minTime: 0.0
--> maxTime: 1.7999999999998344
Filtering Simfile: t = [0, 1.5]
--> readNStates: 752
--> Time t: [ 0.     0.002  0.004  0.006  0.008  0.01   0.012  0.014  0.016  0.018
  0.02   0.022  0.024  0.026  0.028  0.03   0.032  0.034  0.036  0.038
  0.04   0.042  0.044  0.046  0.048  0.05   0.052  0.054  0.056  0.058
  0.06   0.062  0.064  0.066  0.068  0.07   0.072  0.074  0.076  0.078
  0.08   0.082  0.084  0.086  0.088  0.09   0.092  0.094  0.096  0.098  0.1
  0.102  0.104  0.106  0.108  0.11   0.112  0.114  0.116  0.118  0.12
  0.122  0.124  0.126  0.128  0.13   0.132  0.134  0.136  0.138  0.14
  0.142  0.144  0.146  0.148  0.15   0.152  0.154  0.156  0.158  0.16
  0.162  0.164  0.166  0.168  0.17   0.172  0.174  0.176  0.178  0.18
  0.182  0.184  0.186  0.188  0.19   0.192  0.194  0.196  0.198  0.2    0.202
  0.204  0.206  0.208  0.21   0.212  0.214  0.216  0.218  0.22   0.222
  0.224  0.226  0.228  0.23   0.232  0.234  0.236  0.238  0.24   0.242
  0.244  0.246  0.248  0.25   0.252  0.254  0.256  0.258  0.26   0.262
  0.264  0.266  0.268  0.27   0.272  0.274  0.276  0.278  0.28   0.282
  0.284  0.286  0.288  0.29   0.292  0.294  0.296  0.298  0.3    0.302
  0.304  0.306  0.308  0.31   0.312  0.314  0.316  0.318  0.32   0.322
  0.324  0.326  0.328  0.33   0.332  0.334  0.336  0.338  0.34   0.342
  0.344  0.346  0.348  0.35   0.352  0.354  0.356  0.358  0.36   0.362
  0.364  0.366  0.368  0.37   0.372  0.374  0.376  0.378  0.38   0.382
  0.384  0.386  0.388  0.39   0.392  0.394  0.396  0.398  0.4    0.402
  0.404  0.406  0.408  0.41   0.412  0.414  0.416  0.418  0.42   0.422
  0.424  0.426  0.428  0.43   0.432  0.434  0.436  0.438  0.44   0.442
  0.444  0.446  0.448  0.45   0.452  0.454  0.456  0.458  0.46   0.462
  0.464  0.466  0.468  0.47   0.472  0.474  0.476  0.478  0.48   0.482
  0.484  0.486  0.488  0.49   0.492  0.494  0.496  0.498  0.5    0.502
  0.504  0.506  0.508  0.51   0.512  0.514  0.516  0.518  0.52   0.522
  0.524  0.526  0.528  0.53   0.532  0.534  0.536  0.538  0.54   0.542
  0.544  0.546  0.548  0.55   0.552  0.554  0.556  0.558  0.56   0.562
  0.564  0.566  0.568  0.57   0.572  0.574  0.576  0.578  0.58   0.582
  0.584  0.586  0.588  0.59   0.592  0.594  0.596  0.598  0.6    0.602
  0.604  0.606  0.608  0.61   0.612  0.614  0.616  0.618  0.62   0.622
  0.624  0.626  0.628  0.63   0.632  0.634  0.636  0.638  0.64   0.642
  0.644  0.646  0.648  0.65   0.652  0.654  0.656  0.658  0.66   0.662
  0.664  0.666  0.668  0.67   0.672  0.674  0.676  0.678  0.68   0.682
  0.684  0.686  0.688  0.69   0.692  0.694  0.696  0.698  0.7    0.702
  0.704  0.706  0.708  0.71   0.712  0.714  0.716  0.718  0.72   0.722
  0.724  0.726  0.728  0.73   0.732  0.734  0.736  0.738  0.74   0.742
  0.744  0.746  0.748  0.75   0.752  0.754  0.756  0.758  0.76   0.762
  0.764  0.766  0.768  0.77   0.772  0.774  0.776  0.778  0.78   0.782
  0.784  0.786  0.788  0.79   0.792  0.794  0.796  0.798  0.8    0.802
  0.804  0.806  0.808  0.81   0.812  0.814  0.816  0.818  0.82   0.822
  0.824  0.826  0.828  0.83   0.832  0.834  0.836  0.838  0.84   0.842
  0.844  0.846  0.848  0.85   0.852  0.854  0.856  0.858  0.86   0.862
  0.864  0.866  0.868  0.87   0.872  0.874  0.876  0.878  0.88   0.882
  0.884  0.886  0.888  0.89   0.892  0.894  0.896  0.898  0.9    0.902
  0.904  0.906  0.908  0.91   0.912  0.914  0.916  0.918  0.92   0.922
  0.924  0.926  0.928  0.93   0.932  0.934  0.936  0.938  0.94   0.942
  0.944  0.946  0.948  0.95   0.952  0.954  0.956  0.958  0.96   0.962
  0.964  0.966  0.968  0.97   0.972  0.974  0.976  0.978  0.98   0.982
  0.984  0.986  0.988  0.99   0.992  0.994  0.996  0.998  1.     1.002
  1.004  1.006  1.008  1.01   1.012  1.014  1.016  1.018  1.02   1.022
  1.024  1.026  1.028  1.03   1.032  1.034  1.036  1.038  1.04   1.042
  1.044  1.046  1.048  1.05   1.052  1.054  1.056  1.058  1.06   1.062
  1.064  1.066  1.068  1.07   1.072  1.074  1.076  1.078  1.08   1.082
  1.084  1.086  1.088  1.09   1.092  1.094  1.096  1.098  1.1    1.102
  1.104  1.106  1.108  1.11   1.112  1.114  1.116  1.118  1.12   1.122
  1.124  1.126  1.128  1.13   1.132  1.134  1.136  1.138  1.14   1.142
  1.144  1.146  1.148  1.15   1.152  1.154  1.156  1.158  1.16   1.162
  1.164  1.166  1.168  1.17   1.172  1.174  1.176  1.178  1.18   1.182
  1.184  1.186  1.188  1.19   1.192  1.194  1.196  1.198  1.2    1.202
  1.204  1.206  1.208  1.21   1.212  1.214  1.216  1.218  1.22   1.222
  1.224  1.226  1.228  1.23   1.232  1.234  1.236  1.238  1.24   1.242
  1.244  1.246  1.248  1.25   1.252  1.254  1.256  1.258  1.26   1.262
  1.264  1.266  1.268  1.27   1.272  1.274  1.276  1.278  1.28   1.282
  1.284  1.286  1.288  1.29   1.292  1.294  1.296  1.298  1.3    1.302
  1.304  1.306  1.308  1.31   1.312  1.314  1.316  1.318  1.32   1.322
  1.324  1.326  1.328  1.33   1.332  1.334  1.336  1.338  1.34   1.342
  1.344  1.346  1.348  1.35   1.352  1.354  1.356  1.358  1.36   1.362
  1.364  1.366  1.368  1.37   1.372  1.374  1.376  1.378  1.38   1.382
  1.384  1.386  1.388  1.39   1.392  1.394  1.396  1.398  1.4    1.402
  1.404  1.406  1.408  1.41   1.412  1.414  1.416  1.418  1.42   1.422
  1.424  1.426  1.428  1.43   1.432  1.434  1.436  1.438  1.44   1.442
  1.444  1.446  1.448  1.45   1.452  1.454  1.456  1.458  1.46   1.462
  1.464  1.466  1.468  1.47   1.472  1.474  1.476  1.478  1.48   1.482
  1.484  1.486  1.488  1.49   1.492  1.494  1.496  1.498  1.5    1.502]
--> BodyIds: min/max  456 456
--> Number of BodyIds:  1
DynamicsState id:140241792851808
nSimBodies: 1
minTime: 0.0
maxTime: 1.502
body ids: [456]
Read in SimFile at: ./../SimFiles/SimDataRECORDKDTREE/SimState.sim
--> File has: 1134.2308387756348 mb
--> SimFile signature: b'MBSF' found
--> SimFile version: 2
--> nSimBodies: 10000
--> nDofqObj: 7
--> nDofuObj: 6
--> Add. Bytes Type: 5
--> Add. Bytes Per Body: 20
--> nBytesHeader: 28
--> nBytesBodyState: 132
--> nBytesState: 1320008
--> nStates: 901
--> nAdditionalWrongBytes: 0
--> minTime: 0.0
--> maxTime: 1.7999999999998344
Filtering Simfile: t = [0, 1.5]
--> readNStates: 752
--> Time t: [ 0.     0.002  0.004  0.006  0.008  0.01   0.012  0.014  0.016  0.018
  0.02   0.022  0.024  0.026  0.028  0.03   0.032  0.034  0.036  0.038
  0.04   0.042  0.044  0.046  0.048  0.05   0.052  0.054  0.056  0.058
  0.06   0.062  0.064  0.066  0.068  0.07   0.072  0.074  0.076  0.078
  0.08   0.082  0.084  0.086  0.088  0.09   0.092  0.094  0.096  0.098  0.1
  0.102  0.104  0.106  0.108  0.11   0.112  0.114  0.116  0.118  0.12
  0.122  0.124  0.126  0.128  0.13   0.132  0.134  0.136  0.138  0.14
  0.142  0.144  0.146  0.148  0.15   0.152  0.154  0.156  0.158  0.16
  0.162  0.164  0.166  0.168  0.17   0.172  0.174  0.176  0.178  0.18
  0.182  0.184  0.186  0.188  0.19   0.192  0.194  0.196  0.198  0.2    0.202
  0.204  0.206  0.208  0.21   0.212  0.214  0.216  0.218  0.22   0.222
  0.224  0.226  0.228  0.23   0.232  0.234  0.236  0.238  0.24   0.242
  0.244  0.246  0.248  0.25   0.252  0.254  0.256  0.258  0.26   0.262
  0.264  0.266  0.268  0.27   0.272  0.274  0.276  0.278  0.28   0.282
  0.284  0.286  0.288  0.29   0.292  0.294  0.296  0.298  0.3    0.302
  0.304  0.306  0.308  0.31   0.312  0.314  0.316  0.318  0.32   0.322
  0.324  0.326  0.328  0.33   0.332  0.334  0.336  0.338  0.34   0.342
  0.344  0.346  0.348  0.35   0.352  0.354  0.356  0.358  0.36   0.362
  0.364  0.366  0.368  0.37   0.372  0.374  0.376  0.378  0.38   0.382
  0.384  0.386  0.388  0.39   0.392  0.394  0.396  0.398  0.4    0.402
  0.404  0.406  0.408  0.41   0.412  0.414  0.416  0.418  0.42   0.422
  0.424  0.426  0.428  0.43   0.432  0.434  0.436  0.438  0.44   0.442
  0.444  0.446  0.448  0.45   0.452  0.454  0.456  0.458  0.46   0.462
  0.464  0.466  0.468  0.47   0.472  0.474  0.476  0.478  0.48   0.482
  0.484  0.486  0.488  0.49   0.492  0.494  0.496  0.498  0.5    0.502
  0.504  0.506  0.508  0.51   0.512  0.514  0.516  0.518  0.52   0.522
  0.524  0.526  0.528  0.53   0.532  0.534  0.536  0.538  0.54   0.542
  0.544  0.546  0.548  0.55   0.552  0.554  0.556  0.558  0.56   0.562
  0.564  0.566  0.568  0.57   0.572  0.574  0.576  0.578  0.58   0.582
  0.584  0.586  0.588  0.59   0.592  0.594  0.596  0.598  0.6    0.602
  0.604  0.606  0.608  0.61   0.612  0.614  0.616  0.618  0.62   0.622
  0.624  0.626  0.628  0.63   0.632  0.634  0.636  0.638  0.64   0.642
  0.644  0.646  0.648  0.65   0.652  0.654  0.656  0.658  0.66   0.662
  0.664  0.666  0.668  0.67   0.672  0.674  0.676  0.678  0.68   0.682
  0.684  0.686  0.688  0.69   0.692  0.694  0.696  0.698  0.7    0.702
  0.704  0.706  0.708  0.71   0.712  0.714  0.716  0.718  0.72   0.722
  0.724  0.726  0.728  0.73   0.732  0.734  0.736  0.738  0.74   0.742
  0.744  0.746  0.748  0.75   0.752  0.754  0.756  0.758  0.76   0.762
  0.764  0.766  0.768  0.77   0.772  0.774  0.776  0.778  0.78   0.782
  0.784  0.786  0.788  0.79   0.792  0.794  0.796  0.798  0.8    0.802
  0.804  0.806  0.808  0.81   0.812  0.814  0.816  0.818  0.82   0.822
  0.824  0.826  0.828  0.83   0.832  0.834  0.836  0.838  0.84   0.842
  0.844  0.846  0.848  0.85   0.852  0.854  0.856  0.858  0.86   0.862
  0.864  0.866  0.868  0.87   0.872  0.874  0.876  0.878  0.88   0.882
  0.884  0.886  0.888  0.89   0.892  0.894  0.896  0.898  0.9    0.902
  0.904  0.906  0.908  0.91   0.912  0.914  0.916  0.918  0.92   0.922
  0.924  0.926  0.928  0.93   0.932  0.934  0.936  0.938  0.94   0.942
  0.944  0.946  0.948  0.95   0.952  0.954  0.956  0.958  0.96   0.962
  0.964  0.966  0.968  0.97   0.972  0.974  0.976  0.978  0.98   0.982
  0.984  0.986  0.988  0.99   0.992  0.994  0.996  0.998  1.     1.002
  1.004  1.006  1.008  1.01   1.012  1.014  1.016  1.018  1.02   1.022
  1.024  1.026  1.028  1.03   1.032  1.034  1.036  1.038  1.04   1.042
  1.044  1.046  1.048  1.05   1.052  1.054  1.056  1.058  1.06   1.062
  1.064  1.066  1.068  1.07   1.072  1.074  1.076  1.078  1.08   1.082
  1.084  1.086  1.088  1.09   1.092  1.094  1.096  1.098  1.1    1.102
  1.104  1.106  1.108  1.11   1.112  1.114  1.116  1.118  1.12   1.122
  1.124  1.126  1.128  1.13   1.132  1.134  1.136  1.138  1.14   1.142
  1.144  1.146  1.148  1.15   1.152  1.154  1.156  1.158  1.16   1.162
  1.164  1.166  1.168  1.17   1.172  1.174  1.176  1.178  1.18   1.182
  1.184  1.186  1.188  1.19   1.192  1.194  1.196  1.198  1.2    1.202
  1.204  1.206  1.208  1.21   1.212  1.214  1.216  1.218  1.22   1.222
  1.224  1.226  1.228  1.23   1.232  1.234  1.236  1.238  1.24   1.242
  1.244  1.246  1.248  1.25   1.252  1.254  1.256  1.258  1.26   1.262
  1.264  1.266  1.268  1.27   1.272  1.274  1.276  1.278  1.28   1.282
  1.284  1.286  1.288  1.29   1.292  1.294  1.296  1.298  1.3    1.302
  1.304  1.306  1.308  1.31   1.312  1.314  1.316  1.318  1.32   1.322
  1.324  1.326  1.328  1.33   1.332  1.334  1.336  1.338  1.34   1.342
  1.344  1.346  1.348  1.35   1.352  1.354  1.356  1.358  1.36   1.362
  1.364  1.366  1.368  1.37   1.372  1.374  1.376  1.378  1.38   1.382
  1.384  1.386  1.388  1.39   1.392  1.394  1.396  1.398  1.4    1.402
  1.404  1.406  1.408  1.41   1.412  1.414  1.416  1.418  1.42   1.422
  1.424  1.426  1.428  1.43   1.432  1.434  1.436  1.438  1.44   1.442
  1.444  1.446  1.448  1.45   1.452  1.454  1.456  1.458  1.46   1.462
  1.464  1.466  1.468  1.47   1.472  1.474  1.476  1.478  1.48   1.482
  1.484  1.486  1.488  1.49   1.492  1.494  1.496  1.498  1.5    1.502]
--> BodyIds: min/max  456 456
--> Number of BodyIds:  1
DynamicsState id:140241792848056
nSimBodies: 1
minTime: 0.0
maxTime: 1.502
body ids: [456]
**OUTPUT MUTED**

In [56]:
dynState1.bodies[741].addData.rank


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-56-2e59a7a97e71> in <module>()
----> 1 dynState1.bodies[741].addData.rank

AttributeError: 'dict' object has no attribute 'rank'

In [ ]: