skyinterp.cl

Name

skyinterp -- interpolate over regions where background is strong

Usage

skyinterp inimage outimage skyimage

Parameters

inimage
Names of existing images to be cleaned
outimage
Names of cleaned images to produce
skyimage
Name of reference sky spectrum
thresh
Threshold sky value. Pixels in the input images which correspond to pixels in the skyimage having sky values above the threshold value will be interpolated over.

Description

This task can be used to effectively clean extracted spectra of regions which are degraded to to imperfect background subtraction in the vicinity of strong emission features. Such regions commonly occur when spectra of faint objects are reduced.

First, inspect a plot of the reference sky spectrum. Determine the flux level which defines, in your judgement, a "strong" emission line which is likely to cause trouble in subtraction. Set the thresh parameter for this task to that value.

For each input image, this task will perform the following operations:

Examples

  1. Replace sky-dominated pixels in the image foo.fits based on sky values from the file sky.fits, creating the output image clean.fits:
        donspec foo.fits clean.fits sky.fits thresh=15000
    The plot below shows NIRSPEC data before (white) and after (red) cleaning via this task.

    Screen shot of dirty and cleaner data

See Also

imexpr
The cl script skyinterp.cl
The package wmkonspec