[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

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


REMOVE Source code in remove.pro

REMOVE

Name
       REMOVE
Purpose
       Contract a vector or up to 7 vectors by removing specified elements
Calling Sequence
       REMOVE, index, v1,[ v2, v3, v4, v5, v6, v7]
Input Parameters
       INDEX - scalar or vector giving the index number of elements to
               be removed from vectors.  Duplicate entries in index are
               ignored.    An error will occur if one attempts to remove
               all the elements of a vector.
Parameters
       v1 - Vector or array.  Elements specifed by INDEX will be
               removed from v1.  Upon return v1 will contain
               N fewer elements, where N is the number of values in
               INDEX.
 OPTIONAL INPUT-OUTPUTS:
       v2,v3,...v7 - additional vectors containing
               the same number of elements as v1.  These will be
               contracted in the same manner as v1.
Example
       (1) If INDEX = [2,4,6,4] and V = [1,3,4,3,2,5,7,3] then after the call
               IDL> remove,index,v
       V will contain the values [1,3,3,5,3]
       (2) Suppose one has a wavelength vector W, and three associated flux
       vectors F1, F2, and F3.    Remove all points where a quality vector,
       EPS is negative
               IDL> bad = where( EPS LT 0, Nbad)
               IDL> if Nbad GT 0 then remove, bad, w, f1, f2, f3
Procedure
       If more than one element is to be removed, then HISTOGRAM is used
       to generate a 'keep' subscripting vector.    To minimize the length of
       the subscripting vector, it is only computed between the minimum and
       maximum values of the index.   Therefore, the slowest case of REMOVE
       is when both the first and last element are removed.
Revision History
       Written W. Landsman        ST Systems Co.       April 28, 1988
       Cleaned up code          W. Landsman            September, 1992
       Converted to IDL V5.0   W. Landsman   September 1997
       Major rewrite for improved speed   W. Landsman    April 2000

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

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

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