[Scipy-tickets] [SciPy] #386: signal.remez doesn't have Hilbert transformer

SciPy Trac scipy-tickets@scipy....
Sat Aug 14 00:26:02 CDT 2010

#386: signal.remez doesn't have Hilbert transformer
 Reporter:  kumanna        |       Owner:  cdavid      
     Type:  enhancement    |      Status:  needs_review
 Priority:  normal         |   Milestone:  Unscheduled 
Component:  scipy.signal   |     Version:  0.5.2       
 Keywords:  remez hilbert  |  
Changes (by dirjud):

 * cc: dirjud@… (added)
  * status:  new => needs_review


 I need the 'hilbert' option as Matlab has it, and I was expecting a lot of
 work to implement it, but it was just a matter of editing the python to
 expose it. I have tested it and it works just as expected and just as
 Matlab. Rarely are things this easy.

 It is giving me an error when I try to attach the patch, so here it is:

 Index: scipy/signal/signaltools.py
 --- scipy/signal/signaltools.py (revision 6646)
 +++ scipy/signal/signaltools.py (working copy)
 @@ -514,6 +514,9 @@
      type --- The type of filter:
               'bandpass' : flat response in bands.
               'differentiator' : frequency proportional response in bands.
 +             'hilbert' : filter with odd symmetry, that is, type III
 +                         (for even order) or type IV (for odd order)
 +                         linear phase filters

    Outputs: (out,)

 @@ -523,9 +526,9 @@
      # Convert type
 -        tnum = {'bandpass':1, 'differentiator':2}[type]
 +        tnum = {'bandpass':1, 'differentiator':2, 'hilbert':3}[type]
      except KeyError:
 -        raise ValueError, "Type must be 'bandpass', or 'differentiator'"
 +        raise ValueError, "Type must be 'bandpass', 'differentiator', or

      # Convert weight
      if weight is None:

Ticket URL: <http://projects.scipy.org/scipy/ticket/386#comment:5>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list