Currently a simple 2-dimensional planar fit is done to the pixel values surrounding ’bad’ pixels. The size of this area can be choosen by the user.

This procedure will obviously
not conserve flux (see also **all=t** below), and has to be used with caution.

**in=***in_ccd*- Input
*image(3NEMO)*file. No default. **out=***out_ccd*- Output image file. No default.
**n=**- Number of neighbor cells at one side to
use in interpolation/fit. The total number of cells used in the fit will
hence be at most
**4*n*(n+1)**(this already excludes the central pixel, n=1 uses 8 cells, n=2 uses 24 etc.) [Default:**1**]. **bad=***zvalue*- Value in the map
that should be patched. [Default:
**0.0**]. **all=t|f**- Normally only bad pixels are
patches. By setting
**all=t**all pixels are re-fitted with a planar fit, effectively smoothing the map. This will obviously not conserve flux, where applicaple, and should be used with caution. Default: f **m=**- Minimum number of neighbors needed to allow a fit. Normally 3 is enough, though this tends to add to edges. 4 would be more conservative, in which case iter>1 can be used. Default: 4
**iter=**- Minimum number of iterations. 0 is also an allowed value, in which case the image will just be copied unmodified. Default: 1
**spike=**- If given,
for each point in the map, if a point deviates more than
**spike**from all it’s 4 non-bad direct neighbors, this value will be reset to**bad**before the actually filling will take place. Default: none (not applied)

Edge effects will occur
for large values of iter, use with caution. Really a better bi-linear interpolation
is needed. See also *ccdintpol(1NEMO)*
if your irregulaties are regular enough.

10-Dec-93V1.0 CreatedPJT 22-feb-97V1.1 added bad=PJT 19-feb-02V1.2 added all=, m=PJT 3-may-03V1.3 added iter=PJT 3-may-2017V2.0 added spike=PJT