% @(#)rebin_ti.hlq	19.1 (ESO-IPG) 02/25/03 14:03:39 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      rebin_ti.hlq
%.AUTHOR     MR, IPG/ESO
%.KEYWORDS   MIDAS, help files, REBIN/TI
%.PURPOSE    On-line help file for the command: REBIN/TI
%.VERSION    1.0  29-OCT-1985 : Creation, MR
%----------------------------------------------------------------
\se
SECTION./TI
\es\co
REBIN/TI						29-OCT-1985 MR
\oc\su
REBIN/TI outima intab i,d[,b] refima [func] [param] [intop]
	nonlinear rebin Table to Image
\us\pu
Purpose:  
            Nonlinear rebinning of 1D data.
            Table to Image transformation.
\up\sy
Syntax: 
            REBIN/TI outima intab i,d[,b] refima [func] [param] [intop]
\ys\pa
            outima = name of 1-dim output image,
                     will be created by this command
\ap\pa
            intab = name of input table
\ap\pa
            refima = reference image;
                     this image must have the desired start, step value
                     in descr. START and STEP
\ap\pa
            i = column reference for independent variable
\ap\pa
            d = column reference for dependent variable
\ap\pa
            b = [optional] column reference for binwidth
\ap\pa
            func = function code (see below) for the mapping of
                   OUTPUT indep.variable to INPUT indep.variable
                   defaulted to LIN
\ap\pa
            param = parameters for the function used, defaulted to 0.,1.
\ap\pa
            intop = interpolation option (se below), defaulted to PIX
\ap\sa
See also: 
            CONVERT/TABLE, INTERPOLATE/TI
\as\no
Note:     
            This command should be used, if the new stepsize is larger
            than the current stepsize in column `i' (i.e. the difference
            between adjacent rows), because we don an integration over
            pixels.
            If the stepsize is NOT larger, the command INTERPOLATE/TI 
            should be used instead, since that is doing a resampling.

            Values in the column used as independent variable must be
            monotonically increasing or decreasing. Best results are obtained,
            if they are increasing.

            Available FUNCTIONS    (parameters A, B, C, ..... )
\\
            LIN     x(old) = A + Bx
\\
            POL     x      = A + Bx +Cxx +  .... (up to 16 coeff)
\\
            INV     x      = A + B/x
\\
	    EXP     x      = A + B*EXP(Cx)
\\
            DEX     x      = A + B*10.**(Cx)
\\
	    LOG     x      = A + B*LOG(Cx)
\\
            DLG     x      = A + B*LOG10(x)
\\
	    IPO     x      = A + B/(x-D) + C/(x-D)**2 + ...
\\
	    U01     x      = user defined function of x.

	    INTOP  (interpolation options)

	    PIX     take fractions of pixel areas
	    LIN     interpolate linearly and add polygons
	    SPG     interpolate with hermite polynomials
                    and integrate with Gaussian formula

	            Recommended option is SPG. LIN is faster
                    and may provide sufficient accuracy whenever
                    well behaved data are rebinned to larger
                    stepsizes. PIX (same speed as LIN) will give
                    adequate results only when rebinning from
                    an oversampled array (very smal bins)
	            into large bins

            Defaults:    REBIN/TI OUT IN \#1,\#2,\#3 REF LIN 0.,1. PIX
\on\exs
Examples:
\ex
            CREATE/IMAGE refima 1,2000 0.123,0.2 NODATA
              We don't need any data in the ref. frame.
            REBIN/TI resima intab :X,:Y refima 
              Create image `resima.bdf' from column :Y of table `intab.tbl'
              corresponding to :X resampled with stepsize 0.2.
              The delta in :X between adjacent rows is assumed to be
              less than 0.2 (otherwise we should have used INTERPOLATE/TI 
              instead).
\xe \sxe

