# HG changeset patch # User Nicolas Saunier # Date 1385852615 18000 # Node ID 9a714f32fc9ff4329ee8a0eec7825db94660ab1e # Parent d40ad901b2721f89d9a3e074a9eefe03d1839e1c small updates diff -r d40ad901b272 -r 9a714f32fc9f python/pavement.py --- a/python/pavement.py Fri Nov 29 02:38:41 2013 -0500 +++ b/python/pavement.py Sat Nov 30 18:03:35 2013 -0500 @@ -23,9 +23,8 @@ plot(self.data['jours']/float(dayRatio), self.data[measure], options, **kwargs) - def getMarkingMeasures(self, measure, ligneNum): + def getMarkingMeasures(self, dataLabel): from numpy import isnan - dataLabel = '{}_{}'.format(measure, ligneNum) nonZeroIndices = ~isnan(self.data[dataLabel]) return self.data[nonZeroIndices]['jours'], self.data[nonZeroIndices][dataLabel] diff -r d40ad901b272 -r 9a714f32fc9f python/utils.py --- a/python/utils.py Fri Nov 29 02:38:41 2013 -0500 +++ b/python/utils.py Sat Nov 30 18:03:35 2013 -0500 @@ -195,6 +195,12 @@ else: return 0. +def triangular(center, x, halfwidth): + diff = abs(center-x) + if diff