Filtering with FFTs

# Filtering with FFTs - Fourier filterfft D fdplot = ListPlot...

This preview shows pages 1–4. Sign up to view the full content.

Filtering with Fourier Transforms A demonstration of how to remove high frequency noise from data by Fourier transforming, filtering, and Fourier transforming back. fakedata = Table @ Sin @ 0.03 tt D Sin @ 0.1 tt D + 0.5 Random @ Real, - 1, 1 D , 8 tt, 1, 1024, 1 <D ; dataplot = ListPlot @ fakedata, PlotJoined ® True, PlotLabel -> "sample data" D ; fullfft = Fourier @ fakedata D ; ListPlot @ Abs @ fullfft D , PlotJoined ® True, PlotRange -> All , PlotLabel ® "Fourier transform" D ; filterfn = Table @ Exp @ - jj^2 ± 8000 D + Exp @ - H jj - 1024 L ^2 ± 8000 D , 8 jj, 1, 1024 <D ; ListPlot @ Abs @ filterfn D , PlotJoined ® True, PlotRange -> All , PlotLabel ® "Filter function" D ; filterfft = filterfn fullft; ListPlot @ Abs @ filterfft D , PlotJoined ® True, PlotRange -> All , PlotLabel -> " Filtered Fourier transform" D ; filterback =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Fourier @ filterfft D ; fdplot = ListPlot @ Reverse @ Re @ filterback D , PlotJoined ® True, PlotRange ® All, PlotStyle ® RGBColor @ 1, 0, 0 D , PlotLabel ® " FFT of filtered FFT" D ; Show @ dataplot, fdplot D 200 400 600 800 1000-1.5-1-0.5 0.5 1 sample data 200 400 600 800 1000 2 4 6 8 Fourier transform 200 400 600 800 1000 0.2 0.4 0.6 0.8 1 Filter function 2 Filtering with FFTs.nb 200 400 600 800 1000 2 4 6 Filtered Fourier transform 200 400 600 800 1000-1-0.5 0.5 FFT of filtered FFT Filtering with FFTs.nb 3 200 400 600 800 1000-1.5-1-0.5 0.5 1 sample data ± Graphics ± 4 Filtering with FFTs.nb...
View Full Document

## This note was uploaded on 12/29/2011 for the course PHYSICS 375 taught by Professor Eno during the Spring '11 term at Maryland.

### Page1 / 4

Filtering with FFTs - Fourier filterfft D fdplot = ListPlot...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online