Ticket #265 (closed enhancement: fixed)
Differentiating/Integrating data
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | ObsPy library |
| Keywords: | velocity, displacement, integrate, differentiate | Cc: |
Description
Hello,
I need to integrate my velocity data into displacement and/or differentiate into acceleration. I found nothing on this in the tutorials or function documentations. How can this be done?
- Thanks
Attachments
Change History
comment:2 Changed 10 months ago by megies
This is a common task in processing strong motion data and is usually done by dividing your velocity spectrum in the Fourier domain with jw for integration or multiplying it by jw for differentiation. You can avoid amplifying noise by applying an appropriate bandpass filter (have a look at the noise spectra for the seismic station you are looking at) and you have to make sure that your input data has sufficient zero padding on either side. That's just what I remember from the top of my head. If you need more details have a look at some strong motion processing papers or let me know and I can give you some references.
Cheers, Yannik
comment:3 Changed 6 months ago by driel
In [2969/obspy]:
comment:11 Changed 6 months ago by driel
In [2970/obspy]:

In principle you should be able to differentiate/integrate by adjusting your PAZ dictionary before instrument correction/simulation.
Another possibility is using the available numpy/scipy routines.
You can differentiate by:
I had no need to integrate so far, you can have a look at http://www.scipy.org/doc/api_docs/SciPy.integrate.html. I only used scipy.integrate.cumtrapz at some point, it changes the sampling positions and reduces trace length by 1, though.
I agree that it should be added as methods on Stream/Trace.
Hope it helps, Tobias