Department of Physics AstroLab

Python Links


General Scientific Programming

Calling c functions and fortran subroutines


Pgplot and ppgplot


Example Python Programs and Functions

  • Find the median of an array (source)
  • Angular separation of two points on the Celestial Sphere (source)
  • Bearing (position angle) of one point on a sphere relative to another (source)
  • To the azimuth and elevation of celestial object (source)
  • Convert from J2000 equatorial coordinates to galactic coordinates (source)
  • To find aperture magitudes for a set of x, y position on an image (source)
  • Incomplete Gamma functions, etc (gammln, gser, gcf, gammp, gammq translated from Numerical Recipes) (source)
  •  Plots galaxy surface brightness curves, outputs:
  •  Plots petrosian functions for a range of sersic profiles, outputs:
  • Create bulge and disk images from GALFIT output fit.log file
  • Average a set of JPEGS with PIL and numpy (source)
  • Convert the SDSS photo flag hex number into the flag names (source, PhotoFlags.dat)
  • Make up 2d gaussian fits image (source).
  • Example of using scipy.signal.convolve2d (source). Input fits files (gal.fits, psf.fits).
  • How to use the signal timeout (source).
  • Using astLibs to make up a postage stamp image (source)
  • Examples of file locking in GCC and python

Back to the AstroLab Home Page jrl 2020-Jun-17 12:48:17 UTC