IDL binning modified to use mag limits from FITS files.