Support (#5) - writing data (#9) - Message List
Hi Users,
First of all thankyou very much for replies. I am a new user so facing alot of problems. I have a querry, Is there any way to write output data of figure of spectrum in SHM. So that I can plot them outside using GMT.
Or is this can be done in sh using spectrum command? Then what are the commands to write them in xy ascii format to plot the data in GMT, in log scale.
with regards.
-
Message #14
Dear Arun,
using SH and the SPECTROGRAM command, you can write out the spectrogram data to a file.
In order to use it with GMT this file has to be reformatted. psxy needs always a data pair (see psxy man page).
To achieve this, remove header lines of the SPECTROGRAM output file and simply add a leading column, which is incremented by the chosen delta value.
You can use any spreadsheet program or an awk command like
awk 'BEGIN {delta=0.5; cnt=0} {print cnt, $1; cnt+=delta}' OUT.DATI hope, I understand your issue correctly. If not, please reply here.
Marcus
05/24/09 10:18:34-
Message #15
Dear Marcus, Thankyou for your prompt reply.
My problem is simple. I want to find the fft of a signal like Lg phase and tried to find out its spectra, and in next step I want to select some moise of same time window and also want to compute spectra of noise. After that, I want to find sepctral ratio of these two.
Now If I am using SHM, there spectrum is coming in a given frequency range like -2.0 to 2.0Hz in log scale. While using SH, it is coming very smooth and not the same as in spectrum window of SHM. I am not understanding the difference between these two.
"In a simple way I want to produce same figure using SH as it is coming in SHM spectrum window"
Can you help me out? Hope you will understand my question. This whole excersize is for Lg wave attenuation studies.
with reagrds Arun
arun05/24/09 16:40:00-
Message #16
Just for clarification: Do we talk about spectra or spectrogram?
Marcus
05/25/09 18:13:37-
Message #17
Dear marcus;
Suppose there is a signal of 100sec. shift is -20s.
<---Noise(20sec)--->0<---Signal (20sec)---->|----------60sec---------------|
I want fft(signal) and fft(noise) of same length.
After that I want to plot the amplitude of both. [With frequency (x axis)and amplitude (y axis)]. [Frequency scale can be set based on Nyquist rule].
Now with some moving average (smoothing of both the fft). I want to divide fft of both the signals.
resultplot= fft(signalA)/fft (noise).
Is it possible in seismic handler.
I am confused with spctra and spectrum(is there any difference?).
sorry for not able to describe properly.
with regards Arun
arun05/26/09 11:45:01-
Message #19
Hi Arun,
sorry for the late response, but I'm on vacation. :) Also Klaus seems to be overcrowded with work.
I'll take care of your question next week (by editing this post).
Update: Klaus will answer this quite complex topic. The issue can only be solved using SH command line version.
Marcus
06/17/09 17:06:16 -
Message #21
Dear Arun,
sorry for the late reply. SPECDIV is a command to divide the spectra of two traces. Input are two time domain (!) traces, output is in time domain as well. The computation is done in frequency domain, phase shifts are accounted for.
FFT in SH is a command to compute a power spectrum of a trace using the Numerical Recipes routine 'spctrm'. SPECTRUM in SH is a command to compute a spectrum using the maximum entropy method (fitting a rational expression in the freqeuncy domain), also taken from Numerical Recipes (routine 'memcof').
Both, FFT and SPECTRUM, will return a real-valued spectrum trace, phase information is lost. You may divide one by another using CONNECT (e.g. CONNECT DIV 1 2, see HELP CONNECT). There's no way back to a time domain trace since the phases are gone.
I hope this clarifies some problems.
Best regards Klaus
06/25/09 10:56:12
-
-
-
-