Re: FFT's and PVwave [message #5099] |
Tue, 19 September 1995 00:00 |
todd
Messages: 25 Registered: February 1994
|
Junior Member |
|
|
In article <8B15497.1420000119.uuout@ptonline.com>, allen.ritcey@ptonline.com (ALLEN RITCEY) writes:
|> Having just found this group I have to ask, what is the difference
|> between IDL-pvwave and pvwave advantage....
|>
|> Putting that aside I have a question and i hope it is appropriate for
|> this news group.
|>
|> I have been tasked with putting together a quick routine that can
|> perform an FFT on a single (voltage) input. Til today i didn't know
|> what an FFT was and still am not much more informed than yesterday....
|> Anyway, the task is to read an input ... perform the FFT, isolate the
|> fundemental voltage, subtract this out and perform and inverse FFT.
|>
|> I have found the module FFTcomp to do the first part of the work but any
|> suggestions on the rest ... WAVE is somewhat new to me and I am not sure
|> how to approach this.... I turned to wave over fortran cuz it looked
|> like the shortest route and it was available on the system..
|>
|> thanks
|>
|> al
The packages referred to in idl-pvwave are the command languages
(which are related). PV-wave Advantage is another beast, but may
(I'm not certain about this) contain the PV-Wave command language
(CL) as a subset.
Anyway what you get back from Advantage's FFTcomp is pretty much the
same thing you'd get back from the Wave CL or IDL FFT function.
For a 1D real array, the DC component will be in element 0, the dominant
frequency would then be the index of the maximum value of the array.
This is really the wave number, which can be converted to frequency
if you need the actual value.
You should plot the array you get back, and find the largest peak.
or do in Wave CL:
array=fft(data,-1) ;do the transform to freq. domain
plot,array ;plot the data in frequency domain
print,where(array eq max(array) ) ;find wave number of dominante freq
array(where(array eq max(array)))=0.0 ;remove this frequency from data
newdata=fft(array,1) ;transform back to time domain
I'm not sure if setting the max to zero and taking the inverse
FFT is the same as subtracting out the fundamental or not. You'll
need to read up on digital signal processing.
--
Todd Ratcliff | (310)825-3118
UCLA Geodynamics Research Group | todd@artemis.ess.ucla.edu
Dept. of Earth & Space Sciences | http://artemis.ess.ucla.edu/~todd/home.html
|
|
|