-
Notifications
You must be signed in to change notification settings - Fork 89
Description
I'm opening this issue with the intent to collect information and discuss a suitable implementation strategy. So this is very much Work in Progress and I would appreciate any input to add to the current restrictions, related features wishes, and proposed implementation strategies.
Current restrictions
The current implementation of templates, detection, cross-correlation, and lag-calc has some restrictions including:
- all template channels need the same length
- P-picks are expected on Z-channel and S-picks on horizontal channels (some methods care only a bit about this, while for other methods it's fundamental
- only one P- and one S-phase can be picked right now
- all channels are weighted equally in cross-correlation
- computing
relative_magnitudesdoesn't work right now because templates don't contain enough information to compute pre-event noise (see Party.relative_magnitude or Party.lag_calc(relative_magnitude=True) broken in 0.4.x #385) match_filterandlag_calcalways use all available channels of a template, without options for discrimination- once a template is created,
match_filterandlag_calcuse the full length of the traces in the template for correlation
Is your feature request related to a problem? Please describe.
It would be nice if we could support the following functionality in the future:
- define templates with channels of "arbitrary" length
- allow templates where P-picks and S-picks can appear on any channel (especially important when using single-component data)
- support handling of additional phases like Pg, Pn etc. in template-creation, correlation, and lag-calc picking. (may want support for any kind of phase, e.g., teleseismic?)
- allow arbitrary weighting of the template channels, and provide some standard ways to weight (e.g., equal weights; weighted by SNR)
- store metadata like SNR in the template class
- providing templates to
match_filterandlag_calcshould come with options to let e.g.match_filteronly run on a subset of the channels, while keeping all channels in the template (e.g., to detect with a subset for computational efficiency, but pick with all available channels) - providing templates to
match_filterandlag_calcshould come with an option to use only a fraction of the channels for correlation (e.g., to detect with the full seismogram, but pick with only the phase onset)
Describe the solution you'd like
For now, I'm opening this issue to collect a list of challenges, missing features, and requirements that would all be related, and hopefully addressed, in an update to the template class. I suspect that templates will need to contain some more metadata for us to allow the features described above. I think it would be desirable if we can get away with only one major upgrade to the template class so that we break compatibility with old templates only during one version update.
Describe alternatives you've considered
None yet - but this issue will likely evolve and I'm planning to fill these in here!
Updates:
2021-03-15: first version
2021-03-17: added points 6 & 7
Relevant previous issues: #169