[MSNoise] Compute_cc: NameError and UnboundLocalError:

Thomas Lecocq Thomas.Lecocq at seismology.be
Thu Apr 12 13:31:22 UTC 2018


Hi,

The main problem could be that the network name of your files is FDF, = 
3 char long, and that is a problem.

Thomas


Le 11/04/2018 à 03:19, Yawar Hussain a écrit :
> Hi,
>
>
> I have fixed some errors but some are still there....
>
> 2018-04-10 21:51:04 [INFO] *** Starting: Compute CC ***
> 2018-04-10 21:51:04 [INFO] Will compute ZZ
> 2018-04-10 21:51:04 [INFO] New CC Job: 2016-11-08 (1 pairs with 2 stations)
> 2018-04-10 21:51:04 [DEBUG] FDF.DF01.Z Reading 1 Files
> 2018-04-10 21:51:04 [DEBUG] Checking sample alignment
> 2018-04-10 21:51:04 [DEBUG] Checking Gaps
> 2018-04-10 21:51:04 [DEBUG] FDF.DF01.Z Slicing Stream to
> 2016-11-08T00:00:00.000000Z:2016-11-08T00:59:59.936000Z
> 2018-04-10 21:51:04 [DEBUG] FDF.DF01.Z Highpass at 1.00 Hz
> 2018-04-10 21:51:04 [DEBUG] FDF.DF01.Z Lowpass at 6.00 Hz
> 2018-04-10 21:51:04 [DEBUG] FDF.DF01.Z Decimate by a factor of 1
> 2018-04-10 21:51:04 [DEBUG] FDF.DF02.Z Reading 2 Files
> 2018-04-10 21:51:04 [DEBUG] Checking sample alignment
> 2018-04-10 21:51:05 [DEBUG] Checking Gaps
> 2018-04-10 21:51:05 [DEBUG] FDF.DF02.Z Slicing Stream to
> 2016-11-08T00:00:00.000000Z:2016-11-08T00:59:59.936000Z
> 2018-04-10 21:51:05 [DEBUG] FDF.DF02.Z Highpass at 1.00 Hz
> 2018-04-10 21:51:05 [DEBUG] FDF.DF02.Z Lowpass at 6.00 Hz
> 2018-04-10 21:51:05 [DEBUG] FDF.DF02.Z Decimate by a factor of 1
> 2018-04-10 21:51:05 [INFO] Processing pair: FDF.DF01 vs FDF.DF02
> Process Process-1:
> Traceback (most recent call last):
>    File "/home/yawar/anaconda3/lib/python3.5/multiprocessing/process.py",
> line 249, in _bootstrap
>      self.run()
>    File "/home/yawar/anaconda3/lib/python3.5/multiprocessing/process.py",
> line 93, in run
>      self._target(*self._args, **self._kwargs)
>    File
> "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/s03compute_cc.py",
> line 540, in main
>      if s1.X:
> AttributeError: 'NoneType' object has no attribute 'X'
>
>
> Regards,
> Yawar Hussain
> Ph.D. Student, Geotechnical Engineering
> University of Brasilia, Brazil.
>
> On Tue, Apr 10, 2018 at 4:06 PM, Yawar Hussain <yawar.pgn at gmail.com> wrote:
>
>> Hello,
>>
>> I have following compute_cc errors (using sac)
>>
>> yawar at yawar-Vostro-5470:~/anaconda3/bin$ msnoise compute_cc
>> 2018-04-10 14:47:38 [INFO] *** Starting: Compute CC ***
>> 2018-04-10 14:47:38 [INFO] Will compute ZZ
>> 2018-04-10 14:47:38 [INFO] New CC Job: 2016-09-26 (3 pairs with 2 stations)
>> 2018-04-10 14:47:38 [DEBUG] FDF.DF01.Z Reading 1 Files
>> 2018-04-10 14:47:39 [DEBUG] Checking sample alignment
>> 2018-04-10 14:47:39 [DEBUG] Checking Gaps
>> 2018-04-10 14:47:39 [DEBUG] FDF.DF01.Z Slicing Stream to
>> 2016-09-26T00:00:00.000000Z:2016-09-26T00:59:59.984000Z
>> 2018-04-10 14:47:39 [DEBUG] FDF.DF01.Z Highpass at 1.00 Hz
>> 2018-04-10 14:47:39 [DEBUG] FDF.DF01.Z Lowpass at 8.00 Hz
>> 2018-04-10 14:47:39 [DEBUG] FDF.DF01.Z Downsample to 20.0 Hz
>> Process Process-1:
>> Traceback (most recent call last):
>>    File "/home/yawar/anaconda3/lib/python3.5/multiprocessing/process.py",
>> line 249, in _bootstrap
>>      self.run()
>>    File "/home/yawar/anaconda3/lib/python3.5/multiprocessing/process.py",
>> line 93, in run
>>      self._target(*self._args, **self._kwargs)
>>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/s03compute_cc.py",
>> line 430, in main
>>      basetime, tramef_Z = preprocess(db, stations, comps, goal_day, params,
>> tramef_Z)
>>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/s03compute_cc.py",
>> line 322, in preprocess
>>      trace.data = resample(
>> NameError: name 'resample' is not defined
>>
>>
>> Then I converted data to *mseed*
>>
>> ~/anaconda3/bin$ msnoise compute_cc
>> 2018-04-10 15:19:32 [INFO] *** Starting: Compute CC ***
>> 2018-04-10 15:19:32 [INFO] Will compute ZZ
>> 2018-04-10 15:19:32 [INFO] New CC Job: 2016-09-27 (3 pairs with 2 stations)
>> Process Process-1:
>> Traceback (most recent call last):
>>    File "/home/yawar/anaconda3/lib/python3.5/multiprocessing/process.py",
>> line 249, in _bootstrap
>>      self.run()
>>    File "/home/yawar/anaconda3/lib/python3.5/multiprocessing/process.py",
>> line 93, in run
>>      self._target(*self._args, **self._kwargs)
>>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/s03compute_cc.py",
>> line 430, in main
>>      basetime, tramef_Z = preprocess(db, stations, comps, goal_day, params,
>> tramef_Z)
>>    File "/home/yawar/anaconda3/lib/python3.5/site-packages/msnoise/s03compute_cc.py",
>> line 355, in preprocess
>>      return basetime, tramef_Z
>> UnboundLocalError: local variable 'basetime' referenced before assignment
>>
>>
>> Regards,
>> Yawar Hussain
>> Ph.D. Student, Geotechnical Engineering
>> University of Brasilia, Brazil.
>>
> _______________________________________________
> MSNoise mailing list
> MSNoise at mailman-as.oma.be
> http://mailman-as.oma.be/mailman/listinfo/msnoise



More information about the MSNoise mailing list