python

The Astropy Project: A core Python package for Astronomy

by Tom January 30, 2012

In June 2011, the announcement of a new Python package for Astronomy on the astropy mailing list prompted a long thread that started as a criticism of the proliferation of independently-developed Astronomy Python packages but quickly became the start of a common effort to develop a single core package for Astronomy. Many hundreds of emails, [...]

{ 6 comments }

Read more →

[Link] Statistics with Python

by Jessica September 30, 2011

Astronomers rely on statistical analysis all the time. The Python programming language has some excellent add-on packages for statistics. But sometimes the documentation isn’t as helpful in “real-world” scenarios. Prasanth Nair has posted a very nice tutorial on Simple Statistics with Python over at his blog. I highly recommend it for new users of python [...]

{ 2 comments }

Read more →

Python 2 to 3 transition

by Jessica August 31, 2011

You can hardly be an astronomer today without knowing how to write code. As with programmers in all disciplines, we are at the mercy of the language we code with. Computer science is still a rapidly evolving field and new programming languages come along, existing programming languages get updated, and your favorite packages/routines might get [...]

{ 6 comments }

Read more →

Visualizing Simulated Data

by Jessica June 9, 2011

More and more astronomers are writing, running, and using massive computer simulations. The complexity of these simulations (often 3D space + time) means that visualization can be challenging. Over at Astropython, they have posted about the - yt - toolkit that allows you to analyze and visualize the results of adaptive mesh refinement simulation codes (AMR). AMR [...]

{ 8 comments }

Read more →

Python Tutorial for Astronomers

by Tom May 25, 2011

On Monday, a group of CfA astronomers (Tom Aldcroft, Brian Refsdal, Gus Muench, and myself) announced the availability of a web tutorial aimed at teaching Python to astronomers through a series of interactive workshops: http://python4astronomers.github.com/ Practical Python for Astronomers is a series of hands-on workshops to explore the Python language and the analysis tools it [...]

{ 6 comments }

Read more →

PiCloud: Advantages of running python in the cloud

by Eli December 28, 2010

When we go to conferences, observing runs, collaborations and other travels the first thing that comes to mind for packing is our laptop (or iPad). The laptop is steadfast, resolute and is always there when we need to work or relax. But there’s one slight problem; when we need to do work on the run, [...]

{ 0 comments }

Read more →

Making RGB images from FITS files with python/matplotlib.

by Jessica October 22, 2010

Converting astronomical data taken in multiple filters into representative-color RGB images often provides one of the most visually appealing (and informative) views of a target. This can be done in ds9 very easily; however, if you want a little more control, then python/matplotlib can be used in a very similar fashion. I also note that [...]

{ 3 comments }

Read more →

Some drawbacks to Python: Python Provocation | The e-Astronomer

by Kelle October 2, 2010

Python Provocation | The e-Astronomer Python occupies a strange territory between the easy peasy world of “download this app and start clicking” and the stern world of “if you don’t know what a makefile is, you’d better look somewhere else mate”. At first I thought this was precisely its strength : grown up stuff for [...]

{ 11 comments }

Read more →

How to easily create, read, write and manipulate tables and databases in Python with ATpy and asciitable

by Tom September 6, 2010

With the release of ATpy 0.9.4 and asciitable 0.2.4, it’s about time we told our readers how incredibly easy it is to create, read, write, and manipulate tables and databases of data in Python!   Most, if not all of us have to manage tabular data at one point or another, and it is safe [...]

{ 10 comments }

Read more →

Parallel Processing in Python

by Guest August 9, 2010

Today we have a guest post by Ian Crossfield (UCLA) on parallel computing with python. When analyzing astronomical data, one often finds oneself repeating the same tasks over and over again (e.g. fitting a model to a PSF, measuring the width of a spectral feature, etc.). Sometimes the results of one computation influence the next, [...]

{ 10 comments }

Read more →