Adam's IDL Routines
Here are a few routines I've put together for my research that may be generally useful. If you do make use of these routines, or find any bugs, please let me know by emailing ajb AT mit DOT edu.
PSFFIT_TINYTIM.PRO: This routine does binary fits for imaging data, and is optimized for fitting NICMOS images of binaries using TinyTim model PSFs. However, it should work fine for other PSFs, including single source imaging data. Usage of this routine is described in Section 4 of Burgasser et al. 2006, ApJS, 166, 585. If you do make use of this routine for any published result, please include a citation to this paper.
PSFFIT_SIMPLE.PRO: Same as above, but for a more basic PSF fit. In particular, the PSF image is constrained to be the same size as the binary image. See citation note above.
BINSTAT.PRO: Computers fraction and lower/upper significance limits for a binomial distribution. This is useful for example when calculating the percentage of binaries in a small sample, say 2/10, where the 1 sigma uncertainty is *not* +/-10^-1/2 (it is in fact 0.20+0.17-0.07 - see figure). This routine is based on the formalism described in the Appendix of Burgasser et al. 2003, ApJ, 586, 512. If you do make use of this routine for any published result, please include a citation to this paper.
How Do I Make These Work?
First: Make sure you have the right version of IDL
My routines all function happily on IDL v6.3, but probably work just as well in v5.X and possibly even v4.X (I've been writing them for a long time!). I don't know if these are translatable to other systems such as the GNU Data Language (GDL), but if they are please let me know!
Second: Get the GSFC ASTRON IDL library
Most of the routines presented here are for the most part independent, but in some cases I make use of the GSFC ASTRON library tools. These should be downloaded from:
I recommend downloading the astron.dir.tar.gz file to maintain some sense of order, and unzipping/untarring this file in a local directory such as /Users/adam/idl/astron/ . Then see the instructions below for making sure IDL sees this directory.
Third: Put the routines in the right folder
All of the files listed are ascii files with a .pro extension. IDL will know exactly what to do with these as long as they are in a directly that IDL knows to look into. I generally have a local directory where I install all of my IDL routines, such as /Users/adam/idl/ . Then, to make IDL see these routines, add the following line to your .bashrc file
IDL_PATH=/Applications/rsi/idl/lib/:+/Users/adam/idl/; export IDL_PATH
The first directory points to RSI's native library, the second one points to local library. If you are using cshell then add the following to your .cshrc file:
setenv IDL_PATH /Applications/rsi/idl/lib/:+/Users/adam/idl/
If you are using a PC, you should consult the documentation about modifying the !path variable.
Fourth: Some other resources that might help
Last updated 20 March 2008