From kellecruz at gmail.com Fri Feb 5 12:01:06 2010 From: kellecruz at gmail.com (Kelle Cruz) Date: Fri, 5 Feb 2010 12:01:06 -0500 Subject: [AstroPy] Python Books for Beginners? Message-ID: Hi All, I'm looking for book recommendations for beginning programmers starting with Python. Think undergrads first programming project. I see lots of possibilities on Amazon, but does anybody have any experience with them? While we're at it, any other books you'd recommend having around the lab? I'm tempted just to get a couple of the O'Reilly ones just because. (btw, I tried to search the archives for this mailing list, but I was unsuccessful...is there a search page that I missed?) Thanks! kelle -- Kelle Cruz, PhD http://www.astro.caltech.edu/~kelle/ 424.645.1334 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwagner at physics.ucsd.edu Fri Feb 5 13:13:26 2010 From: rwagner at physics.ucsd.edu (Rick Wagner) Date: Fri, 5 Feb 2010 10:13:26 -0800 Subject: [AstroPy] Python Books for Beginners? In-Reply-To: References: Message-ID: <97d9de51f11fcbeb38a4ddb8c52433fe.squirrel@physics-mail.ucsd.edu> Hi Kelle, For myself, I found "Learning Python" by Mark Lutz [1] to be very useful as a beginning programmer doing a summer research fellowship. I think it's an excellent balance between introducing the language and technical depth. --Rick [1] http://oreilly.com/catalog/9780596158071 > Hi All, > > I'm looking for book recommendations for beginning programmers starting > with > Python. Think undergrads first programming project. I see lots of > possibilities on Amazon, but does anybody have any experience with them? > While we're at it, any other books you'd recommend having around the lab? > I'm tempted just to get a couple of the O'Reilly ones just because. > > (btw, I tried to search the archives for this mailing list, but I was > unsuccessful...is there a search page that I missed?) > > Thanks! > kelle > > -- > Kelle Cruz, PhD > http://www.astro.caltech.edu/~kelle/ > 424.645.1334 > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > --------------------------------------------------------------- Rick Wagner, Graduate Student Researcher UCSD Physics 9500 Gilman Drive La Jolla, CA 92093-0424 Email: rwagner at physics.ucsd.edu WWW: http://lca.ucsd.edu (858) 822-4784 Phone --------------------------------------------------------------- From ejensen1 at swarthmore.edu Fri Feb 5 14:15:15 2010 From: ejensen1 at swarthmore.edu (Eric Jensen) Date: Fri, 5 Feb 2010 14:15:15 -0500 Subject: [AstroPy] Python Books for Beginners? In-Reply-To: <97d9de51f11fcbeb38a4ddb8c52433fe.squirrel@physics-mail.ucsd.edu> References: <97d9de51f11fcbeb38a4ddb8c52433fe.squirrel@physics-mail.ucsd.edu> Message-ID: <7C5E14F5-43EA-4674-8998-C031537EAC1A@swarthmore.edu> Hi Kelle et al., I'm just in the position of starting to learn Python myself and have wondered the same thing, on behalf of my students, so I'm glad to see this thread. I realize that my own needs are different from those of someone who has never programmed before (the first language is the hardest to learn!). One of the first books I ordered was "Learning Python", which Rick Wagner suggested in an earlier message. I had had the first edition in my lab for a long time, but I thought it would be good to update to the new edition. Trying to take into account the difference between a new programmer learning Python, and me coming from having used Perl and IDL for a long time, I still wonder whether "Learning Python" is the best bet. One thing to note is that it's *huge* - 1200+ pages. (In contrast, the first edition is about 300 pages.) So in my view, it's unlikely a new programmer is going to work his/her way through a significant fraction of it. And even given that size, it's still not really a reference book - as just one example of something I checked, regular expressions are given about two sentences of text (basically just to say "these exist, read more elsewhere"). Thus, I wonder whether something more compact (though I don't know which book specifically) might be useful for someone to get started, and then something like "Python in a Nutshell" to have in the lab as a reference. Just my thoughts - I look forward to hearing what others think. Eric From rlw at stsci.edu Fri Feb 5 14:52:23 2010 From: rlw at stsci.edu (Rick White) Date: Fri, 5 Feb 2010 14:52:23 -0500 Subject: [AstroPy] Python Books for Beginners? In-Reply-To: <7C5E14F5-43EA-4674-8998-C031537EAC1A@swarthmore.edu> References: <97d9de51f11fcbeb38a4ddb8c52433fe.squirrel@physics-mail.ucsd.edu> <7C5E14F5-43EA-4674-8998-C031537EAC1A@swarthmore.edu> Message-ID: <25918A90-73BF-4437-8703-57AD19F36069@stsci.edu> You might want to look at "How to Think Like a Computer Scientist", which is written specifically for teaching Python as a first programming language. It was originally written for high school students. I have not actually used it for teaching, but I think it might be usable for a college-level introductory course too. It is 270 pages, which is a much more reasonable size. And it has the advantage of being available both in a published version and for free download (in PDF) or online reading (HTML): http://www.greenteapress.com/thinkpython/ There are versions available for other programming languages too, but why would you start anywhere except Python? - Rick On Feb 5, 2010, at 2:15 PM, Eric Jensen wrote: > Hi Kelle et al., > > I'm just in the position of starting to learn Python myself and have > wondered the same thing, on behalf of my students, so I'm glad to see > this thread. I realize that my own needs are different from those of > someone who has never programmed before (the first language is the > hardest to learn!). > > One of the first books I ordered was "Learning Python", which Rick > Wagner suggested in an earlier message. I had had the first edition > in my lab for a long time, but I thought it would be good to update to > the new edition. > > Trying to take into account the difference between a new programmer > learning Python, and me coming from having used Perl and IDL for a > long time, I still wonder whether "Learning Python" is the best bet. > One thing to note is that it's *huge* - 1200+ pages. (In contrast, > the first edition is about 300 pages.) So in my view, it's unlikely a > new programmer is going to work his/her way through a significant > fraction of it. And even given that size, it's still not really a > reference book - as just one example of something I checked, regular > expressions are given about two sentences of text (basically just to > say "these exist, read more elsewhere"). > > Thus, I wonder whether something more compact (though I don't know > which book specifically) might be useful for someone to get started, > and then something like "Python in a Nutshell" to have in the lab as a > reference. > > Just my thoughts - I look forward to hearing what others think. > > Eric > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy From agile.aspect at gmail.com Fri Feb 5 21:45:58 2010 From: agile.aspect at gmail.com (Agile Aspect) Date: Fri, 5 Feb 2010 18:45:58 -0800 Subject: [AstroPy] Python Books for Beginners? In-Reply-To: References: Message-ID: I'd recommend "Learning Python" by Mark Lutz for the students and "Numerical Methods in Engineering with Python" by Jaan Kiusalaas for the lab. On Fri, Feb 5, 2010 at 9:01 AM, Kelle Cruz wrote: > Hi All, > > I'm looking for book recommendations for beginning programmers starting with > Python.? Think undergrads first programming project.? I see lots of > possibilities on Amazon, but does anybody have any experience with them? > While we're at it, any other books you'd recommend having around the lab? > I'm tempted just to get a couple of the O'Reilly ones just because. > > (btw, I tried to search the archives for this mailing list, but I was > unsuccessful...is there a search page that I missed?) > > Thanks! > kelle > > -- > Kelle Cruz, PhD > http://www.astro.caltech.edu/~kelle/ > 424.645.1334 > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -- Enjoy global warming while it lasts. From derek at astro.physik.uni-goettingen.de Sat Feb 6 08:47:42 2010 From: derek at astro.physik.uni-goettingen.de (Derek Homeier) Date: Sat, 6 Feb 2010 14:47:42 +0100 Subject: [AstroPy] Python Books for Beginners? In-Reply-To: <25918A90-73BF-4437-8703-57AD19F36069@stsci.edu> References: <97d9de51f11fcbeb38a4ddb8c52433fe.squirrel@physics-mail.ucsd.edu> <7C5E14F5-43EA-4674-8998-C031537EAC1A@swarthmore.edu> <25918A90-73BF-4437-8703-57AD19F36069@stsci.edu> Message-ID: Hi Kelle, how's it going? Glad to read your post - like some others here I am curious myself about what's a good python introduction - and actually, what makes a good python book. For a good compact primer, and also free, I still remember Dive into Python http://diveintopython.org/ though not strictly for programming freshmen. More serious perhaps, it has not been updated in a couple of years (references are still based on python 2.2, so there must be a bit of functionality missing, or methods being outdated by easier and more powerful successors, like introducing getopt() rather than optparse). There is a version for python 3 now, but that isn't really much help with 2.6/2.7, I'm afraid. The website also recommends the book below (albeit also an old version ;-), which is probably a good sign. On 5 Feb 2010, at 20:52, Rick White wrote: > You might want to look at "How to Think Like a Computer Scientist", > which is written specifically for teaching Python as a first > programming language. It was originally written for high school > students. I have not actually used it for teaching, but I think it > might be usable for a college-level introductory course too. > > It is 270 pages, which is a much more reasonable size. And it has the > advantage of being available both in a published version and for free > download (in PDF) or online reading (HTML): > > http://www.greenteapress.com/thinkpython/ Getting back to the question "what makes a good python book" actually, I'd like to share some thoughts from my experience with students (though mostly graduate ones), on what I would consider important topics for python beginners in science: Learning about the data handling packages early on - numpy, of course, typically matplotlib, important functionality from scipy and probably ipython as the interactive environment of choice. Becoming familiar with more complex data structures like Record arrays also is extremely valuable. Unfortunately much of this still seems unlikely to be covered extensively in textbooks, given the state of the numpy/scipy documentation itself. Luckily this is quickly improving, thanks to the efforts of everyone involved in that project! You are probably familiar with Perry Greenfields data analysis tutorial: http://www.scipy.org/wikis/topical_software/Tutorial - perhaps still the best access to the core functionality of these modules, although quite focussed. Structured programming practices, in particular test-based development e.g. at http://onlamp.com/pub/a/python/2004/12/02/tdd_pyunit.html http://somethingaboutorange.com/mrl/projects/nose/ A similar good practice to develop early on, which will pay back with double interest later, is documentation, but I think that is already emphasised in most good programming books. I am not sure if object-oriented programming should be anywhere high on this list - in my experience, most undergrads already had their good share of exposure to some OO languages like Java or c++, so they are not unlikely to have better OO-programming habits than their instructors ;-) Comments and additions welcome - of course if anyone knows of a good book that covers some or all of the above, I'd be very interested to know! Cheers, Derek -- ------------------------------------------------------------------------- Derek Homeier Institut f?r Astrophysik G?ttingen Georg-August-Universit?t Phone: +49 551 39-7980 Friedrich-Hund-Platz 1 Fax: +49 551 39-5043 D-37077 G?ttingen, Germany Feet: E.04.104 Web: http://www.astro.physik.uni-goettingen.de/~derek/ ------------------------------------------------------------------------- From rays at blue-cove.com Sat Feb 6 13:40:30 2010 From: rays at blue-cove.com (RayS) Date: Sat, 06 Feb 2010 10:40:30 -0800 Subject: [AstroPy] Python Books for Beginners? In-Reply-To: References: <25918A90-73BF-4437-8703-57AD19F36069@stsci.edu> <97d9de51f11fcbeb38a4ddb8c52433fe.squirrel@physics-mail.ucsd.edu> <7C5E14F5-43EA-4674-8998-C031537EAC1A@swarthmore.edu> <25918A90-73BF-4437-8703-57AD19F36069@stsci.edu> Message-ID: <5.2.1.1.2.20100206103722.019fa8c8@blue-cove.com> The best books on my shelf are Python Devloper's Handbook (Lessa) and wxPython in Action (Dunn). Lots of examples and complete reference. SciPy has a large assortment of example code of course. -Ray From jh at physics.ucf.edu Mon Feb 8 23:44:34 2010 From: jh at physics.ucf.edu (Joe Harrington) Date: Mon, 08 Feb 2010 23:44:34 -0500 Subject: [AstroPy] Python Books for Beginners? In-Reply-To: (astropy-request@scipy.org) References: Message-ID: What I give my students is: Beginners: ThinkPython (Formerly "How to Think Like a Computer Scientist") http://www.greenteapress.com/thinkpython/ Intermediate programmers: A Byte of Python http://byteofpython.com/ Advanced programmers, first time with Python: Dive Into Python http://diveintopython.org/ Data: Perry's tutorial http://www.scipy.org/wikis/topical_software/Tutorial Python Scripting for Computational Science, HP Lantangen http://folk.uio.no/hpl/scripting/index.html http://www.springer.com/mathematics/numerical+and+computational+mathematics/book/978-3-540-73915-9 http://www.amazon.com/Python-Scripting-Computational-Science-Engineering/dp/3540435085 The last is thorough, but long-winded, and uses the old conventions (from numpy import *). Still, the content is otherwise excellent. --jh-- From astropython at gmail.com Wed Feb 10 11:02:38 2010 From: astropython at gmail.com (Astronomical Python) Date: Wed, 10 Feb 2010 11:02:38 -0500 Subject: [AstroPy] ATpy 0.9.2 Release Message-ID: We are pleased to announce the release of ATpy 0.9.2! ATpy is a high-level Python package providing a generic Table class that can contain data and meta-data, and includes column manipulation, row selection, and sorting methods. In addition, read and write methods are provided to to seamlessly read and write table data to a number of formats (FITS, VO, and IPAC tables, and SQLite, MySQL, and PostgreSQL databases), building on existing Python modules. More information and links to download the latest version of ATpy can be found at http://atpy.sourceforge.net/ The main changes in this version include: - data are now stored in NumPy structured arrays, with optional support for masking - numeric precision and data types are better conserved when reading and writing to files and databases - it is now easy for users to write their own read/write functions for ATpy - the documentation has been re-written We encourage previous and new users to read over the new documentation located at http://atpy.sourceforge.net/, and we welcome feedback about how to improve it. The documentation includes a page describing how users can create their own readers/writers, and we are open to submissions from users to help us support many more table types. Users can visit the forums for general troubleshooting and discussions with the developers and other users. In addition, we have now created a bug and feature request tracker on sourceforge.net. We look forward to your feedback, Thomas Robitaille and Eli Bressert From wkerzendorf at googlemail.com Sat Feb 13 04:52:44 2010 From: wkerzendorf at googlemail.com (Wolfgang Kerzendorf) Date: Sat, 13 Feb 2010 20:52:44 +1100 Subject: [AstroPy] python sextractor Message-ID: <677F1CEC-8B17-4F24-AF18-5674B4454DA6@gmail.com> Dear all, I'm interested in using sextractor purely in python. For the last couple of years I have been calling sextractor from python and reading in the resulting catalogue. I wonder if people have wrapped sextractor's c-code with cython. It would be great if sextractor worked on numpy arrays (or pyfits objects) and that you could do things individually (like the background map and so on). Any ideas? cheers Wolfgang From sierra_mtnview at sbcglobal.net Sat Feb 13 07:35:13 2010 From: sierra_mtnview at sbcglobal.net (Wayne Watson) Date: Sat, 13 Feb 2010 04:35:13 -0800 Subject: [AstroPy] python sextractor In-Reply-To: <677F1CEC-8B17-4F24-AF18-5674B4454DA6@gmail.com> References: <677F1CEC-8B17-4F24-AF18-5674B4454DA6@gmail.com> Message-ID: <4B769C81.8020403@sbcglobal.net> I've never heard of it, but would be interested in learning more, particularly if it has some application to fish-eye lenses. Do you have a Python program that you distribute? Where can I find the sextractor? Does it work on Win? On 2/13/2010 1:52 AM, Wolfgang Kerzendorf wrote: > Dear all, > > I'm interested in using sextractor purely in python. For the last couple of years I have been calling sextractor from python and reading in the resulting catalogue. I wonder if people have wrapped sextractor's c-code with cython. > It would be great if sextractor worked on numpy arrays (or pyfits objects) and that you could do things individually (like the background map and so on). Any ideas? > > cheers > Wolfgang > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW From sierra_mtnview at sbcglobal.net Sat Feb 13 13:28:19 2010 From: sierra_mtnview at sbcglobal.net (Wayne Watson) Date: Sat, 13 Feb 2010 10:28:19 -0800 Subject: [AstroPy] Python Books for Beginners? {...Absolute} In-Reply-To: References: Message-ID: <4B76EF43.50204@sbcglobal.net> UC Davis (Calif) uses Python for Absolute Beginners an an intro to engineering, math, and science majors. It's about 3/4" thick. Lutz's books are pretty decent, but IMO overloaded with material. His Learning is pretty thick, 1.+5"?? His Programming Python is 2 3/8" thick, near the limit of pages in a paperback. Try searching for Alan Guth as an author. He's quite helpful on the Python Tutor mailing list, and contributes a pretty good amount to free internet pubs. Also Core Python by Chun is used a lot for UC Extension classes, and community colleges. Note Chun and Lutz's books have an interesting internet hookup, a web site, anda 45 day free search access to their books. I'm pretty sure they have all the code in their books there too. On 2/8/2010 8:44 PM, Joe Harrington wrote: > What I give my students is: > > Beginners: > > ThinkPython (Formerly "How to Think Like a Computer Scientist") > http://www.greenteapress.com/thinkpython/ > > Intermediate programmers: > > A Byte of Python http://byteofpython.com/ > > Advanced programmers, first time with Python: > > Dive Into Python http://diveintopython.org/ > > Data: > > Perry's tutorial http://www.scipy.org/wikis/topical_software/Tutorial > > Python Scripting for Computational Science, HP Lantangen > http://folk.uio.no/hpl/scripting/index.html > http://www.springer.com/mathematics/numerical+and+computational+mathematics/book/978-3-540-73915-9 > http://www.amazon.com/Python-Scripting-Computational-Science-Engineering/dp/3540435085 > > The last is thorough, but long-winded, and uses the old conventions > (from numpy import *). Still, the content is otherwise excellent. > > --jh-- > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > > -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW From perry at stsci.edu Sat Feb 13 14:06:09 2010 From: perry at stsci.edu (Perry Greenfield) Date: Sat, 13 Feb 2010 14:06:09 -0500 Subject: [AstroPy] python sextractor References: Message-ID: There was an effort a few years ago to make a C interface to SExtractor available that was on sourceforge. I don't think that went anywhere. The main issue is that one probably needs to refactor the existing code to remove the I/O from the computational routines to enable to use it effectively from Python. I still think it is a good idea. It would need some cooperation from the developer though (we wouldn't want to fork it for example). Perry On Feb 13, 2010, at 4:52 AM, Wolfgang Kerzendorf wrote: > Dear all, > > I'm interested in using sextractor purely in python. For the last > couple of years I have been calling sextractor from python and > reading in the resulting catalogue. I wonder if people have wrapped > sextractor's c-code with cython. > It would be great if sextractor worked on numpy arrays (or pyfits > objects) and that you could do things individually (like the > background map and so on). Any ideas? > > cheers > Wolfgang > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy From smattacus at gmail.com Sat Feb 13 17:34:33 2010 From: smattacus at gmail.com (Sean Mattingly) Date: Sat, 13 Feb 2010 14:34:33 -0800 Subject: [AstroPy] python sextractor In-Reply-To: References: Message-ID: <856175f81002131434p41489e92s97132614c98f60b0@mail.gmail.com> Wayne, you can find SExtractor here: http://www.astromatic.net/software/sextractor It's primarily geared towards finding astronomical on FITS - standard images. NB that some searches will point you to terapix's website, this will just take you on to astromatic. I don't think there is a windows version, but I may be wrong. Cheers, - Sean On Sat, Feb 13, 2010 at 11:06 AM, Perry Greenfield wrote: > > There was an effort a few years ago to make a C interface to > SExtractor available that was on sourceforge. I don't think that went > anywhere. The main issue is that one probably needs to refactor the > existing code to remove the I/O from the computational routines to > enable to use it effectively from Python. > > I still think it is a good idea. It would need some cooperation from > the developer though (we wouldn't want to fork it for example). > > Perry > > On Feb 13, 2010, at 4:52 AM, Wolfgang Kerzendorf wrote: > > > Dear all, > > > > I'm interested in using sextractor purely in python. For the last > > couple of years I have been calling sextractor from python and > > reading in the resulting catalogue. I wonder if people have wrapped > > sextractor's c-code with cython. > > It would be great if sextractor worked on numpy arrays (or pyfits > > objects) and that you could do things individually (like the > > background map and so on). Any ideas? > > > > cheers > > Wolfgang > > _______________________________________________ > > AstroPy mailing list > > AstroPy at scipy.org > > http://mail.scipy.org/mailman/listinfo/astropy > > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wkerzendorf at googlemail.com Mon Feb 15 22:52:28 2010 From: wkerzendorf at googlemail.com (Wolfgang Kerzendorf) Date: Tue, 16 Feb 2010 14:52:28 +1100 Subject: [AstroPy] python sextractor In-Reply-To: References: Message-ID: <16C84092-2054-4597-81D7-175041745F41@gmail.com> Hello So I had a bit of a look and will try to use cython to wrap the existing code without touching it. My first go will be at the background subtraction routine as that seems fairly easy with input and output (array goes in - array comes out). If anyone is a cython guru please raise your hand ;-). I'll hopefully post some updates in the near future. I guess once we know how to wrap one function, then we could do a group effort and wrap all of them. Cheers Wolfgang On 14/02/2010, at 6:06 , Perry Greenfield wrote: > > There was an effort a few years ago to make a C interface to SExtractor available that was on sourceforge. I don't think that went anywhere. The main issue is that one probably needs to refactor the existing code to remove the I/O from the computational routines to enable to use it effectively from Python. > > I still think it is a good idea. It would need some cooperation from the developer though (we wouldn't want to fork it for example). > > Perry > > On Feb 13, 2010, at 4:52 AM, Wolfgang Kerzendorf wrote: > >> Dear all, >> >> I'm interested in using sextractor purely in python. For the last couple of years I have been calling sextractor from python and reading in the resulting catalogue. I wonder if people have wrapped sextractor's c-code with cython. >> It would be great if sextractor worked on numpy arrays (or pyfits objects) and that you could do things individually (like the background map and so on). Any ideas? >> >> cheers >> Wolfgang >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy > > From sierra_mtnview at sbcglobal.net Tue Feb 16 10:32:37 2010 From: sierra_mtnview at sbcglobal.net (Wayne Watson) Date: Tue, 16 Feb 2010 07:32:37 -0800 Subject: [AstroPy] Looking for a Short Demo Win Executable of Matplotlib Message-ID: <4B7ABA95.9070005@sbcglobal.net> See Subject. I'm looking for a demo fully compiled executable that is relevant to science, astronomy, that produces a plot with the MPL navigation facilities, zoom, pan, resizing axis scales. If possible, smaller than 10M, so that I can send it via e-mail. If not, then downloadable from some common web site. -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW From rays at blue-cove.com Tue Feb 16 14:17:15 2010 From: rays at blue-cove.com (RJ) Date: Tue, 16 Feb 2010 11:17:15 -0800 Subject: [AstroPy] Looking for a Short Demo Win Executable of Matplotlib In-Reply-To: <4B7ABA95.9070005@sbcglobal.net> References: <4B7ABA95.9070005@sbcglobal.net> Message-ID: <6.2.3.4.2.20100216111257.04a98ee8@blue-cove.com> I just tried to compile the example http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx2.html using comments at the bottom of http://www.py2exe.org/index.cgi/MatPlotLib for MPL.99/Py2.6/numpy1.3 The exe throws an "illegal instruction" error and I get this with running py2exe "The following modules appear to be missing ['PyQt4.QtGui', '_dotblas', '_imaging_gif', '_transforms', '_wxagg', 'config', ' core.abs', 'core.max', 'core.min', 'core.round', 'dummy.Process', 'email.Generat or', 'email.Iterators', 'gobject', 'lib.add_newdoc', 'matplotlib.collections', ' mpl_toolkits.natgrid', 'nose', 'nose.plugins', 'nose.plugins.base', 'nose.plugin s.builtin', 'nose.plugins.errorclass', 'nose.tools', 'nose.util', 'pkg_resources ', 'projections.get_projection_class', 'projections.get_projection_names', 'proj ections.projection_factory', 'pyemf', 'pytz.zoneinfo', 'qt', 'scipy', 'testing.T ester', 'numpy.absolute', 'numpy.arccos', 'numpy.arccosh', 'numpy.arcsin', 'nump y.arcsinh', 'numpy.arctan', 'numpy.arctanh', 'numpy.bitwise_and', 'numpy.bitwise _or', 'numpy.bitwise_xor', 'numpy.bool_', 'numpy.ceil', 'numpy.conjugate', 'nump y.core.add', 'numpy.core.cdouble', 'numpy.core.complexfloating', 'numpy.core.con jugate', 'numpy.core.csingle', 'numpy.core.double', 'numpy.core.float64', 'numpy .core.float_', 'numpy.core.inexact', 'numpy.core.intc', 'numpy.core.isfinite', ' numpy.core.isnan', 'numpy.core.maximum', 'numpy.core.multiply', 'numpy.core.numb er', 'numpy.core.single', 'numpy.core.sqrt', 'numpy.cosh', 'numpy.divide', 'nump y.fabs', 'numpy.floor', 'numpy.floor_divide', 'numpy.fmod', 'numpy.greater', 'nu mpy.hypot', 'numpy.invert', 'numpy.isinf', 'numpy.left_shift', 'numpy.less', 'nu mpy.log', 'numpy.logical_and', 'numpy.logical_not', 'numpy.logical_or', 'numpy.l ogical_xor', 'numpy.maximum', 'numpy.minimum', 'numpy.negative', 'numpy.not_equa l', 'numpy.power', 'numpy.remainder', 'numpy.right_shift', 'numpy.sign', 'numpy. sinh', 'numpy.tan', 'numpy.tanh', 'numpy.true_divide']" -Ray At 07:32 AM 2/16/2010, Wayne Watson wrote: >See Subject. I'm looking for a demo fully compiled executable that is >relevant to science, astronomy, that produces a plot with the MPL >navigation facilities, zoom, pan, resizing axis scales. If possible, >smaller than 10M, so that I can send it via e-mail. If not, then >downloadable from some common web site. From rays at blue-cove.com Tue Feb 16 14:22:46 2010 From: rays at blue-cove.com (RJ) Date: Tue, 16 Feb 2010 11:22:46 -0800 Subject: [AstroPy] Looking for a Short Demo Win Executable of Matplotlib Message-ID: <6.2.3.4.2.20100216111851.04c06858@blue-cove.com> BTW, there is also an apparent conflict arising with collections.py in the standard lib and MPL; I had to rename the one in MPL... -Ray At 07:32 AM 2/16/2010, Wayne Watson wrote: >See Subject. I'm looking for a demo fully compiled executable that is >relevant to science, astronomy, that produces a plot with the MPL >navigation facilities, zoom, pan, resizing axis scales. If possible, >smaller than 10M, so that I can send it via e-mail. If not, then >downloadable from some common web site. From wkerzendorf at googlemail.com Wed Feb 17 02:26:17 2010 From: wkerzendorf at googlemail.com (Wolfgang Kerzendorf) Date: Wed, 17 Feb 2010 18:26:17 +1100 Subject: [AstroPy] pywcs problems on snow leopard (os x 10.6) Message-ID: <59021E8D-1E4A-4205-97AC-3E85280D419F@gmail.com> Pywcs (latest 1.7) compiles fine but when doing import in python it spits that at me: (os x 10.6, system python) ImportError: dlopen(/Library/Python/2.6/site-packages/pywcs/_pywcs.so, 2): Symbol not found: _sincos Referenced from: /Library/Python/2.6/site-packages/pywcs/_pywcs.so Expected in: flat namespace in /Library/Python/2.6/site-packages/pywcs/_pywcs.so any ideas? Cheers Wolfgang From sierra_mtnview at sbcglobal.net Fri Feb 19 12:33:56 2010 From: sierra_mtnview at sbcglobal.net (Wayne Watson) Date: Fri, 19 Feb 2010 09:33:56 -0800 Subject: [AstroPy] A Past Post Explaining Pylab, Scipy and Matplotlib Message-ID: <4B7ECB84.501@sbcglobal.net> Earlier this year, or maybe in late December, someone produced a very good response to Subject libraries. I printed it and marked the single page. Can't find the page, nor the post. Any ideas? -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain From rwagner at physics.ucsd.edu Fri Feb 19 12:48:02 2010 From: rwagner at physics.ucsd.edu (Rick Wagner) Date: Fri, 19 Feb 2010 09:48:02 -0800 Subject: [AstroPy] A Past Post Explaining Pylab, Scipy and Matplotlib In-Reply-To: <4B7ECB84.501@sbcglobal.net> References: <4B7ECB84.501@sbcglobal.net> Message-ID: <73D08457-DF5C-499F-94AD-B44437DDFD13@physics.ucsd.edu> Hi Wayne, I don't recall the post you're referring to, but there weren't very many during that time frame [1, 2]. You may have to do some clicking, but you should find it quickly. --Rick [1] http://mail.scipy.org/pipermail/astropy/2009-December/thread.html [2] http://mail.scipy.org/pipermail/astropy/2010-January/thread.html On Feb 19, 2010, at 9:33 AM, Wayne Watson wrote: > Earlier this year, or maybe in late December, someone produced a very > good response to Subject libraries. I printed it and marked the single > page. Can't find the page, nor the post. Any ideas? > > -- > "There is nothing so annoying as to have two people > talking when you're busy interrupting." -- Mark Twain > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy From sierra_mtnview at sbcglobal.net Fri Feb 19 13:04:30 2010 From: sierra_mtnview at sbcglobal.net (Wayne Watson) Date: Fri, 19 Feb 2010 10:04:30 -0800 Subject: [AstroPy] Books on pylab, scipy, ...? Message-ID: <4B7ED2AE.1000704@sbcglobal.net> An HTML attachment was scrubbed... URL: From cohen at lpta.in2p3.fr Fri Feb 19 14:53:47 2010 From: cohen at lpta.in2p3.fr (Johann Cohen-Tanugi) Date: Fri, 19 Feb 2010 20:53:47 +0100 Subject: [AstroPy] Books on pylab, scipy, ...? In-Reply-To: <4B7ED2AE.1000704@sbcglobal.net> References: <4B7ED2AE.1000704@sbcglobal.net> Message-ID: <4B7EEC4B.2040207@lpta.in2p3.fr> hi Wayne, what you ask is hard to achieve for any author. First of all, while matlab is a sort of testbench of what things could look like and has been at least partially driving some considerations in matplotlib and numpy/scipy, the latter do not intend to "work like" matlab, nor to offer the same level of integration. So first of all, is you want a high level of integration within one open source product, check out octave and/or scilab. Second, matplotlib is a very large OO libraries, and you can manipulate the objects in the libraries within python. A subset of matplotlib then strive to provide high level single-command interface to this OO... this is what you call pylab I believe... With pylab you have access to easy commands for all the normal call to plotting, with a 'look and feel' somewhat equivalent to MATLAB. Third, scipy is a "toolbox" or a "toolstack". It starts with the numpy core library, and provide a series of libraries for further scientific computing, alwaus striving to make use of numpy underneath. These includes integration, ode and pde solver, root finding, some multivariate analysis tools, etc... What is or should be in scipy is not clear and is subject to many threads in the scipy-user and scipy-dev mailing lists. In that respect, the role of the scikits separate modules is not clear either. In that condition, you will have a very hard time finding a scipy dedicated book. What you can find is books on numerical recipes in python, probably using numpy, and describing implementations that might or might not already be in scipy. The next stage is then, for a given problem you are interested in, to ask the scipy mailing list if there are tools in the toolstack that could help you reach your goal. When scipy matures more, then maybe it will have a shape and a definiteness that will warrant a dedicated book. I do not think that we are there yet. HTH, Johann Wayne Watson wrote: > Perhaps there are books on Subject and similar topics? I know there's > one on matplotlib. "A Primer on Scientific Programming with Python" is > somewhat along these lines. I decided to use the "Inside Search" for > books on Amazon. numpy is well represented, and apparently quite a few > math methods. When I searched for scipy, it found a number of pages, > but not one of the pages would be displayed. The entirety of books > there is limited to maybe 1/2 a book. I'm more interested in how > pylab, scipy and matlab play together. > -- > "There is nothing so annoying as to have two people > talking when you're busy interrupting." -- Mark Twain > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* , and is > believed to be clean. > ------------------------------------------------------------------------ > > _______________________________________________ > AstroPy mailing list > AstroPy at scipy.org > http://mail.scipy.org/mailman/listinfo/astropy > From sierra_mtnview at sbcglobal.net Fri Feb 19 17:48:12 2010 From: sierra_mtnview at sbcglobal.net (Wayne Watson) Date: Fri, 19 Feb 2010 14:48:12 -0800 Subject: [AstroPy] Books on pylab, scipy, ...? In-Reply-To: <4B7EEC4B.2040207@lpta.in2p3.fr> References: <4B7ED2AE.1000704@sbcglobal.net> <4B7EEC4B.2040207@lpta.in2p3.fr> Message-ID: <4B7F152C.7040908@sbcglobal.net> Thanks very much for your description. From what I can pull out of the book via Amazon makes me think it would be more useful than anything I've found on the web. I'm very familiar with math and stat methods, so that's of minimal interest to understanding how the packages plan together. To tighten up my knowledge on these subjects, I plan to go to a monthly PUG meeting San Francisco Bay Area next week to talk to live people about these matters and others. It's 180 miles from here, but I still have family and friends there, so problem with distance. What prompted me to post this message is matplotlib. I began earnestly considering its plot facility, plain plot (line plot) in pyplot, about 2 weeks ago. I immediately got stuck on what I would call the weird behavior of show(). In time, I got that under control and discovered some highly usable parts of matplotlib. I am still new to it, but see the benefits. About two days ago, I looked at the plot and decided it needed to have a large circle drawn around it. The plot is the somewhat zig-zag plot of a all-sky camera I use, and the data captured by it, track points. The circle would represent the horizon that camera sees. As far as I know, there's no way to draw a circle, except one. Put a large marker at the center point of the pixels where the zenith would be. It'll work, but left me thinking why I couldn't just draw it in some "normal" way. That made me wonder if I was seeing the whole picture of scipy, pylab, and so on. However, I've begun getting familiar with them now. Regarding MatLab, I happen to have a 5 year old student copy that I have barely used, since I purchased it. It's given me some insight to MPL, but I have no plans to dig into ML. Python is quite suitable. Another tact I plan to use is to review OOP inheritance in Pyhon. It's been a while since I used OOP, and I think there's a key there to understanding how these facilities work together. On 2/19/2010 11:53 AM, Johann Cohen-Tanugi wrote: > hi Wayne, what you ask is hard to achieve for any author. First of > all, while matlab is a sort of testbench of what things could look > like and has been at least partially driving some considerations in > matplotlib and numpy/scipy, the latter do not intend to "work like" > matlab, nor to offer the same level of integration. So first of all, > is you want a high level of integration within one open source > product, check out octave and/or scilab. > > Second, matplotlib is a very large OO libraries, and you can > manipulate the objects in the libraries within python. A subset of > matplotlib then strive to provide high level single-command interface > to this OO... this is what you call pylab I believe... With pylab you > have access to easy commands for all the normal call to plotting, with > a 'look and feel' somewhat equivalent to MATLAB. > > Third, scipy is a "toolbox" or a "toolstack". It starts with the numpy > core library, and provide a series of libraries for further scientific > computing, alwaus striving to make use of numpy underneath. These > includes integration, ode and pde solver, root finding, some > multivariate analysis tools, etc... What is or should be in scipy is > not clear and is subject to many threads in the scipy-user and > scipy-dev mailing lists. In that respect, the role of the scikits > separate modules is not clear either. In that condition, you will have > a very hard time finding a scipy dedicated book. What you can find is > books on numerical recipes in python, probably using numpy, and > describing implementations that might or might not already be in > scipy. The next stage is then, for a given problem you are interested > in, to ask the scipy mailing list if there are tools in the toolstack > that could help you reach your goal. > When scipy matures more, then maybe it will have a shape and a > definiteness that will warrant a dedicated book. I do not think that > we are there yet. > > HTH, > Johann > > Wayne Watson wrote: >> Perhaps there are books on Subject and similar topics? I know there's >> one on matplotlib. "A Primer on Scientific Programming with Python" >> is somewhat along these lines. I decided to use the "Inside Search" >> for books on Amazon. numpy is well represented, and apparently quite >> a few math methods. When I searched for scipy, it found a number of >> pages, but not one of the pages would be displayed. The entirety of >> books there is limited to maybe 1/2 a book. I'm more interested in >> how pylab, scipy and matlab play together. >> -- >> "There is nothing so annoying as to have two people >> talking when you're busy interrupting." -- Mark Twain >> >> -- >> This message has been scanned for viruses and >> dangerous content by *MailScanner* , >> and is >> believed to be clean. >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at scipy.org >> http://mail.scipy.org/mailman/listinfo/astropy > -- "There is nothing so annoying as to have two people talking when you're busy interrupting." -- Mark Twain From cohen at lpta.in2p3.fr Fri Feb 19 18:36:16 2010 From: cohen at lpta.in2p3.fr (Johann Cohen-Tanugi) Date: Sat, 20 Feb 2010 00:36:16 +0100 Subject: [AstroPy] Books on pylab, scipy, ...? In-Reply-To: <4B7F152C.7040908@sbcglobal.net> References: <4B7ED2AE.1000704@sbcglobal.net> <4B7EEC4B.2040207@lpta.in2p3.fr> <4B7F152C.7040908@sbcglobal.net> Message-ID: <4B7F2070.1070309@lpta.in2p3.fr> Wayne Watson wrote: > Thanks very much for your description. From what I can pull out of > the book via Amazon makes me think it would be more useful than > anything I've found on the web. I'm very familiar with math and stat > methods, so that's of minimal interest to understanding how the > packages plan together. > > To tighten up my knowledge on these subjects, I plan to go to a > monthly PUG meeting San Francisco Bay Area next week to talk to live > people about these matters and others. It's 180 miles from here, but I > still have family and friends there, so problem with distance. > > What prompted me to post this message is matplotlib. I began > earnestly considering its plot facility, plain plot (line plot) in > pyplot, about 2 weeks ago. I immediately got stuck on what I would > call the weird behavior of show(). In time, I got that under control > and discovered some highly usable parts of matplotlib. I am still new > to it, but see the benefits. > > About two days ago, I looked at the plot and decided it needed to > have a large circle drawn around it. The plot is the somewhat zig-zag > plot of a all-sky camera I use, and the data captured by it, track > points. The circle would represent the horizon that camera sees. As > far as I know, there's no way to draw a circle, except one. Put a > large marker at the center point of the pixels where the zenith would > be. It'll work, but left me thinking why I couldn't just draw it in > some "normal" way. That made me wonder if I was seeing the whole > picture of scipy, pylab, and so on. However, I've begun getting > familiar with them now. matplotlib has patch objects for common geometrical figures. You have to pass them to a "axis" object as patch objects. So for instance the following should work : from matplotlib import pylab as plt from matplotlib.patches import Circle cir = Circle( (0.5,0.5), radius=0.2) f=plt.figure() a=f.gca() a.add_patch(cir) plt.show() a bit contrived, so there might be more direct ways to get it.... Johann > > Regarding MatLab, I happen to have a 5 year old student copy that I > have barely used, since I purchased it. It's given me some insight to > MPL, but I have no plans to dig into ML. Python is quite suitable. > > Another tact I plan to use is to review OOP inheritance in Pyhon. > It's been a while since I used OOP, and I think there's a key there to > understanding how these facilities work together. > > On 2/19/2010 11:53 AM, Johann Cohen-Tanugi wrote: >> hi Wayne, what you ask is hard to achieve for any author. First of >> all, while matlab is a sort of testbench of what things could look >> like and has been at least partially driving some considerations in >> matplotlib and numpy/scipy, the latter do not intend to "work like" >> matlab, nor to offer the same level of integration. So first of all, >> is you want a high level of integration within one open source >> product, check out octave and/or scilab. >> >> Second, matplotlib is a very large OO libraries, and you can >> manipulate the objects in the libraries within python. A subset of >> matplotlib then strive to provide high level single-command interface >> to this OO... this is what you call pylab I believe... With pylab you >> have access to easy commands for all the normal call to plotting, >> with a 'look and feel' somewhat equivalent to MATLAB. >> >> Third, scipy is a "toolbox" or a "toolstack". It starts with the >> numpy core library, and provide a series of libraries for further >> scientific computing, alwaus striving to make use of numpy >> underneath. These includes integration, ode and pde solver, root >> finding, some multivariate analysis tools, etc... What is or should >> be in scipy is not clear and is subject to many threads in the >> scipy-user and scipy-dev mailing lists. In that respect, the role of >> the scikits separate modules is not clear either. In that condition, >> you will have a very hard time finding a scipy dedicated book. What >> you can find is books on numerical recipes in python, probably using >> numpy, and describing implementations that might or might not already >> be in scipy. The next stage is then, for a given problem you are >> interested in, to ask the scipy mailing list if there are tools in >> the toolstack that could help you reach your goal. >> When scipy matures more, then maybe it will have a shape and a >> definiteness that will warrant a dedicated book. I do not think that >> we are there yet. >> >> HTH, >> Johann >> >> Wayne Watson wrote: >>> Perhaps there are books on Subject and similar topics? I know >>> there's one on matplotlib. "A Primer on Scientific Programming with >>> Python" is somewhat along these lines. I decided to use the "Inside >>> Search" for books on Amazon. numpy is well represented, and >>> apparently quite a few math methods. When I searched for scipy, it >>> found a number of pages, but not one of the pages would be >>> displayed. The entirety of books there is limited to maybe 1/2 a >>> book. I'm more interested in how pylab, scipy and matlab play together. >>> -- >>> "There is nothing so annoying as to have two people >>> talking when you're busy interrupting." -- Mark Twain >>> >>> -- >>> This message has been scanned for viruses and >>> dangerous content by *MailScanner* , >>> and is >>> believed to be clean. >>> ------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> AstroPy mailing list >>> AstroPy at scipy.org >>> http://mail.scipy.org/mailman/listinfo/astropy >> >