Surveying the Universe
Archive for March, 2009
PSFs in IDL
Mar 18th
Two methods of approximating a point-spread function in IDL:
1. StarFinder seems to do a great job at finding point sources in crowded fields. It includes a routine for generating the Airy pattern. For a 51 x 51 array, with the peak at [25, 25], and an FWHM of 8.0 pixels, this is the command:
psf = airy_pattern(51, 51, 25, 25, 2./8.0) isurface, psf
The output looks something like this:

2. The IDL Astronomy User's Library contains a routine, psf_gaussian, that produces a Gaussian PSF. To produce the same as above, the command would be:
psf = psf_gaussian(npix=51, fwhm=8.0, /double) isurface, psf
... which produces something like this:

The eclipse of IDL 7
Mar 3rd
I've finally made the transition from IDL 6.4 to IDL 7. Here are my handy hints...
- IDL Workbench rocks! (This is because it is basically Eclipse, which is a proper development environment, unlike that hideous old IDLDE.)
- Another reason for using IDL Workbench (for me at least, and for now) is that IDL help doesn't seem to work if Java 6 is the default (as it is on my Mac), but the help does work if launched through the IDL Workbench.
To transition to IDL Workbench:
- Import your code as described on David Fanning's page - fret not, it's easy and harmless
- Preferences -> IDL -> Startup file, if you have one, and
- Preferences -> IDL -> Paths -> Insert... for me it was just my idl folder, including all sub-folders, to mimic my $IDL_PATH environment variable.
I live in York and I'm a research fellow in