Danger! Do not look into laser

This page is for distributing software I've written that might be of use to other people. And a couple of manifestoes.

Currently there are only a few useful things here:

LSTSQ and MLSFIT - two programs for least-squares fitting of linear relations y = A + Bx to x,y data. Many (too many) algorithms exist for fitting lines to data. These programs are somewhat novel because they allow fitting a relation with intrinsic scatter, that is a relation where the scatter in the data is larger than can be explained by the observational errors on x and y. Further details are in the discussion and Appendix of my paper on the evolution of the Tully-Fisher relation, Weiner et al 2006 (ApJ in press), astro-ph/0609091.

FITSIOWRAP - an abstraction layer between IMFORT and FITSIO. It's a package of subroutines that masquerade as IRAF IMFORT subroutines, but call FITSIO routines, so that programs written to call IMFORT routines can be linked with FITSIOWRAP and FITSIO, calling FITSIO to work on FITS files without any changes to the original program code. Of use to astronomers who have old code lying around that uses the IMFORT library to access IRAF images or data.

gasdev.sm - a Supermongo macro that generates a vector of random numbers with a gaussian distribution with mean 0 and sigma 1.

docontour.sm - a Supermongo macro that takes point locations in vectors X and Y and makes a contour plot of the point density in the X-Y plane. This is very useful when you have a lot of points and plotting them all will just make a sea of black. Stellar astronomers call this a ``Hess diagram'' when it is used to plot the density of stars in a color-magnitude diagram.

dobackup.sh - a simple Unix shell script that uses rsync to back up a directory, e.g. onto an external disk. The useful thing about this script is that it excludes large files. It uses "find" to find all the files bigger than some size - about 16 megabytes as coded - and excludes those from the rsync. This lets you back up your home or data directory, excluding all the enormous data files that don't change often, but backing up all the teeny weeny text files that include your irreplaceable thesis. It's really a trivial script and the only issue is that I figured out the rsync exclude syntax so you don't have to.

Usage: dobackup.sh /home/bjw /media/usbdisk/backups

This will create the directory /media/usbdisk/backups/bjw. You can get fancy and make time-stamped backup directories and so on.

If you find any of these programs useful or want to suggest changes drop me an email at bjw -at- as.arizona.edu.

Boycott Numerical Recipes.

Fight the Powerpoint.

Benjamin Weiner
Steward Observatory
Department of Astronomy
University of Arizona
Tucson, AZ  85721

email: bjw -at- as.arizona.edu