**************************
*                        *
*    HELPFILE for BLOT   *
*                        *
**************************

------------------
Basic Explanation:
------------------

The median image is the combination of the WCS aligned input images that have already had the distortion model applied. Taking the median of the aligned images allows for a statistical rejection of bad pixels from the image stack. The resulting median image can then be input for the blot task with the goal of creating 'cleaned' versions of the input images at each of their respective dither locations. These "blotted" images can then be directly compared to the original distorted input images for detection of image artifacts (i.e. bad-pixels, hot pixels, and cosmic-rays) whose locations will be saved to the output badpixel masks.


:Input: Aside from the input parameters, this step only requires opening the single median image created from all the input images.

:Output: A distorted version of the median image corresponding to each input 'chip' (extension) is written as output from this step as separate simple FITS images.

For more information on the science applications of the blot task, see the DrizzlePac Handbook:

http://drizzlepac.stsci.edu

-----------------------------------
Current User Accessable Parameters:
-----------------------------------

blot : Perform the blot operation on the median image. The output will be median smoothed images that match each input chips location. These images are then used in the cosmic ray rejection step.


blot_interp : Type of interpolation to use when blotting drizzled images back to their original WCS. Valid options include:

    * nearest: Nearest neighbor
    * linear: Bilinear interpolation in x and y
    * poly3: Third order interior polynomial in x and y
    * poly5: Fifth order interior polynomial in x and y
    * sinc: Sinc interpolation; accurate but slow

    The poly5 interpolation method has been chosen as the default because it is relatively fast and accurate.
    If 'sinc' interpolation has been selected, then the value of the parameter 'blot_sinscl' will be used to specify the size of the sinc interpolation kernel.


blot_sinscl : Size of the sinc interpolation kernel in pixels.

---------------------------------------------------------------
How to use the tasks stand alone interface in your own scripts:
---------------------------------------------------------------

These tasks are designed to work together seemlessly when run in the full AstroDrizzle interface. More advanced users may wish to create specialized scripts for their own datasets, making use of only a subset of the predefined AstroDrizzle tasks, or add additional processing, which may be usefull for their particular data. In these cases, individual access to the tasks is important.

**Something to keep in mind is that the full AstroDrizzle interface will make backup copies of your original files and place them in the OrIg/ directory of your current working directory. If you are working with the stand alone interfaces, it is assumed that the user has already taken care of backing up their original datafiles as the input file with be directly altered.

For blot, the user interface function is "blot" and has the following input:

def blot(configObj=None,wcsmap=wcs_functions.WCSMap,editpars=False,**input_dict):


Basic example of how to call sky yourself from a python command line, using the default parameter settings:

>from drizzlepac import ablot
>ablot.blot()
