# HG changeset patch # User mitian # Date 1431361759 -3600 # Node ID a34f9c5d0cd9ad50c7669014e0d8da7e19d8899d # Parent 294f66d285af581a4244b77119440b6d6b0c2e62 remove pyc files tracked by mistake diff -r 294f66d285af -r a34f9c5d0cd9 novelty.py --- a/novelty.py Tue May 05 08:54:09 2015 +0100 +++ b/novelty.py Mon May 11 17:29:19 2015 +0100 @@ -46,6 +46,17 @@ novelty = (novelty - np.min(novelty)) / (np.max(novelty) - np.min(novelty)) return novelty +def getNoveltyDiff(novelty, N=1, relative=False): + '''Return the second order differece in the novelty curve.''' + + diff = np.zeros_like(novelty) + diff[:-N] = np.diff(novelty, n=N) + + if relative: + diff /= novelty + + return diff + def getDiagonalSlice(ssm, width): ''' Return a diagonal stripe of the ssm given its width, with 45 degrees rotation. Note: requres 45 degrees rotated kernel also.''' diff -r 294f66d285af -r a34f9c5d0cd9 utils/ComputationCache.pyc Binary file utils/ComputationCache.pyc has changed diff -r 294f66d285af -r a34f9c5d0cd9 utils/GmmMetrics.pyc Binary file utils/GmmMetrics.pyc has changed diff -r 294f66d285af -r a34f9c5d0cd9 utils/MutualInfo.pyc Binary file utils/MutualInfo.pyc has changed diff -r 294f66d285af -r a34f9c5d0cd9 utils/OnsetPlotProc.pyc Binary file utils/OnsetPlotProc.pyc has changed diff -r 294f66d285af -r a34f9c5d0cd9 utils/PathTracker.pyc Binary file utils/PathTracker.pyc has changed diff -r 294f66d285af -r a34f9c5d0cd9 utils/PeakPickerUtil.pyc Binary file utils/PeakPickerUtil.pyc has changed