tvaLib
Namespaces | Functions | Variables
analysis.py File Reference

Go to the source code of this file.

Namespaces

 analysis
 

Functions

def analysis.main ()
 main() More...
 

Variables

string analysis.version = 'R2.3.0 u. 2017-03-22'
 
 analysis.aIx = analyses.interpret(commands.analysis)[0]
 Start parsing cached data. More...
 
 analysis.s_analysis
 
 analysis.analysisFolder
 
list analysis.alignments = []
 Metrics engine. More...
 
list analysis.mhcs = []
 
list analysis.masks = []
 
list analysis.masks2 = []
 
list analysis.zones = []
 
list analysis.loops = []
 
list analysis.bounds = []
 
list analysis.homoCompletion = []
 
list analysis.trackCompletion = []
 
list analysis.trackOldestAge = []
 
list analysis.annotCompletion = []
 
list analysis.gtCompletion = []
 
list analysis.clCompletion = []
 
list analysis.serObjCompletion = []
 
list analysis.objMinversions = []
 
list analysis.objMaxversions = []
 
list analysis.listOfExistingUserTypes = [None]+[x for x in range(len(local['userTypeNames']))]
 
 analysis.meanSpeeds = tvaAnalysis.Measures(tvaAnalysis.MeanSpeed())
 General Metrics. More...
 
 analysis.inFlowPLPH = tvaAnalysis.Measures(tvaAnalysis.FlowRatePerLanePerHour())
 
 analysis.hourly_flows = tvaAnalysis.Measures(tvaAnalysis.MeasureByHour())
 
 analysis.hourly_speed = tvaAnalysis.Measures(tvaAnalysis.MeanSpeedByHour())
 
 analysis.vehKmTraveled = tvaAnalysis.Measures(tvaAnalysis.VehKmTraveled())
 
 analysis.predictionMethods = deepcopy(predictionMethods_master)
 Safety Metrics. More...
 
 analysis.agregationMethods = deepcopy(agregationMethods_master)
 
 analysis.thresholds = tvaLib.drange(0.25,2.0,0.25)
 
 analysis.completionBySeq
 For each prediction method... More...
 
 analysis.completion
 
 analysis.minVersion
 
 analysis.maxVersion
 
 analysis.userPairsPH
 
 analysis.userPairsWIndPH
 
 analysis.userPairsBH
 
 analysis.userPairsWIndBH
 
 analysis.interactionsPH
 
 analysis.meanTTC
 
 analysis.freqTTC
 
 analysis.countTTCThresh
 
 analysis.ttcExportFile = open(os.path.join(sites.getBaseDirectory(), config.output_folder, analysisFolder, 'TTC_export.csv'), 'wb')
 Prepare possible data export files. More...
 
 analysis.writer = csv_writer(ttcExportFile, delimiter=',', quotechar='"', quoting=csv_QUOTE_MINIMAL)
 Export data to CSV. More...
 
list analysis.headers = ['DBID', 'SITE_ID', 'CAM_ID', 'CAM_IX', 'ANALYSIS_IX', 'HOUR', 'TTC_VAL', 'TTC_PROB', 'MEAN_SPEED_PH', 'INFLOW_PH', 'INFLOW_PHPL', 'INTERINST_ANGLE', 'INTERINST_CLASS', 'PRED_METHOD','AGG_METHOD', 'OBJ1_NUM', 'OBJ2_NUM', 'OBJ1_TYPE', 'OBJ2_TYPE', 'MEAN_SPEED_OBJ1', 'MEAN_SPEED_OBJ2', 'INS_SPEED_OBJ1', 'INS_SPEED_OBJ2', 'FIVE_MINUTE_EXPOSURE', 'TWO_MINUTE_EXPOSURE', 'ONE_MINUTE_EXPOSURE', 'FIFTEEN_SECOND_EXPOSURE']
 Header. More...
 
 analysis.upsExportFile = open(os.path.join(sites.getBaseDirectory(), config.output_folder, analysisFolder, 'UPS_export.csv'), 'wb')
 Prepare UPS export. More...
 
dictionary analysis.runtime_figures = {}
 Generate runtime figures. More...
 
 analysis.None
 
 analysis.alpha
 
 analysis.local
 
 analysis.fig_name
 
 analysis.figsize
 
 analysis.verbose
 Error and exit handling. More...
 
 analysis.saIxs = site_analyses.interpret(commands.s_analysis)
 Search through data. More...
 
 analysis.prog
 
 analysis.siteIxs = tvaRuntime.targetSiteIxs(commands, sites, site_analyses[saIx])
 Check metadata completion. More...
 
 analysis.camIxs = tvaRuntime.targetCameraIxs(commands, sites[siteIx], site_analyses[saIx])
 Loop through cameras. More...
 
 analysis.fileIxs = tvaRuntime.targetSequenceIxs(commands, sites[siteIx][camIx], site_analyses[saIx])
 Loop through sequences. More...
 
 analysis.s_version = pickle.load(input_data)
 Look for object data. More...
 
 analysis.objects = pickle.load(input_data)
 Constrain trajectories to analysis zone. More...
 
 analysis.zone
 
 analysis.containment_threshold
 
 analysis.f_bb_containment_threshold
 
 analysis.max_outside_dist
 
 analysis.f_bb_max_outside_dist
 
 analysis.loopback_verification_frames
 
 analysis.f_bb_loopback_ver_frames
 
 analysis.indent
 Write user pair data. More...
 
 analysis.reportedAlignIdxs = tvaFilter.getReportedAlignIdxs(objects)
 
 analysis.speed_conv
 
 analysis.duration
 Attempt to repopulate objects, if necessary. More...
 
 analysis.location
 
 analysis.startTimes
 
 analysis.startTime
 
 analysis.framerate
 
