eqcorrscan / EQcorrscan

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

[HELP] P and S picks in Lag_calc issue #434

Closed PerrochL closed 4 years ago

PerrochL commented 4 years ago

What do you need help with?

I am working with my own data. I managed to construct a Tribe and make detections. Now I want to use Lag_calc and everything runs smoothly, but the S and P picks are identical in the repicked_catalog. I already checked that my picks have different times in the catalog I use, and it's the case. For my catalog, I used the select.out file from seisan that I converted to a xml file.

(Also, another problem is that when constructing the tribe, I am unable to use an other option than swin=P_all. If I use any other option, it returns an empty tribe... So I guess that something must be going on with my initial catalog, but I don't know what)

Provide an example so that we can reproduce your problem

Attached is the script I run PerrochL_EQcorrscan.txt

What help would you like?

If possible get a corrected repicked_catalog...

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

calum-chamberlain commented 4 years ago

Hi, thanks for getting in touch. I suspect that this is related to how your picks are labelled in your catalog - both the issue with the lag-calc picks and template creation suggests this.

Would you be able to share your catalog, or (probably preferably first) a single event. It is possible that the pick.phase_hint is not set as EQcorrscan expects it.

Apologies if I am a little slow to respond, I'm in the field at the moment.

PerrochL commented 4 years ago

Hello, and thanks for the reply ! I attach here the catalog, which is the select.out file from seisan, before converting it to .xml. (Maybe it's something during this conversion that goes wrong) I already checked the phase_hint, but did not see anything special about it...

Thanks again to have a look !

catalog.txt

calum-chamberlain commented 4 years ago

Can you send the quakeml it looks like that is what you use to make the templates.

CJ Chamberlain, out of office


From: PerrochL notifications@github.com Sent: Wednesday, October 21, 2020 11:34:01 PM To: eqcorrscan/EQcorrscan EQcorrscan@noreply.github.com Cc: Calum Chamberlain calum.chamberlain@vuw.ac.nz; Comment comment@noreply.github.com Subject: Re: [eqcorrscan/EQcorrscan] [HELP] P and S picks in Lag_calc issue (#434)

Hello, and thanks for the reply ! I attach here the catalog, which is the select.out file from seisan, before converting it to .xml. (Maybe it's something during this conversion that goes wrong) I already checked the phase_hint, but did not see anything special about it...

Thanks again to have a look !

catalog.txthttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feqcorrscan%2FEQcorrscan%2Ffiles%2F5415228%2Fcatalog.txt&data=04%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7Cad7960f82ca545688cab08d875acd4f3%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637388732494418815%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HbDQCVkG1nhppKSNfJcqtFaf2cd2xeg5pIfhimjTMqQ%3D&reserved=0

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feqcorrscan%2FEQcorrscan%2Fissues%2F434%23issuecomment-713474469&data=04%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7Cad7960f82ca545688cab08d875acd4f3%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637388732494428809%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=B8f%2FarcywkvUiGitmGiwkhJeDjtwI24upSVG2xTv6A0%3D&reserved=0, or unsubscribehttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACTIM43JPWCEGOXMZ75LFKDSL22JTANCNFSM4SVZV6PA&data=04%7C01%7Ccalum.chamberlain%40vuw.ac.nz%7Cad7960f82ca545688cab08d875acd4f3%7Ccfe63e236951427e8683bb84dcf1d20c%7C0%7C0%7C637388732494438806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wcxxqXUgAH7ihvzQIbS%2BrDNYidN%2FvPgt%2BQg4yKfeFIY%3D&reserved=0.

PerrochL commented 4 years ago

Here it is

cat.zip

calum-chamberlain commented 4 years ago

Kia Ora, I just had a quick look, and while the phase hints look okay, the waveform_id looks odd - EQcorrscan checks for full channel codes, and doesn't cope with wildcards there. It looks like your conversion has added a ? wildcard as the second character of the pick.waveform_id.channel_code field.

Can you go through and change your pick.waveform_ids so that they match your data and try again. You will need to include the network_code, station_code, location_code and channel_code as they are in your data for your picks to match correctly to data.

This is one of the issues with using incomplete metadata unfortunately.

PerrochL commented 4 years ago

Yes, I saw this and changed the pick.waveform_id only after creating the tribe. This is why it didn't work!

Tried it directly on the xml catalog, before creating the tribe and now I get the correct picks ! Thank you very much for your time!

calum-chamberlain commented 4 years ago

All good.

Just out of curiosity, why did you not just read in the select.out file using Obspy? Is there something missing in Obspy's readng of Nordic files that you think should be added? Only asking because i helped write the Nordic IO for Obspy, and we are always keen for constructive feedback from users.

PerrochL commented 4 years ago

Because when I use directly the read_nordic I get an error... I managed to get around the error by marking the GAP line as a comment and then it works. But then information on the error is missing...and I don't want to do it everytime I select events in seisan.

But for some reason that I don't understand - I justed tried it to check what was the exact error I get - and it worked ! (it has been giving me an error for 3 months...)

calum-chamberlain commented 4 years ago

Interesting - we do continue to update things in the Nordic IO - maybe you updated your Obspy since you last ran into the error?

If you do run into any issues please do let us know at the Obspy repository.

I'm going to close this issue now.