My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Wiki pages
Links

A collection of astronomy-related python codes.

API documentation

I tried to change the hosting to mercurial, but was unable to convert the wiki to hg. Since there are many important comments on the wiki and issues pages, I elected to give up. I'm unhappy with this situation, so tips are welcome.

MATURE CODE:

readcol - ASCII column-reading code. More powerful than IDL's readcol: has the ability to read a data table with labeled columns as a dict. This code is now mostly superceded by atpy and asciitable but may still be easier to use for many simple applications.

grep - really simple, greps for things... tries to be similar to | grep on bash cmd line but isn't all that useful. I mostly use this to find substrings in large lists of dictionary keys. However, "python grep" is the most common google search term to get to my website....

gaussfitter - one and two dimensional Gaussian fitting using the Levenberg-Marquardt algorithm.

SCIENCE TOOLS:

  • UCHIIfitter - fits the SED of an ultracompact HII region with a blackbody with an optically thin turnover point

h2fit - fits H2 infrared lines by creating a synthetic spectrum (gaussians)

  • kdist - returns Kinematic Distance from Reid 2009 Galactic rotation curve given a velocity. Also includes inverse.
luminosity - SED integrator intended for mid-IR to sub-mm
  • pyflagger - flagger for Bolocam Galactic Plane Survey pipeline
  • plfit - power-law fitter as described here
  • RADEX - I've modified the RADEX radex_grid.py script to run a cube including temperature and to run in parallel. In addition, plot_grid.py can be used to turn a .dat file into a .fits data cube.

SUB-PACKAGES

AG_fft_tools

  • convolve - A convolution routine that is capable of using numpy only (though it will try to import scipy's fft because scipy uses fftw).
Also includes a power-spectrum and power-spectral-density (PSD) code.

AG_image_tools

Radial Profile functions, as per discussion on [www.astrobetter.com/fourier-transforms-of-images-in-python/ astrobetter]

SEMI-ABANDONED:

collapse_gaussfit.py collapseplot.py cubes.py subim_gaussfit.py plfit_v1.py - non-class version of plfit

Other people's code that I've modded slightly or are needed as prereqs for other pieces of code here: combineRGB mpfit mad

Abandoned: fitshow.py

intro

DEPENDENCIES: From astrolib:

Powered by Google Project Hosting