You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SPy is currently developed for python 2.{6,7}. This enhancement will add support for python3. The current plan is to have a single code base that works for both python 2 and 3 (I realize some people discourage this).
from __future__ import division, print_function, unicode_literals
Fix all the miscellaneous things that are broken (most likely due to [non]integer division).
Verify all unit tests pass under python 2 and 3.
Figure out a way to get view_cube and view_nd working with python3.
The last item above is probably the hardest part because those functions rely on wxPython, which is not ported to python3. I've confirmed that most of the needed matplotlib functions that are used for interactive GUI capabilities in SPy will work under alternate matplotlib backends (with python3) but the two functions mentioned will need to be migrated to another GUI toolkit that provides an OpenGL wrapper (unless wxPython gets ported). If there isn't a relatively easy way to port those two functions, it is probably still worth making the rest of the module work with python3 and deferring those two functions until later.
I recommend taking a look at PyQtGraph for interactive GUI capabilities. It's Python 2 and 3 compatible, super fast, and has OpenGL capabilities built in. It's core capabilities are easily modified and added to using PyQt. I've used it extensively for viewing large spectral datasets.
Thanks for the recommendation! I hadn't looked PyQtGraph before but it looks like a potentially great candidate. If I had known about this earlier (and it's development was far enough along at the time), I could probably have used this to implement the ROI selection and zoom window features in the spectral package.
As of commit 165a503 (from branch python3), all unit tests pass under python 2.7, 3.3, and 3.4 from the same code base.
The only functions remaining to be updated for python3 are view_cube and view_nd. These two functions will likely be migrated from WX to Qt. Functions for 2D raster views of image data work under python3 (and python2) using the matplotlib qt4 backend (tested with PySide).
@lewismc Not sure what you confirming - that it does work or doesn't work? I received an email copy of you comment that also include a comment about Travis-CI, which is already being used.
Activity
JohnLunzer commentedon Jul 11, 2014
I recommend taking a look at PyQtGraph for interactive GUI capabilities. It's Python 2 and 3 compatible, super fast, and has OpenGL capabilities built in. It's core capabilities are easily modified and added to using PyQt. I've used it extensively for viewing large spectral datasets.
tboggs commentedon Jul 11, 2014
Thanks for the recommendation! I hadn't looked PyQtGraph before but it looks like a potentially great candidate. If I had known about this earlier (and it's development was far enough along at the time), I could probably have used this to implement the ROI selection and zoom window features in the
spectralpackage.tboggs commentedon Aug 21, 2014
As of commit 165a503 (from branch
python3), all unit tests pass under python 2.7, 3.3, and 3.4 from the same code base.The only functions remaining to be updated for python3 are
view_cubeandview_nd. These two functions will likely be migrated from WX to Qt. Functions for 2D raster views of image data work under python3 (and python2) using the matplotlibqt4backend (tested with PySide).lewismc commentedon Nov 9, 2016
I can confirm this as well. I've just tested spectral python3 branch for the same.
tboggs commentedon Nov 9, 2016
@lewismc Not sure what you confirming - that it does work or doesn't work? I received an email copy of you comment that also include a comment about Travis-CI, which is already being used.
lewismc commentedon Nov 9, 2016
Hi @tboggs
I confirm that it does work : )
Yes, I deleted the other comment regarding TravisCI. I see it's already implemented.
gpshead commentedon Jun 12, 2018
wxPython supports Python 3 these days.