Hi All;
After upgrading my obspy, I am having problems with the Cross-correlation process:
msnoise compute_cc
/Users/ech/github/obspy/obspy/__init__.py:150: ObsPyDeprecationWarning: Module 'obspy.sac' is deprecated and will stop working with the next ObsPy version. Please import module 'obspy.io.sac' instead.
ObsPyDeprecationWarning)
/Users/ech/github/obspy/obspy/core/util/deprecation_helpers.py:55: ObsPyDeprecationWarning: Function 'obspy.core.util.gps2DistAzimuth' is deprecated and will stop working with the next ObsPy version. Please use 'obspy.geodetics.gps2dist_azimuth' instead.
ObsPyDeprecationWarning)
2015-10-13 19:48:12 [INFO] *** Starting: Compute CC ***
2015-10-13 19:48:12 [INFO] Will compute ZZ
2015-10-13 19:48:12 [INFO] New CC Job: 2012-01-01 (1 pairs with 2 stations)
2015-10-13 19:48:16 [INFO] Pre-Whitening Traces
2015-10-13 19:48:16 [INFO] Processing CC
Traceback (most recent call last):
File "/Users/ech/anaconda/bin/msnoise", line 9, in <module>
load_entry_point('msnoise==1.3', 'console_scripts', 'msnoise')()
File "/Users/ech/anaconda/lib/python2.7/site-packages/msnoise-1.3-py2.7.egg/msnoise/scripts/msnoise.py", line 392, in run
cli(obj={})
File "/Users/ech/anaconda/lib/python2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/Users/ech/anaconda/lib/python2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/Users/ech/anaconda/lib/python2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/ech/anaconda/lib/python2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/ech/anaconda/lib/python2.7/site-packages/click-3.3-py2.7.egg/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/Users/ech/anaconda/lib/python2.7/site-packages/msnoise-1.3-py2.7.egg/msnoise/scripts/msnoise.py", line 173, in compute_cc
main()
File "/Users/ech/anaconda/lib/python2.7/site-packages/msnoise-1.3-py2.7.egg/msnoise/s03compute_cc.py", line 363, in main
thisdate, thistime, params.min30 / params.goal_sampling_rate, 'ZZ', daycorr, params.goal_sampling_rate, day=True, ncorr=ndaycorr)
File "/Users/ech/anaconda/lib/python2.7/site-packages/msnoise-1.3-py2.7.egg/msnoise/api.py", line 851, in add_corr
ncorr)
File "/Users/ech/anaconda/lib/python2.7/site-packages/msnoise-1.3-py2.7.egg/msnoise/api.py", line 891, in export_sac
tr = SacIO(filename)
File "/Users/ech/github/obspy/obspy/io/sac/sacio.py", line 298, in __init__
self.read_sac_file(filen)
File "/Users/ech/github/obspy/obspy/io/sac/sacio.py", line 608, in read_sac_file
self.hf = from_buffer(fh.read(4 * 70), dtype=native_str('<f4'))
AttributeError: 'str' object has no attribute 'read'
Has anyone encountered this problem before?
Thanks in advance,
-Esteban
--
Graduate Student in Seismology
University of California Santa Cruz
Santa Cruz, California 95064
echavess(a)ucsc.edu / ec.sibaja(a)gmail.com
On August 24, 2015 at 4:59:40 AM, msnoise-request(a)mailman-as.oma.be (msnoise-request(a)mailman-as.oma.be) wrote:
Send MSNoise mailing list submissions to
msnoise(a)mailman-as.oma.be
To subscribe or unsubscribe via the World Wide Web, visit
http://mailman-as.oma.be/mailman/listinfo/msnoise
or, via email, send a message with subject or body 'help' to
msnoise-request(a)mailman-as.oma.be
You can reach the person managing the list at
msnoise-owner(a)mailman-as.oma.be
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MSNoise digest..."
Today's Topics:
1. Path problem on a windows system (Zhikun Liu)
2. Re: Path problem on a windows system (Thomas Lecocq)
3. Re: Path problem on a windows system (Zhikun Liu)
----------------------------------------------------------------------
Message: 1
Date: Mon, 24 Aug 2015 01:36:35 +0800 (GMT+08:00)
From: "Zhikun Liu" <zkliu(a)cugb.edu.cn>
To: msnoise(a)mailman-as.oma.be
Subject: [MSNoise] Path problem on a windows system
Message-ID: <950c1b5.f5e5.14f5ba21f72.Coremail.zkliu(a)cugb.edu.cn>
Content-Type: text/plain; charset=GBK
Dear Thomas and All,
I am a beginner of MSNoise and Python, but I am very interested in this powerful tool.
I installed msnoise on a windows system. When run "msnoise test", I got the following output.
Please note the line above star line. It seems that the path is wrong (a '\' is replaced by '/'
as in linux system). How to fix it? Many thanks.
.................................................................................
test_006_get_stations (msnoise.test.tests.MSNoiseTests) ... ok
test_007_update_stations (msnoise.test.tests.MSNoiseTests) ... ok
test_008_scan_archive (msnoise.test.tests.MSNoiseTests) ... 2015-08-24 00:16:02
[INFO] *** Starting: Scan Archive ***
2015-08-24 00:16:02 [INFO] Initializing (should be run only once)
2015-08-24 00:16:02 [INFO] Will work on 1 threads
2015-08-24 00:16:02 [INFO] Started: C:\Users\ZL\Anaconda\lib\site-packages\ms
noise\test\data\2010/UV05\HHZ.D
************************************
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 380, in ma
in
prepare(preparation_data)
File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 488, in pr
epare
assert main_name not in sys.modules, main_name
AssertionError: __main__
[INFO/Process-1] process shutting down
[DEBUG/Process-1] running all "atexit" finalizers with priority >= 0
[DEBUG/Process-1] running the remaining "atexit" finalizers
2015-08-24 00:16:02 [INFO] Started: C:\Users\ZKLIU\Anaconda\lib\site-packages\ms
noise\test\data\2010/UV06\HHZ.D
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 380, in ma
in
prepare(preparation_data)
File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 488, in pr
epare
assert main_name not in sys.modules, main_name
AssertionError: __main__
[INFO/Process-2] process shutting down
.........................
Zhikun at CUGB
------------------------------
Message: 2
Date: Sun, 23 Aug 2015 20:50:29 +0200
From: Thomas Lecocq <thlecocq(a)gmail.com>
To: Python Package for Monitoring Seismic Velocity Changes using
Ambient Seismic Noise <msnoise(a)mailman-as.oma.be>
Subject: Re: [MSNoise] Path problem on a windows system
Message-ID:
<CA+U7X7vL_NUkLVRXrazXpN919ouQYfyKpe5zOSYtyATaCudaUQ(a)mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi!
It looks like a python problem on your machine. Is your username not-utf8?
It looks like two process don't use the same folder naming. It's a known
problem with python 2 ... msnoise is not yet py 3 compatible. If that is
the case, look for py2/anaconda issues with chinese/other user names.
Cheers
Thomas
On 23 Aug 2015 19:19, "Zhikun Liu" <zkliu(a)cugb.edu.cn> wrote:
> Dear Thomas and All,
>
>
> I am a beginner of MSNoise and Python, but I am very interested in this
> powerful tool.
> I installed msnoise on a windows system. When run "msnoise test", I got
> the following output.
> Please note the line above star line. It seems that the path is wrong (a
> '\' is replaced by '/'
> as in linux system). How to fix it? Many thanks.
>
>
>
>
>
> .................................................................................
> test_006_get_stations (msnoise.test.tests.MSNoiseTests) ... ok
> test_007_update_stations (msnoise.test.tests.MSNoiseTests) ... ok
> test_008_scan_archive (msnoise.test.tests.MSNoiseTests) ... 2015-08-24
> 00:16:02
> [INFO] *** Starting: Scan Archive ***
> 2015-08-24 00:16:02 [INFO] Initializing (should be run only once)
> 2015-08-24 00:16:02 [INFO] Will work on 1 threads
> 2015-08-24 00:16:02 [INFO] Started:
> C:\Users\ZL\Anaconda\lib\site-packages\ms
> noise\test\data\2010/UV05\HHZ.D
> ************************************
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 380, in
> ma
> in
> prepare(preparation_data)
> File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 488, in
> pr
> epare
> assert main_name not in sys.modules, main_name
> AssertionError: __main__
> [INFO/Process-1] process shutting down
> [DEBUG/Process-1] running all "atexit" finalizers with priority >= 0
> [DEBUG/Process-1] running the remaining "atexit" finalizers
> 2015-08-24 00:16:02 [INFO] Started:
> C:\Users\ZKLIU\Anaconda\lib\site-packages\ms
> noise\test\data\2010/UV06\HHZ.D
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 380, in
> ma
> in
> prepare(preparation_data)
> File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 488, in
> pr
> epare
> assert main_name not in sys.modules, main_name
> AssertionError: __main__
> [INFO/Process-2] process shutting down
>
> .........................
>
>
>
>
>
>
> Zhikun at CUGB
> _______________________________________________
> MSNoise mailing list
> MSNoise(a)mailman-as.oma.be
> http://mailman-as.oma.be/mailman/listinfo/msnoise
>
------------------------------
Message: 3
Date: Mon, 24 Aug 2015 03:51:09 +0800 (GMT+08:00)
From: "Zhikun Liu" <zkliu(a)cugb.edu.cn>
To: "Python Package for Monitoring Seismic Velocity Changes using
Ambient Seismic Noise" <msnoise(a)mailman-as.oma.be>
Subject: Re: [MSNoise] Path problem on a windows system
Message-ID: <6bd89c2e.f61a.14f5c1d506f.Coremail.zkliu(a)cugb.edu.cn>
Content-Type: text/plain; charset=GBK
Dear Thomas,
Yes, i used the py3/anaconda, which may be the reason.
Now I move to work in the enviorment of linux using py2.
It works well. Thanks.
Zhikun
> -----????-----
> ???: "Thomas Lecocq" <thlecocq(a)gmail.com>
> ????: 2015?8?24? ???
> ???: "Python Package for Monitoring Seismic Velocity Changes using Ambient
> Seismic Noise" <msnoise(a)mailman-as.oma.be>
> ??:
> ??: Re: [MSNoise] Path problem on a windows system
>
> Hi!
>
> It looks like a python problem on your machine. Is your username not-utf8?
> It looks like two process don't use the same folder naming. It's a known
> problem with python 2 ... msnoise is not yet py 3 compatible. If that is
> the case, look for py2/anaconda issues with chinese/other user names.
>
> Cheers
>
> Thomas
> On 23 Aug 2015 19:19, "Zhikun Liu" <zkliu(a)cugb.edu.cn> wrote:
>
> > Dear Thomas and All,
> >
> >
> > I am a beginner of MSNoise and Python, but I am very interested in this
> > powerful tool.
> > I installed msnoise on a windows system. When run "msnoise test", I got
> > the following output.
> > Please note the line above star line. It seems that the path is wrong (a
> > '\' is replaced by '/'
> > as in linux system). How to fix it? Many thanks.
> >
> >
> >
> >
> >
> > .................................................................................
> > test_006_get_stations (msnoise.test.tests.MSNoiseTests) ... ok
> > test_007_update_stations (msnoise.test.tests.MSNoiseTests) ... ok
> > test_008_scan_archive (msnoise.test.tests.MSNoiseTests) ... 2015-08-24
> > 00:16:02
> > [INFO] *** Starting: Scan Archive ***
> > 2015-08-24 00:16:02 [INFO] Initializing (should be run only once)
> > 2015-08-24 00:16:02 [INFO] Will work on 1 threads
> > 2015-08-24 00:16:02 [INFO] Started:
> > C:\Users\ZL\Anaconda\lib\site-packages\ms
> > noise\test\data\2010/UV05\HHZ.D
> > ************************************
> > Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> > File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 380, in
> > ma
> > in
> > prepare(preparation_data)
> > File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 488, in
> > pr
> > epare
> > assert main_name not in sys.modules, main_name
> > AssertionError: __main__
> > [INFO/Process-1] process shutting down
> > [DEBUG/Process-1] running all "atexit" finalizers with priority >= 0
> > [DEBUG/Process-1] running the remaining "atexit" finalizers
> > 2015-08-24 00:16:02 [INFO] Started:
> > C:\Users\ZKLIU\Anaconda\lib\site-packages\ms
> > noise\test\data\2010/UV06\HHZ.D
> > Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> > File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 380, in
> > ma
> > in
> > prepare(preparation_data)
> > File "C:\Users\ZL\Anaconda\lib\multiprocessing\forking.py", line 488, in
> > pr
> > epare
> > assert main_name not in sys.modules, main_name
> > AssertionError: __main__
> > [INFO/Process-2] process shutting down
> >
> > .........................
> >
> >
> >
> >
> >
> >
> > Zhikun at CUGB
> > _______________________________________________
> > MSNoise mailing list
> > MSNoise(a)mailman-as.oma.be
> > http://mailman-as.oma.be/mailman/listinfo/msnoise
> >
> _______________________________________________
> MSNoise mailing list
> MSNoise(a)mailman-as.oma.be
> http://mailman-as.oma.be/mailman/listinfo/msnoise
------------------------------
_______________________________________________
MSNoise mailing list
MSNoise(a)mailman-as.oma.be
http://mailman-as.oma.be/mailman/listinfo/msnoise
End of MSNoise Digest, Vol 20, Issue 4
**************************************