Thanks! Ill try on Thursday. Hopefully Ill find the problematic data.<div><br></div><div>Cheers<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 14, 2018, 16:24 Tom Eulenfeld <<a href="mailto:tom.eulenfeld@uni-jena.de">tom.eulenfeld@uni-jena.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Blaz, I committed a more verbose exception.<br>
You can try the dev version of Yam, e.g.<br>
<br>
conda uninstall yam<br>
pip install <a href="https://github.com/trichter/yam/archive/master.zip" rel="noreferrer" target="_blank">https://github.com/trichter/yam/archive/master.zip</a><br>
<br>
Cheers,<br>
Tom<br>
<br>
<br>
<br>
On 14.08.2018 15:12, Tom Eulenfeld wrote:<br>
> What would be he desired behavior? Print more information and raise an <br>
> exception. Or just log the exception and continue with the next <br>
> iteration. I tend to implement the first option.<br>
> <br>
> But there is no hurry, because I found the --pdb option which I <br>
> implemented (but forgot about).<br>
> You can find out the time yourself by starting<br>
> <br>
> yam --pdb correlate -n1 1<br>
> <br>
> and then inspect stream1[0].id and stream1[0].stats.endtime<br>
> (or stream2[0].id and stream2[0].stats.endtime)<br>
> when the error occurs.<br>
> <br>
> When I think more about it, it might be a problem that I used the <br>
> endtime and not some time between starttime and endtime. (still assuming <br>
> there is some kind of gap in the inventory)<br>
> <br>
> Cheers,<br>
> Tom<br>
> <br>
> <br>
> <br>
> On 14.08.2018 13:11, Blaž Vičič wrote:<br>
>> I doubt this is the problem of inventory... The miniseeds were <br>
>> pre-procesed and I removed the response using obspy for all the files <br>
>> then used them as an input to yam. staxml files in yam are the same i <br>
>> used for the removal.<br>
>><br>
>> thanks<br>
>><br>
>> On Tue, 14 Aug 2018 at 12:36 Tom Eulenfeld <<a href="mailto:tom.eulenfeld@uni-jena.de" target="_blank">tom.eulenfeld@uni-jena.de</a> <br>
>> <mailto:<a href="mailto:tom.eulenfeld@uni-jena.de" target="_blank">tom.eulenfeld@uni-jena.de</a>>> wrote:<br>
>><br>
>>     Hi Blaz,<br>
>><br>
>>     if the metadata in the miniseed is correct, maybe it is a problem <br>
>> with<br>
>>     the inventory information? There could be a gap inside the inventory<br>
>>     when the station was moved or maintained? Could also be a bug in <br>
>> obspy.<br>
>><br>
>>     I will add some code to catch the exception and display a more<br>
>>     meaningful log message.<br>
>><br>
>>     Cheers,<br>
>>     Tom<br>
>><br>
>><br>
>><br>
>>     On 14.08.2018 07:30, Blaž Vičič wrote:<br>
>>      > Hello again.<br>
>>      > Another day, another problem.<br>
>>      ><br>
>>      > I am trying to process few years of data for a set of stations. I<br>
>>      > already removed the instrumental response and downsampled the<br>
>>     data. The<br>
>>      > error I get is this one:<br>
>>      ><br>
>>      > (obspy) pb-vicic:proc_2 bvicic$ yam correlate 1<br>
>>      ><br>
>>      ><br>
>>     <br>
>> 78%|██████████████████████████████████████████████████████████████████████████████████████████▊ <br>
>><br>
>><br>
>>      > | 2572/3287<br>
>>     [5:37:02<1:33:41,7.86s/it]multiprocessing.pool.RemoteTraceback:<br>
>>      ><br>
>>      > """<br>
>>      ><br>
>>      > Traceback (most recent call last):<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/multiprocessing/pool.py", <br>
>><br>
>><br>
>>      > line 119, in worker<br>
>>      ><br>
>>      > result = (True, func(*args, **kwds))<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/yam/correlate.py", <br>
>><br>
>><br>
>>      > line 569, in correlate<br>
>>      ><br>
>>      > stream2[0].id, datetime=stream2[0].stats.endtime)<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/obspy/core/inventory/inventory.py", <br>
>><br>
>><br>
>>      > line 430, in get_coordinates<br>
>>      ><br>
>>      > metadata = self.get_channel_metadata(seed_id, datetime)<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/obspy/core/inventory/inventory.py", <br>
>><br>
>><br>
>>      > line 406, in get_channel_metadata<br>
>>      ><br>
>>      > raise Exception(msg)<br>
>>      ><br>
>>      > Exception: No matching channel metadata found.<br>
>>      ><br>
>>      > """<br>
>>      ><br>
>>      ><br>
>>      > The above exception was the direct cause of the following <br>
>> exception:<br>
>>      ><br>
>>      ><br>
>>      > Traceback (most recent call last):<br>
>>      ><br>
>>      > File "/Users/bvicic/anaconda3/envs/obspy/bin/yam", line 11, in<br>
>>     <module><br>
>>      ><br>
>>      > sys.exit(run_cmdline())<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/yam/main.py", <br>
>><br>
>><br>
>>      > line 388, in run_cmdline<br>
>>      ><br>
>>      > run(**args)<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/yam/main.py", <br>
>><br>
>><br>
>>      > line 147, in run<br>
>>      ><br>
>>      > run2(command, **args)<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/yam/main.py", <br>
>><br>
>><br>
>>      > line 211, in run2<br>
>>      ><br>
>>      > yam.commands.start_correlate(io, **args)<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/yam/commands.py", <br>
>><br>
>><br>
>>      > line 101, in start_correlate<br>
>>      ><br>
>>      > total=len(tasks)):<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/site-packages/tqdm/_tqdm.py", <br>
>><br>
>><br>
>>      > line 930, in __iter__<br>
>>      ><br>
>>      > for obj in iterable:<br>
>>      ><br>
>>      > File<br>
>>      ><br>
>>     <br>
>> "/Users/bvicic/anaconda3/envs/obspy/lib/python3.6/multiprocessing/pool.py", <br>
>><br>
>><br>
>>      > line 735, in next<br>
>>      ><br>
>>      > raise value<br>
>>      ><br>
>>      > Exception: No matching channel metadata found.<br>
>>      ><br>
>>      ><br>
>>      > In the first run I did, the error happened somewhere at the<br>
>>     beginning<br>
>>      > (iteration 200/3000+) so I checked if maybe my miniseeds have <br>
>> wrong<br>
>>      > sta/chan inside. But they are all what they should be. I even<br>
>>     forced the<br>
>>      > tr.stats.station/chan to be exactly what I wanted. But the error<br>
>>      > happened again. So I removed the first year of data, but now the<br>
>>     error<br>
>>      > happened again somewhere later in the dataset. Any idea what<br>
>>     could be<br>
>>      > wrong or how to go past this? It would be useful if I would <br>
>> know in<br>
>>      > which miniseeds to look for the problem.<br>
>>      ><br>
>>      > Cheers<br>
>>      > Blaz<br>
>>      ><br>
>>      ><br>
>>      > _______________________________________________<br>
>>      > seistools mailing list<br>
>>      > <a href="mailto:seistools@listserv.uni-jena.de" target="_blank">seistools@listserv.uni-jena.de</a><br>
>>     <mailto:<a href="mailto:seistools@listserv.uni-jena.de" target="_blank">seistools@listserv.uni-jena.de</a>><br>
>>      > <a href="https://lserv.uni-jena.de/mailman/listinfo/seistools" rel="noreferrer" target="_blank">https://lserv.uni-jena.de/mailman/listinfo/seistools</a><br>
>>      ><br>
>>     _______________________________________________<br>
>>     seistools mailing list<br>
>>     <a href="mailto:seistools@listserv.uni-jena.de" target="_blank">seistools@listserv.uni-jena.de</a> <br>
>> <mailto:<a href="mailto:seistools@listserv.uni-jena.de" target="_blank">seistools@listserv.uni-jena.de</a>><br>
>>     <a href="https://lserv.uni-jena.de/mailman/listinfo/seistools" rel="noreferrer" target="_blank">https://lserv.uni-jena.de/mailman/listinfo/seistools</a><br>
>><br>
> _______________________________________________<br>
> seistools mailing list<br>
> <a href="mailto:seistools@listserv.uni-jena.de" target="_blank">seistools@listserv.uni-jena.de</a><br>
> <a href="https://lserv.uni-jena.de/mailman/listinfo/seistools" rel="noreferrer" target="_blank">https://lserv.uni-jena.de/mailman/listinfo/seistools</a><br>
_______________________________________________<br>
seistools mailing list<br>
<a href="mailto:seistools@listserv.uni-jena.de" target="_blank">seistools@listserv.uni-jena.de</a><br>
<a href="https://lserv.uni-jena.de/mailman/listinfo/seistools" rel="noreferrer" target="_blank">https://lserv.uni-jena.de/mailman/listinfo/seistools</a><br>
</blockquote></div></div>