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

amplitude scaling for waveform plots #249

Open
carltape opened this issue Feb 6, 2024 · 1 comment
Open

amplitude scaling for waveform plots #249

carltape opened this issue Feb 6, 2024 · 1 comment

Comments

@carltape
Copy link
Member

carltape commented Feb 6, 2024

The default behavior to normalize waveforms using maximum_amplitude is good, since it preserves the relative amplitudes among waveforms, which is helpful for examining radiation patterns (e.g., some waveforms will be nodal for P and Rayleigh waves). However, if there are outliers with spurious huge amplitudes, then the "good" waveforms will be too tiny to see. (Using trace_amplitude or station_amplitude does not preserve the relative amplitudes.) Relevant code lines:
https://github.com/uafgeotools/mtuq/blob/master/mtuq%2Fgraphics%2Fwaveforms.py#L388-L401
Could we find an overall scaling that will exclude outliers? How about take the abs(max) for each station's set of windows (one value based on 2 P windows; one value based on 3 surf windows), then take the median of all of those (one for P, one for surf)? That would help with debugging, since the good waveforms would alway be properly scaled, and the bad waveforms would be huge. Thanks.

@rmodrak
Copy link
Member

rmodrak commented Feb 6, 2024

It sounds like the above approach is self-contained in the sense that the normalization factor for a given station is obtained using only the numeric trace data for that station? That would seem to make it somewhat simple to implement...

Maybe proceed by adding a new option normalize=='experimental' to the if-then block?

This may be something a UAF student/postdoc could implement, so that they could iterate with you to get the behavior exactly as desired?

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

2 participants