StreamPick icon indicating copy to clipboard operation
StreamPick copied to clipboard

Adapting the code for Python 3

Open echavess opened this issue 8 years ago • 2 comments

Hi Miili;

I have adapted the code for Python 3.x. However I have encounter an issue when I try to run it:

File "/Volumes/SMOMENT/Deconvolution_Nicoya/streamPick.py", line 55, in init self.setupUI() File "/Volumes/SMOMENT/Deconvolution_Nicoya/streamPick.py", line 67, in setupUI self._initPlots() File "/Volumes/SMOMENT/Deconvolution_Nicoya/streamPick.py", line 84, in _initPlots self.canvas = FigureCanvas(self.fig) File "//anaconda/lib/python3.5/site-packages/matplotlib/backends/backend_qt4agg.py", line 76, in init FigureCanvasQT.init(self, figure) File "//anaconda/lib/python3.5/site-packages/matplotlib/backends/backend_qt4.py", line 71, in init QtWidgets.QWidget.init(self) TypeError: init() missing 1 required positional argument: 'figure'

Attached is the script. Any ideas where I am missing the positional argument?

Thanks streamPick.py.zip

echavess avatar Nov 01 '16 06:11 echavess

Hi,

Looks like the problem is with matplotlibs qt4 backend...

I recommend to use pyrocko, find the project at www.pyrocko.org; use the snuffler for inspecting picking your data. Great tool!! See website for pyrocko installation under anaconda.

If you have any questions regarding the pyrocko framework/snuffler write me or issue under GitHub repository github.com/pyrocko

Cheers!

Marius

miili avatar Nov 01 '16 14:11 miili

Thanks, will check it out. I have a question. Can I add the picking time to the data using the snuffer? Let's suppose I am reading SAC data and I want to pick the P-wave arrival and then cut the data centered at the P-Wave arrival. Does the snuffer allows me to write the P/a marker to the metadata?

echavess avatar Nov 01 '16 17:11 echavess