# HG changeset patch # User Nicolas Saunier # Date 1385540521 18000 # Node ID 0bcfa49d179a6eff35d40724c7638e9ef69aee2e # Parent fb3654a9127d89f1be68765ef186228617058751 began module for pavement marking data processing diff -r fb3654a9127d -r 0bcfa49d179a python/pavement.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/pavement.py Wed Nov 27 03:22:01 2013 -0500 @@ -0,0 +1,32 @@ +#! /usr/bin/env python +'''Tools for processing and analyzing pavement marking data''' + +__metaclass__ = type + +class RTSS: + 'class for data related to a RTSS, including agregating pavement marking measurements' + pass + +class MarkingTest: + '''class for a test site for a given product''' + + def __init__(self, siteId, paintingDate, paintingType, color, data): + self.siteId = siteId + self.paintingDate = paintingDate + self.paintingType = paintingType + self.color = color + self.data = data + self.nMeasures = len(data) + + def plot(self, measure, dayRatio = 1.): + from matplotlib.pyplot import plot + plot(self.data['jours']/float(dayRatio), + self.data[measure]) + + def plotRetroreflectivity(self, dayRatio = 1.): + for i in range(1,7): + self.plot('retro_{}'.format(i), dayRatio) + + def plotDurability(self, dayRatio = 1.): + for i in range(1,7): + self.plot('dur_{}'.format(i), dayRatio)