eqcorrscan / EQcorrscan

Earthquake detection and analysis in Python.
https://eqcorrscan.readthedocs.io/en/latest/
Other
166 stars 86 forks source link

[HELP] [QUESTION] Need to include P picks on horizontal channels in template #427

Closed savardge closed 4 years ago

savardge commented 4 years ago

What do you need help with?

The template_gen method says:

By convention templates are generated with P-phases on the vertical channel and S-phases on the horizontal channels, normal seismograph naming conventions are assumed, where Z denotes vertical and N, E, R, T, 1 and 2 denote horizontal channels, either oriented or not. To this end, we will only use Z channels if they have a P-pick, and will use one or other horizontal channels only if there is an S-pick on it.

My problem: I have data from geophones in a downhole well where P-waves arrive at more horizontal incidence such that P-waves are only visible on horizontal channels. Is the convention enforced within the match_filter module such that if I create my own template generation routine to include P picks on horizontal channels, I will run in trouble down the line when I use the match_filter and lag_calc modules?

Provide an example so that we can reproduce your problem

I can send an example figure by email if needed.

What help would you like?

I want to verify if a custom template with P picks on horizontal channels will cause trouble within the match_filter module or other modules. Having an option to use or not the convention currently enforced in template_gen would make the package easier to use with data from downhole monitoring wells.

What is your setup? (please complete the following information):**

calum-chamberlain commented 4 years ago

Hi @savardge, thanks for getting in touch. To briefly answer your questions:

  1. I think you will be fine with matched filtering with a custom template. The matched filter doesn't care about what channels it is given and will just correlate whatever you give it.
  2. Lag-calc does care, and will pick P on vertical channels and S on horizontal, but you can specify what those channels are (check out the lag-calc docs, sorry for not linking, I'm on my phone) to hack around this.
  3. I agree, It would be good to have the option to specify what channels you want for what in template gen. It would be great if when you make your custom templates you could use and edit the _template_gen function to add this ability and make a pull request?

@cjhopp might be interested in this feature as well with his interesting borehole setup.

savardge commented 4 years ago

Thanks @calum-chamberlain for the quick feedback! I'll look into making a pull request.

Another somewhat related question: For surface geophones, waveforms tend to be longer than on the downhole ones. It can be sometimes tricky to choose a single waveform length good for both P and S especially if S-P time is very short on downhole geophones. Would specifying a variable length across traces within a template be also ok with the match_filter and lag_calc routines? It's a feature I'd look into adding too.

calum-chamberlain commented 4 years ago

Also a good question - having a single length is a limitation of the current code. You can't use variable lengths at the moment unfortunately. It is something I want to add, but haven't had time/enough need to add it. Ideally I would want to add weighting at the same time to ensure that correlations are not unfairly biased by short waveforms on some channels. Adding this would require changes to the correlation, lag-calc, match-filter and template generation routines, so is quite a bit of work. Nevertheless this would be great to have. Sorry that it isn't incorporated yet!

If variable lengths on different channels is something you really need and don't have the time to make those changes (unfortunately there is no guarantee that I will make it round to adding this any time soon) then you might want to look at FastMatchedFilter for template-matching at-least.

calum-chamberlain commented 4 years ago

I'm going to close this because I think it is answered - feel free to re-open it if you don't think we are done with this!

If you do make a PR with that channel specification addition please link back to this issue when you open it.