Online Python code visualization

If you have ever gotten confused about Python variables and references, or want to understand better how Python code gets executed, then check out this online Python code visualizer.  It's a truly amazing online app that let's you edit and step through short Python scripts and watch the variable stack as each code line is exe... View More

Advanced Scientific Programming in Python

A Summer School by the G-Node and the Institute of Experimental and Applied Physics, Christian-Albrechts-Universität zu Kiel, September 2-7, 2012.Scientists spend more and more time writing, maintaining, and debugging software. While techniques for doing this efficiently have evolved, only few scientists actually use them. As a resul... View More

Caution with numpy float32 images

There is an interesting thread on the numpy discussion group about an unexpected result of taking the mean (or sum) of a large array of 32-bit floating point numbers.  If you exceed the 32-big float precision then you will get the wrong answer on some platforms.  Takeaway: use float64 or specify the precision of the accumulator.Here ... View More

Moving from IDL

Please enter your text here.In a blog post at scicoder, Demitri Muna has offered to provide, in the scicoder website, answers to specific questions that fall under the broad category:"What would it take to move you away from IDL?"The following is extracted from the scicoder blog post:I'd like to hear from you what the c... View More

HPC examples with Python

AstroPython reader Moritz writes:While looking for good way to define a banded matrix in Python I stumbled on the following tutorial:HPC Techreport: A brief introduction to PythonAfter the standard introduction to basic Python concepts, I quite like the way different HPC solutions are built up in the end (numpy, scipy, weave, Cython)... View More

Installing scientific Python on Ubuntu

Adam Klien wrote a detailed description of setting up a cutting-edge scientific Python environment on a fresh install of Ubuntu 11.10.  This shows all the steps and mostly installs the latest releases or dev versions from source.  It also demonstrates the great idea of using virtualenv to "isolate the Python distro from the carn... View More

Asciitable 0.7.1 released

Version 0.7.1 of asciitable, an extensible module for reading and writing ASCII tables, is now available:   http://cxc.harvard.edu/contrib/asciitable/This is a minor feature and bug-fix release: Add a method inconsistent_handler() to the BaseReader class as a hook to handle rows with an inconsistent number of data columns... View More

High Performance Python tutorial v0.2 (from EuroPython 2011)

Ian Ozsvald has released an excellent High Performance Python tutorial (55 page PDF) which walks through different ways of making Python code run much faster.  Read more in the original blog post, look at the source on github, or watch the slides.Topics covered: Python profiling (cProfile, RunSnake, line_profiler) – find bottlenecks ... View More

EPD Free

Great news from the Enthought Team!  They are now offering a core version of their Enthought Python Distribution which is free for use and redistribution, as announced in their recent newsletter:"We're also excited to tell you about a new support level for EPD, EPD Free.  This lightweight distribution installs the essentials... View More

asciitable 0.7.0

Version 0.7.0 of asciitable (an extensible module for reading and writing ASCII tables) is now available.  This release includes the following key features: Added support for reading and writing LaTeX tables (contributed by Moritz Guenther). Improved the CDS reader by better supporting multi-file tables (contributed by Frederic Groll... View More

Python --user install is evil

There was a time not so long ago when I thought that the --user flag for installing packages could be a magic bullet for consolidating packages among different Python installations.  The --user flag is available for pip, easy_install, and setup.py for Python 2.6 and later.  It installs packages in a directory local to the user and pl... View More

N-body SPH analysis with Python

There is an interesting project in development to support N-body SPH analysis in Python.  Check it out at: http://code.google.com/p/pynbody/ To quote from author Rok Roskar (via astrobetter.com):I'd like to plug a project that a group of us have been working on since last fall called pynbody. It's a python-based N-body/SPH an... View More

Quaternion library - looking for feedback

Andrea Zonca writes:I've developed a quaternion library using numpy with the purpose of manipulating large arrays of quaternions, as typically used for spacecraft pointing (I work on Planck).  The code is available atgithub.com/zonca/quaternionarrayI would like some feedback, I might add some documentation in the near future, now... View More

10 Reasons Python Rocks for Research (And a Few Reasons it Doesn’t)

Hoyt Koepk of the Department of Statistics at the University of Washington writes about "10 Reasons Python Rocks for Research (And a Few Reasons it Doesn’t)". http://goo.gl/GoUXM.

View More

Why Astronomers should program in Python.

A short article on why astronomers should program in Python http://goo.gl/ZIjdM. Something to send to all REU and equivalent programs!

View More