Hi all
I have fedora 12 with python 2.6 and obspy 0.9.2
I have a new problem with plotting a stream waves.
I have declared a list variable with [], a dictionary variable with {} and then I have filled the dictionary with this line code:
event=[]
evt={}
evt['text']=EventID # Event identifier
evt['time']=UTCDateTime(TimeArr) # UTC time of P wave of station
event.append(evt) # append dictionary evt in event list
print event
# trackWave is trace of stations wave loaded from archive to made a dayplot
trackWave.plot(type='dayplot', outfile=PictureWave,size=(1024, 800),starttime=UTCDateTime(TimeYesterday),interval=30, events=event)
When I print the event variable, the output is:
[{'text': 'OSB2014tqmo', 'time': UTCDateTime(2014, 10, 7, 14, 1, 13, 849900)}, {'text': 'OSB2014trrp', 'time': UTCDateTime(2014, 10, 8, 5, 42, 40, 599900)}, {'text': 'OSB2014trsk', 'time': UTCDateTime(2014, 10, 8, 6, 7, 17, 970000)}]
I think this is correct, but the program get the error:
Traceback (most recent call last):
File "/home/lenet/seiscomp3/bin/scwave", line 284, in <module>
trackWave.plot(type='dayplot', outfile=PictureWave,size=(1024, 800),starttime=UTCDateTime(TimeYesterday),interval=30, events=event)
File "/usr/lib/python2.6/site-packages/obspy-0.9.2-py2.6-linux-i686.egg/obspy/core/stream.py", line 1058, in plot
return waveform.plotWaveform(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/obspy-0.9.2-py2.6-linux-i686.egg/obspy/imaging/waveform.py", line 251, in plotWaveform
self.plotDay(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/obspy-0.9.2-py2.6-linux-i686.egg/obspy/core/util/decorator.py", line 73, in echo_func
return func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/obspy-0.9.2-py2.6-linux-i686.egg/obspy/imaging/waveform.py", line 467, in plotDay
self._plotEvent(event)
File "/usr/lib/python2.6/site-packages/obspy-0.9.2-py2.6-linux-i686.egg/obspy/imaging/waveform.py", line 575, in _plotEvent
for pick in event.picks:
AttributeError: 'dict' object has no attribute 'picks'
Exception TypeError: "'NoneType' object is not callable" in <bound method WaveformPlotting.__del__ of <obspy.imaging.waveform.WaveformPlotting object at 0xb31a0ac>> ignored
Can anyone help me?
Regards,
Sergio