[MSNoise] [EXTERNAL] Re: database_tools.py query failing

Thomas Lecocq thomas.lecocq at oma.be
Wed May 14 16:08:10 UTC 2014


Yeah ! Glad to hear that !

I'm going to release those changes in a new tag by tomorrow !

Cheers from Brussels,

Thom

Le 14 May 2014 18:06:36, Abbott, Robert E a écrit :
> Success!
>
> Thanks,
> Rob
>
>
>
> +----------------------------+
> Robert E. Abbott, Ph.D.
> Sandia National Laboratories
> Geophysics Department MS 0750
> P.O. Box 5800
> Albuquerque, NM 87185-0750
> (505) 845-0266
> +----------------------------+
>
>
>
>
>
> On 5/14/14 9:55 AM, "Thomas Lecocq" <thomas.lecocq at oma.be> wrote:
>
>> Rob,
>>
>> the problem looks like your stations pairs are not sorted by net, then
>> code... In the jobs table this is OK, but it looks like the stack
>> procedure reverts station names (for a random reason)...
>>
>> normally, this bugfix corrects it:
>> https://github.com/ROBelgium/MSNoise/commit/0dca3cfe101c56f3ed8f6e53741285
>> 709ab58f30
>>
>>
>> Could you update to the latest version of MASTER and re-run your tests ?
>> https://github.com/ROBelgium/MSNoise/tree/master
>>
>> simply replace the .py files
>>
>> Thomas
>>
>> Le 14/05/2014 17:50, Abbott, Robert E a écrit :
>>> Thomas,
>>>
>>> I guess it is not the same exact problem I was having, but the result is
>>> the same: no updated days found.
>>>
>>> I put a print statement on line 458 of database_tools.
>>>
>>> quake2:MSNoise-1.2.4 reabbot$ python s04stack.py -r -m -i 100
>>> 2014-05-14 09:44:17,051 [INFO] Starting this program with: ref=True,
>>> mov=True, interval=100
>>> 2014-05-14 09:44:17,128 [INFO] *** Starting: REF Stack ***
>>> 2014-05-14 09:44:17,178 [DEBUG] Processing PA_R2C:PA_R2B-ZZ-1
>>> PA.R2C:PA.R2B
>>> 2014-05-14 09:44:17,181 [DEBUG] Found 000 updated days
>>> 2014-05-14 09:44:17,181 [DEBUG] Processing PA_R2C:PA_R2A-ZZ-1
>>> PA.R2C:PA.R2A
>>> 2014-05-14 09:44:17,182 [DEBUG] Found 000 updated days
>>> 2014-05-14 09:44:17,182 [DEBUG] Processing PA_R2C:PA_R1C-ZZ-1
>>> PA.R2C:PA.R1C
>>> 2014-05-14 09:44:17,184 [DEBUG] Found 000 updated days
>>> 2014-05-14 09:44:17,184 [DEBUG] Processing PA_R2C:PA_R1B-ZZ-1
>>> PA.R2C:PA.R1B
>>> EtcS(.
>>>
>>>
>>> I have attached the station and jobs table.
>>>
>>> Thanks,
>>> Rob
>>>
>>>
>>>
>>> +----------------------------+
>>> Robert E. Abbott, Ph.D.
>>> Sandia National Laboratories
>>> Geophysics Department MS 0750
>>> P.O. Box 5800
>>> Albuquerque, NM 87185-0750
>>> (505) 845-0266
>>> +----------------------------+
>>>
>>>
>>>
>>>
>>>
>>> On 5/14/14 9:36 AM, "Thomas Lecocq" <thomas.lecocq at oma.be> wrote:
>>>
>>>> Rob,
>>>>
>>>> The stack procedure should not send any "%", as the stack is done "per
>>>> pair"...
>>>>
>>>> could you:
>>>>
>>>> 1/ print the "pair" in the database_tools query
>>>> 2/ send a screenshot of your Station table
>>>>
>>>> Thanks
>>>>
>>>> Thomas
>>>>
>>>>
>>>> Le 14/05/2014 17:26, Abbott, Robert E a écrit :
>>>>> Thomas,
>>>>>
>>>>> I am still experiencing this same problem on 1.2.4. Mac OS X and
>>>>> MySQL.
>>>>>
>>>>> Thanks,
>>>>> Rob
>>>>>
>>>>>
>>>>> From: <Abbott>, Robert Abbott
>>>>> <reabbot at sandia.gov<mailto:reabbot at sandia.gov>>
>>>>> Date: Tuesday, April 1, 2014 2:51 PM
>>>>> To: Python Package for Monitoring Seismic Velocity Changes using
>>>>> Ambient Seismic Noise
>>>>> <msnoise at mailman-as.oma.be<mailto:msnoise at mailman-as.oma.be>>
>>>>> Subject: database_tools.py query failing
>>>>>
>>>>> Thomas,
>>>>>
>>>>> When trying to use s04stack.py, I keep getting the message of "Found
>>>>> 000 updated days" when it is not true. I have tried changing the "­i"
>>>>> interval to no avail (e.g. s04stack.py -m -r -i 100). I think I have
>>>>> traced the problem to the following queries in database_tools.py:
>>>>>
>>>>> if pair == '%':
>>>>>            days = session.query(Job).filter(Job.day >=
>>>>> date1).filter(Job.day <= date2).filter(Job.type ==
>>>>> type).filter(Job.lastmod >=
>>>>> lastmod).group_by(Job.day).order_by(Job.day).all()
>>>>>        else:
>>>>>            days = session.query(Job).filter(Job.pair ==
>>>>> pair).filter(Job.day >= date1).filter(Job.day <=
>>>>> date2).filter(Job.type
>>>>> == type).filter(Job.lastmod >=
>>>>> lastmod).group_by(Job.day).order_by(Job.day).all()
>>>>>
>>>>> The call from s04stack.py goes to the ELSE conditions, but days == [ ]
>>>>> after the query.
>>>>>
>>>>> If I manually set 'pair = '%' on the line before, then 'days' returns
>>>>> what looks to be correct. As the only difference in the two queries is
>>>>> filtering by Job.pair, maybe that is the problem. I am attaching a
>>>>> screenshot of my jobs table.  I manually changed 'lastmod' at one
>>>>> point
>>>>> to yesterday in case the ­i switch was not working correctly.
>>>>>
>>>>> I am on Mac OS X.
>>>>>
>>>>> Thanks,
>>>>> Rob
>>>>>
>>>>>
>>>>> +----------------------------+
>>>>> Robert E. Abbott, Ph.D.
>>>>> Sandia National Laboratories
>>>>> Geophysics Department MS 0750
>>>>> P.O. Box 5800
>>>>> Albuquerque, NM 87185-0750
>>>>> (505) 845-0266
>>>>> +----------------------------+
>>>>>
>>>>> +----------------------------+
>>>>> Robert E. Abbott, Ph.D.
>>>>> Sandia National Laboratories
>>>>> Geophysics Department MS 0750
>>>>> P.O. Box 5800
>>>>> Albuquerque, NM 87185-0750
>>>>> (505) 845-0266
>>>>> +----------------------------+
>>>>>
>>>>> _______________________________________________
>>>>> MSNoise mailing list
>>>>> MSNoise at mailman-as.oma.be
>>>>> http://mailman-as.oma.be/mailman/listinfo/msnoise
>>>> _______________________________________________
>>>> MSNoise mailing list
>>>> MSNoise at mailman-as.oma.be
>>>> http://mailman-as.oma.be/mailman/listinfo/msnoise
>>>
>>>
>>> _______________________________________________
>>> MSNoise mailing list
>>> MSNoise at mailman-as.oma.be
>>> http://mailman-as.oma.be/mailman/listinfo/msnoise
>>
>> _______________________________________________
>> MSNoise mailing list
>> MSNoise at mailman-as.oma.be
>> http://mailman-as.oma.be/mailman/listinfo/msnoise
>
> _______________________________________________
> MSNoise mailing list
> MSNoise at mailman-as.oma.be
> http://mailman-as.oma.be/mailman/listinfo/msnoise


More information about the MSNoise mailing list