Closed GB123185 closed 4 years ago
With nordic files the full seed id isn't stored, only the station and first and last characters of the channel name. Internally the template creation routines require a full matching seed id (network, station, location and channel) between the pick and the data in the stream. It would be worth checking that the data in the stream has the same seed id as the picks.
I often add the expected/known location code, network code and full channel code to the picks after I read nordic files to get around this. An alternative is to change the waveform metadata, but then you have to keep remembering to change this when using the templates.
Let me know if that turns out to be the issue, otherwise I will dig deeper tomorrow.
Hi Calum, That may very well be the issue here. Just to test if it is, I've made the following addition to my script to revise the Obspy Pick attributes:
metafile[0].picks[0].waveform_id.network_code='AU'
metafile[0].picks[0].waveform_id.location_code=''
metafile[0].picks[0].waveform_id.channel_code='BHZ'
metafile[0].picks[0].update
The terminal output then returns the following:
2020-02-05 00:23:19,305 eqcorrscan.core.template_gen INFO Working on channel ARMA.BHZ
2020-02-05 00:23:19,306 eqcorrscan.core.template_gen INFO Found Trace AU.ARMA..BHZ | 2018-01-24T02:27:15.995000Z - 2018-01-24T02:36:29.995000Z | 40.0 Hz, 22161 samples
I believe I can now store/save the template. I believe I'm on the right track! I just need to revise the remaining stations. I did have to change the channel code from 'BZ' to 'BHZ' for the code to work. Thanks for the help mate.
Cheers, Greg
Did you work this one out in the end? Do you think anything needs to be changed in the code, otherwise I will close this issue.
Hi Calum, Yes I was able to work it out. You can close the issue. Cheers, Greg
On Tue, Mar 31, 2020 at 1:54 PM Calum Chamberlain notifications@github.com wrote:
Did you work this one out in the end? Do you think anything needs to be changed in the code, otherwise I will close this issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eqcorrscan/EQcorrscan/issues/370#issuecomment-606367881, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOOU7W26AFZY75SFKTKMRGDRKFLM5ANCNFSM4KPRXDRQ .
Hi! Firstly, I'm quite enjoying learning about how to use this software. Outstanding work! Now, this is probably a pretty simple issue to resolve, but I'm struggling to determine why I am unable to generate a template that uses a Seisan S-file as the metafile input and a Seisan waveform as the input into an Obspy Stream object. I suspect that it may be an issue with the input S-file, but I'm unable to find what I may be missing in that file.
The simple template generation script is here:
The output is here, with some user Warnings removed (e.g., AIN column, :
There are definitely waveforms being read in, since when I print the stream out, I can see the list of Traces. I can also confirm that Pick information from the Seisan file is also being read in, since, e.g., the following command returns:
>>> print(wav[0].picks[5])
I've attached the S-file for your reference as well. I'm just curious why I'm unable to generate a Template? It's most likely a very simple error in my script or in the S-file that I've completely overlooked, but I would greatly appreciate another set of eyes!
Thanks for your help. Greg B. 24-0227-16L .S201801.txt