Code Monkey home page Code Monkey logo

Comments (17)

sstaehler avatar sstaehler commented on August 31, 2024

@martinvandriel Is that still an issue?

from mc_kernel.

martinvandriel avatar martinvandriel commented on August 31, 2024

no idea. Do we have stfs in the kerner now?

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

no

from mc_kernel.

martinvandriel avatar martinvandriel commented on August 31, 2024

don't we need them?

from mc_kernel.

auerl avatar auerl commented on August 31, 2024

Optimally, we should convolve the fwd field with the stf (if available), but i wonder if it would result in a huge difference in the kernel? Probably not the highest priority, I would guess.

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

I hope I fixed the STF deconvolution in 3dcf9df
On convolving with the "real" STF: It's trivial, if we have the "real" STF with the correct sampling rate. If not, should we use resample_stf (https://github.com/sstaehler/kerner/blob/master/source.f90#L216)?
How does that even work? It's just a linear interpolation, isn't it?

from mc_kernel.

martinvandriel avatar martinvandriel commented on August 31, 2024

True. So many lines for a linear interpolation, great. If the sampling is far enough from Nyquist, this should be fine. Otherwise, I would consider using the lanczos from intstaseis:
https://github.com/krischer/instaseis/blob/master/instaseis/lanczos.py

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

Yes, I just discovered that the core of the lanczos interpolation in instaseis is in Fortran anyway and I'm moving that to the Kerner.

Is there a default file format for STFs in instaseis?

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

Started to work on it 0b69d9b

I would remove the part where multiple sources are possible. Or do we want to have kernels for finite faults?

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

Okay, STF deconvolution and reconvolution is basically done and I can reproduce Instaseis seismograms in the Kerner.
For the user, two big changes

  • he/she has to supply a file with an event STF all the time
  • the filters and the STF have to be chosen more carefully. The STF deconvolution can easily be unstable if neither filter nor the event STF decrease steeply enough towards higher frequencies. For Karin's Gabor filters, I would suggest that their central period has to be at least 2 times the mesh period, since they are extremely broad.

from mc_kernel.

martinvandriel avatar martinvandriel commented on August 31, 2024

Why not use an additional lowpassfilter to ensure stability? Just the same one for all kernels. Needs to be applied in the measurement as well of course. Butterworth filters should be readily available, so this seems to be mostly an additional input parameter...

from mc_kernel.

kasra-hosseini avatar kasra-hosseini commented on August 31, 2024

From the measurement point of view, here are the filtering steps:

  1. Bandpass filter between 0.012 - 3 Hz...in fact, the corner frequencies are 0.008, 0.012, 3, 4, so it is one between 0.012 and 3 ---> this will be applied to the real data
  2. re-sampling to 10Hz, since we already applied the filter in the first stage, no aliasing is expected.
  3. Convolution with the STF
  4. Gabor filters on both real and synthetic waveforms, and then doing the measurement.

I know that it is clear, just to summarize what we do in the measurement.

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

@martinvandriel
Yes, I actually implemented this additional order 16 lowpass filter in
https://github.com/sstaehler/kerner/blob/master/filtering.f90#L298
and most of the times it solves the problem. The combined filter response is written out, so that it can be used to do the measurements accordingly.
Problem is that even that is sometimes not enough, since the spectrum of the Gaussian STF in AxiSEM falls with exp(-f^2), while the Butterworth is only f^(-2*n). Anyway, in these cases, the code crashes and the user has to do something.

@kasra-hosseini
So, what we would need to add in MCKernel is the highpass filter at 100s,
What we would need to change in the measurements is that we replace the Gabor by Gabor+order-16-Butterworth at the Mesh period.

from mc_kernel.

martinvandriel avatar martinvandriel commented on August 31, 2024

since the spectrum of the Gaussian STF in AxiSEM falls with exp(-f^2)

so do the Gabor filters...

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

Actually with exp( -(ln(f-fc))^2 )
That might be the problem, they are incredibly wide on the high frequency side

from mc_kernel.

martinvandriel avatar martinvandriel commented on August 31, 2024

What seems to work in instaseis is to deconvolve the gaussian from axisem and reconvolve with the response of a butterworth lowpass (this is how I did the benchmarks in the instaseis paper). So I don't see, why it would be unstable in the kerner case you discribe above, which should be more stable by having an additional bandlimited stf and additional Gabor filter.

from mc_kernel.

sstaehler avatar sstaehler commented on August 31, 2024

Okay, I'll check that.

from mc_kernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.