NAME: imsalt PURPOSE: (one line only) Implants fake point-source images into an image of the sky. DESCRIPTION: IMSALT will take four vectors of the same length (exten, x_pos, y_pos, and scale) that describe the false objects to be put in FITS images of real stars. These vectors are applied in order to insert psf(s) of the appropriate parameters in the appropriate image(s) or extension. IMSALT then writes a FITS file of the same name, with the false data inserted. It is important to specify the paths of the input files and/or the two output files, since SALTDES resists overwriting the original data; it will not run if the name and path of the output is the same as the input. CATEGORY: CCD data processing CALLING SEQUENCE: imsalt,imname,x_pos,y_pos,scale,exten INPUTS: imname :String, the name of the fits file to be read x_pos :Vector, x locations on image y_pos :Vector, y locations on image mag :Vector, magnitude of fake objects exten :Vector, chooses which extensions are to contain false objects and how many in each. EX: exten=[1,1,7,5] OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: KEYFILE - Name of a file containing a correspondence list. This list associates a set of standard names with the actual keyword names found in a FITS file header. If this keyword is omitted, a default list is used, as if a file with the following contents had been supplied: AIRMASS K AIRMASS DATE K DATE-OBS DATETMPL T DD-MM-YYYY EXPDELTA V 0.0 EXPTIME K EXPTIME FILTER K FILTERS FILENAME K CCDFNAME OBJECT K OBJECT UT K UT The middle column is a flag. It may be K, for Keyword, T, for Template, or V, for Value. If it is V, the contents of the third field on that line should make sense for the name in the first field. IMDIR :String, the path to the original images- DEFAULT:current dir PSFDIR :String, the path to the psfs- DEFAULT:SRCDIR+'/psf' SRCDIR :String, the path to the src and srd files- DEFAULT:'' OUTDIR :String, set the path for the output data file. IMSALT will not run if imdir=outdir - DEFAULT:'salted/' NOPLOTS :Flag, if set suppresses plots of the data, the false data, the salted data, and the data with 'colored salt.' SALTFLAG :Flag, if set this to make a note in the header that the file has been salted (add keyword SALTED=T) QUIET :Flag, if set will suppress chatty printed output. OUTPUTS: KEYWORD OUTPUT PARAMETERS: SIDE EFFECTS: RESTRICTIONS: The inputs x_pos, y_pos, scale, and exten must have the same length. Exten is used only with group FITS image files. This program requires that PSFs be pre-generated from the images (see PSFGEN.PRO). The psf files must adheare to the following restrictions. The psfs must have the same basic format as the data files, meaning that they must be multi-extension if the data files are multi-extension. The psf header must contain the following information: XCEN,YCEN - x and y location of the object on the psf FWHM - fwhm of the object MAX - peak pixel value of the psf FLUX - flux from the psf in OBJRAD (also in psf header) The psf name must be the same as the filename, except with a .psf appended (replaces .fits tag if file name includes that). PROCEDURE: MODIFICATION HISTORY: 2004/07/14, Written by Maureen Teyssier, REU Lowell Observatory 2004/07/15, MWB, incorporated into library.