Ignore:
Timestamp:
Feb 23, 2006, 3:23:30 AM (18 years ago)
Author:
Paul Brossier <piem@altern.org>
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
Message:

update onset bench
update onset bench

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/test/bench/onset/bench-delay

    ra12563ea r6ae3a77  
    11#! /usr/bin/python
    22
    3 from aubio.bench.node import *
    43from aubio.tasks import *
    54
     
    109        def run_bench(self,modes=['dual'],thresholds=[0.5]):
    1110                from os.path import dirname,basename
    12                 self.modes = modes
    1311                self.thresholds = thresholds
    1412                self.pretty_titles()
    15                 for mode in self.modes:
     13
     14                for mode in modes:
    1615                        d = []
    17                         outplot = "_-_".join(("delay",mode,
    18                                 basename(self.datadir) ))
    19 
    2016                        self.params.onsetmode = mode
     17                        self.params.localmin = True
     18                        self.params.delay = 1.
    2119                        self.params.threshold = thresholds[0]
    22 
     20                        #
    2321                        self.params.localmin = False
    2422                        self.params.delay = 0.
    25 
    26                         self.dir_exec()
    27                         self.dir_eval()
    28                         self.pretty_print()
     23                        self.dir_eval_print()
    2924                        self.plotdiffs(d,plottitle="Causal")
    30 
     25                        #
    3126                        self.params.localmin = True
    3227                        self.params.delay = 0.
    33                         self.dir_exec()
    34                         self.dir_eval()
    35                         self.pretty_print()
     28                        self.dir_eval_print()
    3629                        self.plotdiffs(d,plottitle="Local min")
    3730
    3831                        self.params.localmin = False
    3932                        self.params.delay = 6.
    40                         self.dir_exec()
    41                         self.dir_eval()
    42                         self.pretty_print()
     33                        self.dir_eval_print()
    4334                        self.plotdiffs(d,plottitle="Fixed delay")
    4435
    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)
    5040
    5141if __name__ == "__main__":
     
    5343        if len(sys.argv) > 1: datapath = sys.argv[1]
    5444        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]
    5949
    6050        #datapath = "%s%s" % (DATADIR,'/onset/DB/*/')
Note: See TracChangeset for help on using the changeset viewer.