Angel Pizarro on 11 Jul 2007 14:42:52 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] A note from Rob Nowak at Wisconsin on using FFTs from Ruby for simple DSP...

  • From: "Angel Pizarro" <>
  • To:
  • Subject: Re: [PhillyOnRails] A note from Rob Nowak at Wisconsin on using FFTs from Ruby for simple DSP...
  • Date: Wed, 11 Jul 2007 10:42:37 -0400
  • Dkim-signature: a=rsa-sha1; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=ZlUnQQRewtkgroNZbGcI+hA/jfE2DcrseEKcPkuN/kL87jHCTdxKBn8UF6t3sY3MN2degZjoc/3aXJidfh8lfmc4U/KTAwxTwWBtEbeBvM94R+a790xm7st5AYB1Y1anpxWJ+VKuzVy/V7GLSQtqj6JqSmEq3S9xVlwFyRssiZ8=
  • List-archive: <>
  • Reply-to:
  • Sender:

You could also use R, a free stat library and tool, to do FFT and wavelet filtering of data. I have used the RSRuby module to successfully filter and plot mass spectrometry data.


On 7/11/07, GREG NEELEY < > wrote:
July 11, 2007

Heard back from Rob Nowak, Ph.D, now at Wisconsin on using FFTW and Ruby to do some bandpass
filtering.  He came right to the point:

Dear Greg,

Your approach does sound reasonable.  You can obtain the impulse response
by taking the ifft of the boxcar design you specified below.  

Alternatively, if you have access to Matlab, it has built-in functions
for filter design.

Good luck!


> --0-559434080-1183994396=:53148
> Content-Type: text/plain; charset=ascii
> ----- Forwarded Message ----
> From: Gregory Neely <>
> To:
> Cc:
> Sent: Thursday, July 5, 2007 9:31:04 PM
> Subject: Question involving use of FFTs for convolution...
> July 5, 2007
> Dr. Nowak,
> Thank you for posting DSP modules to CONNEXIONS, and for letting us know you're now a Badger:-)
> I read your module on using FFTs for fast convolution.
> In 1984, I implemented Ken Waters' synththetic seismogram method from his well-known
> text, "Reflection Seismology", and I used an IFFT to obtain the time-domain response, once
> I had calculated the response for flat rock layer interfaces for a plane wave in 1-D in the frequency-domain.
> At that time, I was able to use SPEX (Seismic Processing Executive) software available on the
> Data General computer I was using to bandpass filter the synthetic data from about 20 to 80 Hz to
> get a synthetic seismogram that matched the character of the data we were obtaining from the real field survey.
> I'm re-implementing Waters' method, and porting
>  my original FORTRAN to Ruby and C.
> However, this time, I have no commercially available bandpass filter.
> After reading your article, I believe I can use FFTs to filter the synthetic data.
> What I would do, I believe, is to multiply the zero-padded FFT of the time-domain synthetic trace with the "rectangular" bandpass filter; a boxcar with a value of 1 between 20 and 80 Hz, and zero elsewhere, and
> then do the IFFT on this multiplication to get the filtered data back into the time-domain.  This would be the equivalent of convolution in the time domain of the filter with the time-domain synthetic trace.
> Is the above correct, or do I need to do something with the "edges" of the boxcar?  I thought I remembered something about a Hanning window to avoid "ringing", but I could be mistaken.
> Regards,
> Greg Neely, M.S., NREMT-B
> P.S.  If you don't have the time to answer this, I understand.  I'll try and get hold of E.
>  O. Brigham's book on
> FFTs and figure it out on my own:-)  I've got a reference on a Japanese Ruby interface to FFTW from MIT, if you want to try some Ruby work. I believe you'll produce more readable code than with using the C, Java, or C++.  I wrote software for twenty years.

To unsubscribe or change your settings, visit:

Angel Pizarro
Director, Bioinformatics Facility
Institute for Translational Medicine and Therapeutics
University of Pennsylvania
421 Curie Blvd.
Philadelphia, PA 19104-6160

P: 215-573-3736
F: 215-573-9004
To unsubscribe or change your settings, visit: