Re: [Matplotlib-users] open ascii grid data and plot
Le 29 févr. 2012 à 23:29, questions anon a écrit : > I have a txt file (with an associated prj file) containing gridded weather > data. > Firstly how can I open this file and convert it to a numpy array? You should have a look on ATpy package : http://atpy.github.com/ Cheers JB-- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib hanging on Mac OS 10.7 with Python 2.7.2 EPD 7.2-2 (64-bit)
Aloha Eric, > This appears to be very much a dueling event loop problem. My guess is > that the solution will have to be something that keeps the event loops > well separated, probably in separate processes. All interaction with > your Client event loop would be in one process, and the callback would > get your data and put it somewhere (e.g. in a numpy npz file). Then the > trick is to have the matplotlib process in a polling loop using a timer > (done crudely with plt.pause(0.1); there is probably a better way) > checking to see if that "somewhere" has been updated, and if so, > updating its plot. I feel I see the light at the end of the tunnel. The npz file is even not necessary, I just need to pass the star id to a separate plotting process, to be compared to some stored previous value, in order to refresh the plot. I have to think about it for a couple of days… Thanks for the suggestion, Cheers, JB-- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] import problem (matplotlib ? numpy ?) on Mac Intel, python 2.6
Dear matplotlib/numpy gurus, This is my first attempt to use matplotlib & numpy, with the following small piece of code: #!/usr/bin/env jython jython because of the import of stilts from starjava # Fabrique les figures des champs du papier Catalogue __author__="marquett" __date__ ="$16 mai 2011 12:17:08$" import sys sys.path.append('/star/starjava/etc/ttools') sys.path.append('/Library/Frameworks/Python.framework//Versions/2.6/lib/python2.6/site-packages') import stilts import glob import matplotlib.pyplot as plt I got the following trace: Traceback (most recent call last): File "/Users/marquett/Downloads/FigCat/src/figcat.py", line 14, in import matplotlib.pyplot as plt File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py", line 135, in from matplotlib.rcsetup import (defaultParams, File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py", line 19, in from matplotlib.colors import is_color_like File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/colors.py", line 52, in import numpy as np File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.py", line 137, in import add_newdocs File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py", line 9, in from numpy.lib import add_newdoc File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/__init__.py", line 4, in from type_check import * File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/type_check.py", line 8, in import numpy.core.numeric as _nx File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/__init__.py", line 5, in import multiarray ImportError: No module named multiarray I use the latest 1.6.0 version of numpy and 1.0.0 one of matplotlib. My so little experience tells me that this is a deep numpy issue rather than a matplotlib one. Any hint welcome, thanks. JB Marquette -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [AstroPy] import problem (matplotlib ? numpy ?) on Mac Intel, python 2.6
Hi Thomas, AtPy looks great. My only concern with starjava was to use stilts functionalities for managing ascii tables and coordinates transformations from degrees to sexagesimal and reverse. But I guess that AtPy deals with headers having a leading "#" and names of columns, like # idra_min ra_max dec_min dec_max and that pywcs can do transformations. So I can switch to pure python scripts. Cheers, JB > Hi Jean-Baptiste, > > I don't think numpy is currently supported by Jython. > > I do not know exactly what is your use of starjava, but you might want to > have a look at AtPy (http://atpy.github.com/) which does a pretty good job at > manipulating (astronomical) tables. > > Cheers, > > Thomas Boch > > On 16/05/11 17:02, Jean-Baptiste Marquette wrote: >> >> Dear matplotlib/numpy gurus, >> >> This is my first attempt to use matplotlib & numpy, with the following small >> piece of code: >> >> #!/usr/bin/env jython jython because of the import of stilts from >> starjava >> >> # Fabrique les figures des champs du papier Catalogue >> >> >> __author__="marquett" >> __date__ ="$16 mai 2011 12:17:08$" >> >> import sys >> sys.path.append('/star/starjava/etc/ttools') >> sys.path.append('/Library/Frameworks/Python.framework//Versions/2.6/lib/python2.6/site-packages') >> import stilts >> import glob >> import matplotlib.pyplot as plt >> >> I got the following trace: >> >> Traceback (most recent call last): >> File "/Users/marquett/Downloads/FigCat/src/figcat.py", line 14, in >> import matplotlib.pyplot as plt >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py", >> line 135, in >> from matplotlib.rcsetup import (defaultParams, >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/rcsetup.py", >> line 19, in >> from matplotlib.colors import is_color_like >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/colors.py", >> line 52, in >> import numpy as np >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.py", >> line 137, in >> import add_newdocs >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/add_newdocs.py", >> line 9, in >> from numpy.lib import add_newdoc >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/__init__.py", >> line 4, in >> from type_check import * >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/lib/type_check.py", >> line 8, in >> import numpy.core.numeric as _nx >> File >> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/__init__.py", >> line 5, in >> import multiarray >> ImportError: No module named multiarray >> >> I use the latest 1.6.0 version of numpy and 1.0.0 one of matplotlib. >> >> My so little experience tells me that this is a deep numpy issue rather than >> a matplotlib one. >> >> Any hint welcome, thanks. >> >> JB Marquette >> >> >> ___ >> AstroPy mailing list >> astr...@scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy > > > -- > Thomas Boch > CDS/Observatoire Astronomique Phone : 33 (0)3 68 85 24 42 > 11, rue de l'Universite Fax: 33 (0)3 68 85 24 17 > F-67000 Strasbourg Email : thomas.b...@astro.unistra.fr > France http://cdsweb.u-strasbg.fr/~boch -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users