Changeset 6ae3a77 for python/test/bench/onset/bench-delay
- Timestamp:
- Feb 23, 2006, 3:23:30 AM (19 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- ee7b9da
- Parents:
- a12563ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/test/bench/onset/bench-delay
ra12563ea r6ae3a77 1 1 #! /usr/bin/python 2 2 3 from aubio.bench.node import *4 3 from aubio.tasks import * 5 4 … … 10 9 def run_bench(self,modes=['dual'],thresholds=[0.5]): 11 10 from os.path import dirname,basename 12 self.modes = modes13 11 self.thresholds = thresholds 14 12 self.pretty_titles() 15 for mode in self.modes: 13 14 for mode in modes: 16 15 d = [] 17 outplot = "_-_".join(("delay",mode,18 basename(self.datadir) ))19 20 16 self.params.onsetmode = mode 17 self.params.localmin = True 18 self.params.delay = 1. 21 19 self.params.threshold = thresholds[0] 22 20 # 23 21 self.params.localmin = False 24 22 self.params.delay = 0. 25 26 self.dir_exec() 27 self.dir_eval() 28 self.pretty_print() 23 self.dir_eval_print() 29 24 self.plotdiffs(d,plottitle="Causal") 30 25 # 31 26 self.params.localmin = True 32 27 self.params.delay = 0. 33 self.dir_exec() 34 self.dir_eval() 35 self.pretty_print() 28 self.dir_eval_print() 36 29 self.plotdiffs(d,plottitle="Local min") 37 30 38 31 self.params.localmin = False 39 32 self.params.delay = 6. 40 self.dir_exec() 41 self.dir_eval() 42 self.pretty_print() 33 self.dir_eval_print() 43 34 self.plotdiffs(d,plottitle="Fixed delay") 44 35 45 self.plotplotdiffs(d) 46 self.plotplotdiffs(d,outplot=outplot,extension="png") 47 self.plotplotdiffs(d,outplot=outplot,extension="ps") 48 self.plotplotdiffs(d,outplot=outplot,extension="svg") 49 36 #self.plotplotdiffs(d) 37 outplot = "_-_".join(("delay",mode,basename(self.datadir) )) 38 for ext in ("png","svg","ps"): 39 self.plotplotdiffs(d,outplot=outplot,extension=ext) 50 40 51 41 if __name__ == "__main__": … … 53 43 if len(sys.argv) > 1: datapath = sys.argv[1] 54 44 else: print "ERR: a path is required"; sys.exit(1) 55 modes = ['complex', 'energy', 'phase', ' specdiff', 'kl', 'mkl', 'dual']56 # modes = [ 'complex']57 thresholds = [ 0.5]58 #thresholds = [1.5]45 modes = ['complex', 'energy', 'phase', 'hfc', 'specdiff', 'kl', 'mkl', 'dual'] 46 #thresholds = [ 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2] 47 #modes = [ 'hfc' ] 48 thresholds = [0.5] 59 49 60 50 #datapath = "%s%s" % (DATADIR,'/onset/DB/*/')
Note: See TracChangeset
for help on using the changeset viewer.