def _histogramTrackwaySparseness(self, label, values): """ Creates a histogram for each trackway entry in the values list. """ path = self.getTempFilePath(extension='pdf') h = Histogram(data=values, isLog=True) h.xLimits = [0, 200] h.binCount = 20 h.xLabel = 'Relative Sparseness (%)' h.title = 'Trackway Sparseness (%s)' % label h.shaveDataToXLimits() h.save(path=path) return path
def _processAspectRatios(self): """_processAspectRatios doc...""" aspects = [] pesAspects = [] manAspects = [] for entry in self.entries: value = entry['aspect'].value aspects.append(value) if entry['track'].pes: pesAspects.append(value) else: manAspects.append(value) self.logger.write('%s\nASPECT RATIO' % ('='*80)) self.logger.write('Total: %s' % NumericUtils.getMeanAndDeviation(aspects).label) self.logger.write('Pes: %s' % NumericUtils.getMeanAndDeviation(pesAspects).label) self.logger.write('Manus: %s' % NumericUtils.getMeanAndDeviation(manAspects).label) h = Histogram(data=aspects, color='green') h.title = 'Aspect Ratios' h.yLabel = 'Count' h.xLabel = 'Aspect Ratio (width/length)' self._paths.append(h.save(self.getTempFilePath(extension='pdf'))) h = Histogram(data=pesAspects, color='green') h.title = 'Aspect Ratios (Pes)' h.yLabel = 'Count' h.xLabel = 'Aspect Ratio (width/length)' self._paths.append(h.save(self.getTempFilePath(extension='pdf'))) h = Histogram(data=manAspects, color='green') h.title = 'Aspect Ratios (Manus)' h.yLabel = 'Count' h.xLabel = 'Aspect Ratio (width/length)' self._paths.append(h.save(self.getTempFilePath(extension='pdf')))
def _histogramSeriesSparseness(self, label, values): """_histogramSeriesSparseness doc...""" path = self.getTempFilePath(extension='pdf') h = Histogram(data=values, isLog=True) h.xLimits = [0, 200] h.binCount = 20 h.xLabel = 'Relative Sparseness (%)' h.title = 'Track Series Sparseness (%s)' % label h.shaveDataToXLimits() h.save(path=path) return path