string analysis.filename = predictionMethods[pmIx].label_short+'_'+sites[siteIx][camIx].name.replace('\\','').replace('/','')+'_'+sites[siteIx][camIx][fileIx].name+'.upairs'
 Look for interaction data. More...
 
 analysis.seq_userPairs = pickle.load(input_data)
 
 analysis.result = seq_userPairs.getPointList(userType1=utIx1, userType2=utIx2, ptype='CP', method=agregationMethod.method, percentile=agregationMethod.percentile, minimumProbability=config.col_probability_threshold, format='columns')
 Update meta data. More...
 
list analysis.writeData
 Write interaction data. More...
 
 analysis.obj1_index = tvaLib.Obj.num2ind(objects, point[5])
 Write user pair data. More...
 
 analysis.obj2_index = tvaLib.Obj.num2ind(objects, point[6])
 
 analysis.obj1_t_index = point[4]-objects[obj1_index].getFirstInstant()
 
 analysis.obj2_t_index = point[4]-objects[obj2_index].getFirstInstant()
 
 analysis.percentile
 Write exposure data. More...
 
 analysis.method = 1
 
list analysis.kstests = []
 Write. More...
 
int analysis.f = 0
 
dictionary analysis.kstests_ = {}
 
list analysis.ksVector = []
 
 analysis.ydata_ = None
 
 analysis.ydata = freqMeasure[obs2].getPDF()
 
list analysis.frequency = [x/float(sum(ydata_)) for x in ydata_]
 
list analysis.cdf = []
 
 analysis.label
 Print results. More...
 
 analysis.round_
 
 analysis.plotSettings = tvaVis.plotSettings(style=commands.fig_style, size=config.plot_text_size, family=config.font_family, verbose=commands.verbose)
 Visualisation. More...
 
 analysis.fig_lan_suffix
 
list analysis.figures = []
 Data sampling. More...
 
 analysis.fig_format
 Commit. More...
 
 analysis.fig_bg_colour
 
list analysis.figures_grid = []
 
dictionary analysis.labels = {}
 
list analysis.freqTTCdatas = []
 
list analysis.freqTTCklusters = []
 
 analysis.fig
 For each pair of existing userTypes... More...
 
 analysis.x_range
 
 analysis.mean
 
 analysis.freqTTCByAggMethod
 
 analysis.klusters
 
 analysis.dist_type
 
 analysis.distro_type
 
 analysis.timehorizon
 
 analysis.disp_timehorizon
 
 analysis.labelSampleSize
 
 analysis.labelTTCSampleSize
 
 analysis.results_TTC_X
 
int analysis.datasetIx = 0
 Data. More...
 
list analysis.data
 Start preparing stats for writing. More...
 
 analysis.exposure
 
 analysis.hli
 
 analysis.tvaHLI = importlib.import_module('hli.'+os.path.splitext(file_)[0])
 
 analysis.commands
 
 analysis.config
 
 analysis.site_analyses
 
 analysis.analyses
 
list analysis.kruskal_results = []
 Finish cluster loop EXACTLY here. More...
 
 analysis.kruskal_result = scipy_stats_kruskal(*[tvaLib.flatten_list(x[pmIx][amIx]) for x in cluster.results_sample_dump])
 
list analysis.kruskal_by_site = []
 
list analysis.cluster_lineStyles = ['-' for x in range(len(cluster))]
 Generate cluster figures. More...
 
list analysis.cluster_markers = ['' for x in range(len(cluster))]
 
list analysis.site_distros = []
 
 analysis.colours
 
list analysis.linestyles = [cluster_lineStyles[groupIx] for groupIx in range(len(cluster))]+tvaLib.flatten_list([[cluster_lineStyles[groupIx] for i in group] for groupIx,group in zip(range(len(cluster)),cluster.results_TTC_site[distro_type][agregationMethod.label_short][predictionMethod.label_short])])
 
list analysis.markers = [cluster_markers[groupIx] for groupIx in range(len(cluster))]+tvaLib.flatten_list([[cluster_markers[groupIx] for i in group] for groupIx,group in zip(range(len(cluster)),cluster.results_TTC_site[distro_type][agregationMethod.label_short][predictionMethod.label_short])])
 
list analysis.linewidths = [5 for groupIx in range(len(cluster))]+tvaLib.flatten_list([[1 for i in group] for group in cluster.results_TTC_site[distro_type][agregationMethod.label_short][predictionMethod.label_short]])
 
list analysis.xs = [cluster.results_TTC_X for x in range(len(cluster)+len(site_distros))]
 
list analysis.ys = [[0 for z in range(len(xs))] if x==False else x for x in cluster.results_TTC_site_means[distro_type][agregationMethod.label_short][predictionMethod.label_short]+site_distros]
 
 analysis.debug
 
 analysis.e
 
 analysis.time
 
 analysis.logging
 
 analysis.force