08 Jan. 2009

Python, Astronomy and Maps

Update: the solution is here: Kapteyn
Update 2: there is also a new package that I have not tested, but that seems to be good: APLpy
Update 3: and now there is also: pywcsgrid2

You might want to look at the following site for more up to date information: astropython

Python is a good language for scientists. It basically replaces proprietary software like IDL, Matlab or SAS. What it lacks at the moment is an easy way to display astronomical data saved as fits files containing WCS information.
WCS information standardizes the transformation between pixel coordinates and world coordinates (e.g. position in the sky). There is a good library, pywcs, that deals with this information. Matplotlib, a good choice for plotting data with python, includes Basemap, a toolkit to display maps (of the earth) in various projections. What is missing is a link between these two!


What kinds of projections are supplied by basemap and wcs?
Basemap nameFITS Code [WCS]Names
AZPZenithal perspective
SZPSlant zenithal perspective
Gnomonic ProjectionTANGnomonic
Stereographic ProjectionSTGStereographic
SINSlant orthographic
ARCZenithal equidistant
ZPNZenithal polynomial
Lambert Azimuthal Equal Area ProjectionZEAZenithal equal area
AIRAiry
CYPCylindrical perspective
CEACylindrical equal area
Cassini ProjectionCAR transverse case
CARPlate carree
Miller Cylindrical ProjectionCAR with unequal scaling
Mercator ProjectionMERMercator
Transverse Mercator ProjectionMER transverse case
Oblique Mercator Projection
Equidistant Cylindrical Projection
Sinusoidal ProjectionSFLSanson-Flamsteed
PARParabolic
Mollweide ProjectionMOLMollweide
AITHammer-Aitoff
COPConic perspective
Albers Equal Area ProjectionCOEConic equal-area
Equidistant Conic ProjectionCODConic equidistant
COOComic orthomorphic
Lambert Conformal Projection for sperical earth = COO
BONBonne's equal area
Polyconic ProjectionPCOPolyconic
TSCTangential Sperical Cube
CSC COBE Quadrilateralized Spherical Cube
QSC Quadrilateralized Spherical Cube
Azimuthal Equidistant Projection
Orthographic Projection
Geostationary Projection
Robinson Projection
Gall Stereographic Projection
Polar Stereographic Projection
Polar Lambert Azimuthal Projection
Polar Azimuthal Equidistant Projection
McBryde-Thomas Flat Polar Quartic
van der Grinten Projection

comments powered by Disqus