PyLops / pylops

PyLops – A Linear-Operator Library for Python
https://pylops.readthedocs.io
GNU Lesser General Public License v3.0
428 stars 102 forks source link

Wavelet Variation #101

Closed santaniitr closed 5 years ago

santaniitr commented 5 years ago

Does "PoststackLinearModelling" operators, be able to handle "3D wavelet variation" to cope up with change in amplitude spectrum. If yes, can you please add a Tutorial.

Or is it in the list to be added in future ?

mrava87 commented 5 years ago

Hi, this is so far not possible, but it is definitely something that could be worth adding in future.

I think it may be easy to have depth-dependant wavelet and simply perform non-stationary convolution by means of matrix multiplication with a toepliz like matrix containing such a wavelet - I am not aware of any fast method for computing non-stationary convolution but if you have any suggest is more than welcome.

If you mean really 3D wavelet that is a different problem. We have the ConvolveND operator that already allows for convolution/deconvolution with multi-dimensional compact filters but the engineering of how you estimate such wavelets at some control points and how you interpolate in the inversion grid is so far beyond the scope of this library - and perhaps better to develop it independently using pylops as core engine.

santaniitr commented 5 years ago

Thanks for the explanation. Probably a real 3D wavelet is not required.

Maybe the frequency variation can be taken care of by a stretch operator/modifier on the single estimated wavelet. Where default identity operator is constructed by any suitable frequency variation attribute of the data ex. dominant/central/peak freq or bandwidth etc and can be left to the user.

mrava87 commented 5 years ago

Perfect :)

I agree, this should be left out and to the user, once the user has a wavelet + time-dependent stretch factor or even a set of wavelets for each time step, then we can implement a non-stationary Convolve operator and have it in PoststackLinearModelling if the wavelet provided is 2dimensional array instead of 1d.

Will try to do some tests in near future and point you to where I do it in my fork. If you have any idea or try something out yourself do the same and then once we think things work as expected we can merge it to the master

mrava87 commented 5 years ago

Hi again, I added some new functionalities in the last PR to deal with non-stationary filters/wavelets.

Take a look at this tutorial https://pylops.readthedocs.io/en/latest/tutorials/poststack.html#sphx-glr-tutorials-poststack-py (there is now a second 1d example using a non-stationary wavelet), and more specifically to this for the actual implementation of a non-stationary filter https://pylops.readthedocs.io/en/latest/api/generated/pylops.utils.signalprocessing.nonstationary_convmtx.html#pylops.utils.signalprocessing.nonstationary_convmtx and here https://pylops.readthedocs.io/en/latest/api/generated/pylops.avo.poststack.PoststackLinearModelling.html#pylops.avo.poststack.PoststackLinearModelling

Is this what you had in mind?

santaniitr commented 5 years ago

This is amazing : +1:

You have done is very nicely. Thanks. I will do some testing on real data. I am sure it will be very useful in long term too.