Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing different time shifts in Rayleigh and Love wave misfit evaluations and waveform plotting #272

Open
ammcpherson opened this issue Aug 22, 2024 · 12 comments

Comments

@ammcpherson
Copy link
Member

Good morning,

There are certain situations in which one might want to allow different time shifts for the different surface waves, e.g. +/- 5 seconds for Love, and +/- 20 seconds for Rayleigh. This is currently not possible in MTUQ without some significant workarounds, for both the misfit evaluation and to then make the waveform plots at the end.

I've attached figure showing the Love and Rayleigh wave time shifts for an event using 6 different velocity models. There are two stations for which one model has (apparently) anomalously large time shifts compared the rest of the stations and models, leading us to believe that these waves are experiencing cycle-skipping. The hope is then that by changing the allowable time shifts during the misfit evaluation, MTUQ would automatically correct the cycle-skipping without any manual corrections on behalf of the user.

Thanks
Screenshot 2024-08-22 at 09 54 36
Screenshot 2024-08-22 at 09 55 08

@carltape
Copy link
Member

Thanks, Amanda. Given that this issue is common to 6 different velocity models (and many earthquakes, as I understand), it's clear that this fix will impact many users, saving us from station- and event-specific fixes and enabling analysis of larger data sets (more events, stations, and velocity models).

@rmodrak
Copy link
Member

rmodrak commented Aug 22, 2024

Hi Amanda, Thanks for the clear description of this issue.

Agreed that having different allowable time shifts for Rayleigh and Love waves could help reduce manual adjustments. (Even then, some manual adjustment could still be necessary, but the overall effort could be reduced I think.)

@rmodrak
Copy link
Member

rmodrak commented Aug 22, 2024

I'd agree with Julien's suggestion: create separate misfit functions for Rayleigh and Love waves and invoke the grid_search separately with each one.  

I think this a good approach in many ways-- easier for the user, easier for the developer (probably also better as we start to speake about more sophisticated data covariance).

@rmodrak
Copy link
Member

rmodrak commented Aug 22, 2024

Modifying the misfit function to accept different allowable ranges is also possible, but given how heavily optimized and difficult to follow the underlying time shifts are already, I'd hesitate to try this.

@rmodrak
Copy link
Member

rmodrak commented Aug 22, 2024

I think that leaves only the question of how to update plot_waveforms(). I'd have to think about this a bit more...

@rmodrak
Copy link
Member

rmodrak commented Aug 22, 2024

@carltape Agreed, this whole discussion seems relevant to the region specific templates we were discussing

@rmodrak
Copy link
Member

rmodrak commented Aug 22, 2024

@carltape In terms of reducing manual adjustments, the feature request makes a difference for only 1 of 6 models? I imagine there are other cases it makes a bigger difference. Agreed +/-20 Rayleigh, +/-5 Love is common to all 6 models.

@ammcpherson
Copy link
Member Author

@rmodrak There are other events I have currently that the feature request would indeed make a bigger difference for. I chose this event because it is relatively clear what the proper allowable time shifts should be.

@rmodrak
Copy link
Member

rmodrak commented Aug 22, 2024

@ammcpherson Makes sense thanks

@rmodrak
Copy link
Member

rmodrak commented Aug 23, 2024

I wonder if a good approach would be just to introduce new functions with slightly different syntax?

    plot_waveforms3(
        filename, data_bw, data_rayleigh, data_love, synthetics_bw, synthetics_rayleigh, synthetics_love, ...)
    plot_data_greens3(
        filename, data_bw, data_rayleigh, data_love, greens_bw, greens_rayleigh, greens_love, 
        process_bw, proces_rayleigh, process_love, misfit_bw, misfit_rayleigh, misfit_love, ...)

Interested in Amanda's, Julien's, and others thoughts. apologies if I missed anything during Wednesday's call

@carltape
Copy link
Member

@thurinj what do you think about the plotting proposal from Ryan? I think if we can address the plotting, then Amanda can try out the proposed approach. I agree that we need the plotting to be correct, since that would be the standard way to detect whether cycle skipping is occurring. (Even if the underlying time shift calculation in the code is correct.) Thanks.

@thurinj
Copy link
Member

thurinj commented Aug 28, 2024

Hi @carltape, @rmodrak, @ammcpherson,

Adding this option would indeed solve part of the problem. But then we wouldn't have any option to plot Rayleigh and Love wave with different time shifts, without plotting the body waves. It's probably a good solution in the meantime, but it won't solve the plotting problem entirely.

I'll open a feature branch to give it a shot, and think of a way of just making our waveform plot more dynamic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants