Obspy doesn't provide a comfortable way to create and directly plot FFT's from sources (ex:SAC files, which contains seismic data we use ). However, numpy does, and it is installed as an additional package when you install Obspy.
Commands for creating FFT's of an array (or list ) are very well listed out here. , along with sufficient description.
Combined with 'matplot.pyplot', we were able to Plot data along their FFT's.
There are few things to be kept in mind though :
- Detrend: numpy.fft transforms only discrete data in array form. However data in SAC files needs to converted in an list. One way to do so use detrend feature of numpy.
- Obspy Plotting presents only very limited options for plotting, matplotlib, however opens a new dimension. You just have to provide two lists, sets of 'x' and 'y' points.
- Windowing: As explained by Prof. Bunn, the transform of data would probably have DC component, contributing to edge effects. This can be reduced by applying transformation windows. One can choose from several windows to apply to treat this effect, depending upon requirenments.
- Special attention has to be paid in selecting number of points in your FFT plots, which closely based on points in data and Sampling Rate.
- Using lograthmic scale may help in distinguishing peaks. However, this depends mostly on number of points you have for your FFT, which in my case, if low displayed imporper graphs.
Piece Wise Frequency Transforms, Anza '13 (S0153) , showing problems due to logarithmic scale
Piece Wise 512-point FFT for same event(& station), notice disturbances in frequency towards the end, including high freqeuncy disturbances |
Further on, we shall:
- Try to focus on creating plots for low frequency band, (0-10 Hz, which typically represents earthquake data). One challenge to this part is that not enough data sample points are present to create sensible graph within this frequency band, and plot looks like below.
- Also we may try to explain some of the high frequency disturbances during earthquake, which are otherwise absent. Prof. Bunn suspects this might be due location of the particular station.
- Another useful implementation of this system could be 'dynamic plotting' of data, with time, or dynamic frequency plot displaying live stream of data.
- Try to reduce noise in quite time data by using averaging out the non quake time data.
FFT zoomed in for 0-10 Hz, notice that straight lines in frequency distribution may indicate insufficient points in sample data. |
No comments:
Post a Comment