python

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, [...]

8 comments Read more →

Manipulating and Viewing FITS Files in Python with pyds9

by Jessica July 14, 2010

For anyone who uses python and ds9 to visualize their FITS files, I think pyds9 is now a must-have. It is officially written and developed through SAOImage ds9 so it will be supported for the long haul. Here are the primary links to get going: TARball for installation: Source Documentation for installation and use: Docs [...]

8 comments Read more →

Interpolation and Integration in Python

by Jessica June 14, 2010

Interpolation Interpolation is a used for many astronomical applications. Interpolation is required to combine sub-pixel dithered images or spectroscopy, sample grids of stellar evolution or stellar atmosphere models, calculate extinction from observed extinction curves, and many many more applications. The scipy.interpolate package in python has some nice built-in interpolation functions and I have gathered a [...]

1 comment Read more →

Fourier Transforms of Images in Python

by Jessica March 3, 2010

There are many applications for taking fourier transforms of images (noise filtering, searching for small structures in diffuse galaxies, etc.). I wanted to point out some of the python capabilities that I have found useful in my particular application, which is to calculate the power spectrum of an image (for later separation of the distribution [...]

9 comments Read more →

3D Plotting in Python with matplotlib mplot3d

by Jessica February 1, 2010

I recently needed to do some simple 3D plotting in python. The strongest choice as discussed on the web is Mayavi, which is part of the Enthought Python distribution. However, I have a previous python distribution already installed (via scisoft) with all of my favorite packages updated to the latest and greatest versions (e.g. matplotlib, [...]

3 comments Read more →

Read IDL ‘save’ files into Python

by Tom November 24, 2009

One of the most popular posts on this blog is Kelle’s reposting of Greenfield and Jedrzejewski’s IDL vs Python earlier this year. I am an avid Python user and have never installed IDL on my computer. Recently, I developed IDLSave, a package to read IDL ‘save’ files into Python, after being sent a few such [...]

0 comments Read more →

CosmoloPy: Cosmology Routines for Python

by Guest September 17, 2009

This is a guest post by Roban Hultman Kramer, who is currently an astronomy grad student at Columbia University and will be starting as a Zwicky Fellow at ETH Zurich in January. CosmoloPy is a package of basic cosmology routines for Python, designed for use with NumPy and SciPy. Features currently include: calculation of cosmological [...]

0 comments Read more →

Hungry for Plots? Get some APLpy!

by Eli July 20, 2009

Today APLpy 0.9.3 is out! It is a Python plotting package made to generate publication-quality plots in multiple formats such as EPS, PDF, PS, PNG, and SVG. APLpy was created by Thomas Robitaille and Eli Bressert, who come from a Fortran and IDL background. With Python’s ease of use, portability, and programming they decided to [...]

6 comments Read more →

Scisoft OSX 2009.5.2 Released

by Jessica May 18, 2009

For those of you who use scisoft, IRAF, PyRAF, Python, etc. there has been an update of the Scisoft package for Macs. This package is a very nice way to install some of the most commonly used astronomy software tools (at least in optical/IR). The Urania blog as a breakdown of some of the updates: [...]

0 comments Read more →

IDL vs. Python

by Kelle May 4, 2009

Here is a really nice listing of the pros and cons of IDL and Python for astronomers. It’s an Appendix of the Python tutorial Using Python for Interactive Data Analysis by Greenfield and Jedrzejewski at STScI. Data and scripts for the examples and exercises in the tutorial are available at scipy.org. Update 28 Jan 2010: [...]

23 comments Read more →