Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.
﻿ >  Docs Center  >  Libraries  >  ASTROLIB  >  TRANSFORM_COEFF

TRANSFORM_COEFF

Name

TRANSFORM_COEFF()

Purpose

Compute new polynomial coefficients under a linear transformation

Explanation

Suppose one has a (nonlinear) polynomial (similar to the POLY() function)
y = C + C*x + C*x^2 + C*x^3 + ...
and one has a linear transformation in X
x = alpha*x' + beta
This function computes the new polynomial coefficients under the linear
transformation.

Calling Sequence

newcoeff = TRANSFORM_COEFF( coeff, alpha, beta)

Inputs

Coeff - vector of polynomial coefficients (as with POLY()). The
degree of the polynomial is N_elements(coeff) - 1
Alpha, Beta - numeric scalars defining the linear transformation in X

Outputs

NewCoeff - Vector (same size as Coeff) giving the new polynomial
coefficients

Example

Suppose one has polynomial mapping a nonlinear distortion in the X
direction of a spectrum
y = 0.2 + 1.1*x + 0.1*x^2
if one rebins the spectrum to half the size then the linear transformation
is x = 2.*x'
so alpha = 2 and beta = 0
The new coefficients are
IDL> print, transform_coeff([0.2,1.1,0.1],2.,0)
==> [0.2, 2.2, 0.4]

Method

Performs a binomial expansion of the polynomial and collect like terms