Copies bad pixels from one NDF file to another

#### Description:

This application copies bad pixels  from one NDF  file to another. It takes in two NDFs (Parameters IN and REF), and creates a third (Parameter OUT) which is a copy of IN, except that any pixel which is set bad in the DATA array of REF, is also set bad in the DATA and VARIANCE  (if available) arrays in OUT.

By setting the INVERT Parameter TRUE, the opposite effect can be produced (i.e. any pixel that is not set bad in the DATA array of REF, is set bad in OUT and the others are left unchanged).

#### Parameters:

NDF containing the data to be copied to OUT.
If TRUE, then the bad and good pixels within the reference NDF specified by Parameter REF are inverted before being used (that is, good pixels are treated as bad and bad pixels are treated as good). [FALSE]
##### OUT = NDF (Write)
The output NDF.
NDF containing the bad pixels to be copied to OUT.
The title for the output NDF. A null value will cause the title of the NDF supplied for Parameter IN to be used instead. [!]

#### Results Parameters

The number of bad pixels copied to the output NDF.

#### Examples:

copybad in=a ref=b out=c title="New image"
This creates a NDF called c, which is a copy of the NDF called a. Any bad pixels present in the NDF called b are copied into the corresponding positions in c (non-bad pixels in b are ignored). The title of c is "New image".

#### Notes:

• If the two input NDFs have different pixel-index bounds, then they will be trimmed to match before being processed. An error will result if they have no pixels in common.

#### Related Applications

KAPPA: SUBSTITUTE, NOMAGIC, FILLBAD, PASTE, GLITCH.