[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


SKYADJ_CUBE EXTRAP Source code in skyadj_cube.pro

SKYADJ_CUBE

Name
        SKYADJ_CUBE
Purpose
       Sky adjust the planes of a datacube.
Explanation
       When removing cosmic rays from a set of images, it is desirable that
       all images have the same sky level.    This procedure (called by
       CR_REJECT) removes the sky from each image in a data cube.
Calling Sequence
       SKYADJ_CUBE,Datacube,Skyvals,Totsky
Modified Argument
       Datacube:  3-D array with one image of same field in each plane.
                  Returned with sky in each plane adjusted to zero.
Output Parameters
       Skyvals:   Array of sky values used on each plane of datacube.
                  For a scalar sky, this parameter is a vector
                  containing the sky value for each image plane.  For a
                  vector sky, this parameter is a 2-D array where each
                  line corresponds to one image plane.
Keyword Parameters
       REGION   - [X0,X1,Y0,Y1] to restrict area used for computation
                  of sky.  Default is 0.1*Xdim, 0.9*Xdim, 0.1*Ydim,
                  0.9*Ydim.  If INPUT_MASK is specified, the two
                  specs are combined, i.e., the intersection of the
                  areas is used.
       VERBOSE  - Flag.  If set, print information on skyvals.
       NOEDIT   - Flag.  If set, return sky values without changing
                  datacube.
       XMEDSKY  - Flag.  If set, return vector sky as a function of X.
       SELECT   - Array of subscripts of planes of the cube to process.
                  (Default=all)
       EXTRAPR  - Applies only in XMEDSKY mode.
                  Subregion to use for polynomial extrapolation of sky
                  vector into portions excluded by REGION parameter.
                  (Default=first and last 10% of pixels; set to zero
                  to defeat extrapolation)
       EDEGREE  - Applies only in XMEDSKY mode.
                  Degree of polynomial for extrapolation (Default=1)
       INPUT_MASK - Cube of flags corresponding to data cube.  If used,
                  the sky computation is restricted to the smallest
                  contiguous rectangle containing all the pixels flagged
                  valid (with 1 rather than 0).
Procedure
       Uses astronomy library "sky" routine for scalar sky and
       column-by-column median for vector sky.
Revision History
   10 Jul. 1997   - Written.  R. S. Hill, Hughes STX
   20 Oct. 1997   - 1-D sky option.  RSH
    7 Aug. 1998   - SELECT keyword.  RSH
    6 Oct. 1998   - Extrapolation.  RSH
    7 Oct. 1998   - INPUT_MASK added.  RSH
   21 Oct. 1998   - Fallback to 3-sigma clipped mean if mode fails.  RSH
   22 Mar. 2000   - Combine mask with region rather having mask
                    override region.  Improve comments.  RSH
   16 June 2000   - On_error and message used.  Square brackets for array
                    subscripts.  EXTRAP included in this file.
                    WBL & RSH, 16 June 2000

EXTRAP

Name
       EXTRAP
Purpose
       This procedure fills in the ends of a one-dimensional array from
       interior portions using polynomial extrapolation.
Category
       Image processing
Calling Sequence
       EXTRAP, Deg, X, Y, Y2
Input Parameters
       Deg:   Degree of polynomial
       X:     Independent variable
       Y:     Dependent variable
Keyword Parameters
       LIMS:  3-element array giving range of X to be used to fit
              polynomial and starting point where extrapolation is
              to be substituted; if not given, you click on a plot;
              order of elements is [xmin, xmax, xstart]; if LIMS is
              specified, then program is silent
Output Parameters
       Y2:    Dependent variable with extrapolated portion filled in
Side Effects
     May pop a window for selecting range.
Revision History
     Written by RSH, RITSS, 14 Aug 98
     Spiffed up for library.  RSH, 6 Oct 98

Last modified by pro2html on 2001 April 26 at 03:13 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically