from __future__ import division import struct from optparse import OptionParser import numpy import matplotlib.pyplot import readInfo parser = OptionParser() parser.add_option("--dir", dest="dir", default="./") (options, args) = parser.parse_args() dir = options.dir info = readInfo.read(dir) #if (info['absStopTime'] - info['absStartTime']) != 10000000: # print "-1" # exit() equilibrationTime = (info['absStartTime'] + info['absStopTime']) / 2 minimumClusterSize = 3 """ weightedClusterCount=0 weightedImpureCount=0 f=open(dir+"/aliveness.txt","r") for line in f: q=line.split()
parser.add_option("--motileFraction", dest="motileFraction", default="0.5") (options, args) = parser.parse_args() dir = options.dir startTime = options.startTime stopTime = options.stopTime analysisFrameSkip = options.analysisFrameSkip debug = options.debug allTime = options.allTime endTimeFraction = options.endTimeFraction fakeAlivePrefix = options.fakeAlive boxes = options.boxes motileFraction = options.motileFraction info = readInfo.read(dir, False) startSl = info['startSl'] rodLength = info['rodLength'] frameSkip = info['frameSkip'] absStartTime = info['absStartTime'] absStopTime = info['absStopTime'] partNum = info['partNum'] timeStep = info['timeStep'] if allTime: #print "All time." startTime = absStartTime stopTime = absStopTime elif endTimeFraction != 0.0: #print "Fraction of time." stopTime = absStopTime
noPBC = options.noPBC resolution = options.resolution rerun = options.rerun fakeAlivePrefix = options.fakeAlive aliveFraction = options.aliveFraction baseDir = os.path.expanduser(baseDir) import matplotlib if save: matplotlib.use("PDF") import matplotlib.pyplot as plt matplotlib.rc('font', family='serif') info = readInfo.read(baseDir, True) startSl = info['startSl'] rodLength = info['rodLength'] frameSkip = info['frameSkip'] absStartTime = info['absStartTime'] absStopTime = info['absStopTime'] partNum = info['partNum'] timeStep = info['timeStep'] if (imWidth == 0): imWidth = numpy.floor(startSl / numpy.sqrt(8.0) - rodLength / 2.0) if (imHeight == 0): imHeight = numpy.floor(startSl / numpy.sqrt(8.0) - rodLength / 2.0) if allTime: