NAME: fitsbin PURPOSE: Software binning of an image in FITS file format. DESCRIPTION: CATEGORY: CCD data processing CALLING SEQUENCE: fitsbin,file,INPATH=inpath,OUTPATH=outpath,BINFAC=binfac INPUTS: file - String (or array) of name of file to be binned. If the file name includes a trailing .fits, the .fits is option on the file name. The output file name will not include the .fits tag. OPTIONAL INPUT PARAMETERS: BINFAC - Binning factor (default=2). INPATH - String, path to directory where data are to be read from. Default=current directory OUTPATH - String, path to directory where data are to be written. Default=current directory Note: if INPATH and OUTPATH end up being the same, then outpath is changed by adding the directory name, binned, the end of the path. WARNING: No attempt is made to resolved different means of expressing the same directory. The test is made just by a simple string comparison. KEYWORD INPUT PARAMETERS: OUTPUTS: KEYWORD OUTPUT PARAMETERS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: MODIFICATION HISTORY: Written by Marc W. Buie, Lowell Observatory, 2000/06/22 2003/10/01, MWB, converted to IDL file_mkdir calls