Home » Tips & Tools

Tips & Tools

Python-related stuff

If you can, avoid using IDL (for various reasons) and start with a modern, open-source scripting language like Python. You will probably want to use Numpy, Scipy and Matplolib if you want to use it for science. For astronomical purposes, the community-developed package Astropy offers lots of great modules, from FITS handling to table classes, coordinate systems, built-in often used models (such as blackbodies), convenient fitting algorithms, calculations with units and much more. Check it out!

In switching from IDL to Python comparisons between Python and IDL commands can be helpful. Ah, and another tip: For some reason matplotlib’s great legend function plots two points in the legend per default. For publication-quality plots you probably want to suppress the second point by using the option “numpoints=1″.

Bibliography management

A good combination is BibDesk + Skim. BibDesk allows you to sort papers by keyword in a bibtex file that you can use as a reference file for LaTeX documents. With Skim you can read and annotate PDFs in an easy way. With the appropriate template, BibDesk will even show your Skim notes in a preview pane. And make sure to install ADS to BibDesk, a really useful tool to quickly add publications to BibDesk.

IDL-related stuff

IDL is the Interactive Data Language, a commercial programming language developed mostly for the U.S. army. It is widely used in some sciences (or so they say). I don’t like it because it has all sorts of weird behaviour, because it is not open source. This means I cannot run it on my home computer and I cannot expect everyone to be able to execute my code, especially in places that don’t have as much money as some German research institutions.

If, for some reason you need to use IDL, here are some tips to make it a slightly less painful experience.

  • Very helpful, if you are working with IDL, is the extension TeXtoIDL that allows you to enter symbols using the well-known LaTeX syntax. For example, the call print, textoidl('\lambda [\mu m]') results in !7k!X [!7l!X m]
  • If you are using IDL and are working with a Mac you might find this useful: A syntax-coloring plug-in for TextWrangler, the free (light) version of the BBEdit text editor
  • You need to install the Coyote Graphics system to make plots that look acceptable. Also check out Coyote’s (David W. Fanning’s) other webpages with IDL tips and tricks.

Note that there is an open-source implementation for IDL, dubbed GNU Data Language. It works, but it is not fully compatible with IDL and especially if you need to use GUIs or other graphics, it is not really an alternative.

Leave a comment