Markwardt IDL Page

What's New

Programs
   Curve Fitting
   Fitting Tutorial
   Introspection
   Save Files
   Array/Set
   Printing
   Graphics
   Mathematics
   Ephemeris/Timing
   Input/Output
   Miscellaneous
   Full Listing
   Documentation

Google

Markwardt IDL Pages
Entire Web

Craig's techie blog.

Home Page of Craig Markwardt



 


IDL Mathematics





PHUNWRAP - Phase Unwrapping to Remove Cycle Jumps

PHUNWRAP unwraps a sequence of phases to produce a new series of cycle counts. Phase jumps due to crossing over the PHASE=0 boundary are removed by adding an integral number of cycles. The algorithm is based on the MATLAB "unwrap" function. Users can select the tolerance used to determine the phase jump, and can also select the definition of "1 cycle."

Mar 28 20063 kb phunwrap.pro  

QUATERNIONS - Library to Manipulate and Use Quaternions

This library provides routines to manipulate and use quaternions in IDL. Quaternions are 4-vectors that can be used to represent the orientations of one reference frame with respect to another. In practical terms, quaternions represent arbitrary three dimensional rotations. They have many advantages over rotation matrices (i.e., direction cosine matrices) and over Euler angles. Quaternions are used in computer animation to represent the orientation of the camera, and in spacecraft navigation to represent the body attitude.

The function QTCOMPOSE is used to make a quaternion from a rotation axis and angle. The functions QTANG and QTAXIS are used to extract the rotation axis and angle from an existing quaternion. The functions QTMAT and QTFIND are used to convert to and from the direction cosine matrix representation. The functions QTERP, QTPOW, QTLOG and QTEXP are used to perform smooth interpolations between orientations. The functions QTINV and QTMULT construct the quaternion inverse and product respectively. The function QTVROT transforms a 3-vector according to a quaternion rotation. QTEULER is a convenience routine to chain together multiple Euler-like rotations.

May 13 20022 kb qtang.pro  
May 13 20022 kb qtaxis.pro  
May 13 20023 kb qtcompose.pro  
Dec 17 20076 kb qterp.pro  
May 13 20025 kb qteuler.pro  
May 13 20023 kb qtexp.pro  
May 13 20025 kb qtfind.pro  
May 13 20022 kb qtinv.pro  
May 13 20023 kb qtlog.pro  
Dec 17 20073 kb qtmat.pro  
Sep 06 20075 kb qtmult.pro  
Sep 03 20073 kb qtmultn.pro  
May 13 20023 kb qtpow.pro  
May 13 20026 kb qtvrot.pro  

QPINT1D - Adaptive Numerical Integration (Quadpack)

QPINT1D adaptively calculates an approximation result to a given definite integral, hopefully satisfying a constraint on the accuracy of the solution. QPINT1D is based on the QUADPACK fortran package originally by Piessens, de Doncker, Ueberhuber and Kahaner (and implements equivalents to the QAGSE, QAGPE, QAGIE, and DQKxx fortran routines). All of these specialized integrators are combined into a single convenient callable IDL procedure.

QPINT1D integrates both IDL functions and IDL expressions. It handles integrands with known and unknown but integrable singularities, and also can compute improper integrals (i.e., integrals whose limits extend to infinity).

QPINT1D is "adaptive" in the sense that it locates regions of the integration interval which contain the highest error, and focusses its efforts on those regions. The algorithm locates these regions by successively bisecting the starting interval. Each subinterval is assigned an error estimate, and the region with the largest error estimate is subdivided further, until each subinterval carries approximately the same amount of error. Convergence of the procedure may be accelerated by the Epsilon algorithm due to Wynn.

May 02 200260 kb qpint1d.pro  

DDEABM - Integrate Ordinary Differential Equation (Adams-Bashford-Moulton)

DDEABM performs integration of a system of one or more ordinary differential equations (ODEs) using a Predictor-Corrector technique. An adaptive Adams-Bashford-Moulton method of variable order between one and twelve, adaptive stepsize, and error control, is used to integrate equations of the form:

   DF_DT = FUNCT(T, F)

T is the independent variable, F is the (possibly vector) function value at T, and DF_DT is the derivative of F with respect to T, evaluated at T. FUNCT is a user function which returns the derivative of one or more equations.

DDEABM is based on the public domain procedure DDEABM.F written by L. F. Shampine and M. K. Gordon, and available in the DEPAC package of solvers within SLATEC library.

DDEABM is used primarily to solve non-stiff and mildly stiff ODE problems, where evaluation of the user function is expensive, or high precision is demanded (close to the machine precision).

INTERFACE CHANGE NOTE (19 Apr 2004): The NGRID keyword parameter now behaves as documented. Previously it returned the number of grid points computed, and there was no way to specify the number of desired interpolated points, even though this second behavior was the documented behavior of NGRID. The new NOUTGRID keyword is used to return the the number of grid points computed.

Apr 19 2004110 kb ddeabm.pro  

CHEB - Approximation and interpolation using Chebyshev polynomials

This is a set of three IDL functions, used for the interpolation and approximation of mathematical functions over finite intervals by Chebyshev polynomials. The approximating function is:

f(x) = Sum[ c_j T_j(x) ]

where "c_j" are the Chebyshev coefficients and T_j(x) are the orthogonal Chebyshev polynomials. By default the interval is [-1,1], but this can be changed with the INTERVAL keyword.

Chebyshev approximations are most appropriate when a known smooth function is expensive to calculate. With a small number of function evaluations, the Chebyshev coefficients can be determined once, and then the Chebyshev series can be subsequently evaluated quickly for many abcissae.

The approximation method proceeds in two steps. First, the user must estimate the Chebyshev coefficients. CHEBCOEF is normally used in this case, for functions which can be evaluated to full machine precision at arbitrary abcissae. For noisy or tabulated data, users should use CHEBFIT instead. For data tabulated on a uniform grid, the CHEBGRID function is appropriate. The result of either of these functions is an array of coefficients. The second step involves computing the function value at the desired abcissae, for which the CHEBEVAL function is used. Several mechanisms are provided to the user to control the approximation error.

LEGCHEB can estimate the coefficients of the Legendre series if the Chebyshev series coefficients are already known.

May 13 200212 kb chebcoef.pro  
Jan 30 20054 kb chebeval.pro  
Aug 10 20038 kb chebfit.pro  
Nov 06 200216 kb chebgrid.pro  
Sep 25 20024 kb legcheb.pro  

QRFAC - Linear Least Squares Solutions using QR decomposition

Given an MxN matrix A (M>N), the procedure QRFAC computes the QR decomposition (factorization) of A. This factorization is useful in least squares applications solving the equation, A ## x = B. Together with the procedure QRSOLV, this equation can be solved in a least squares sense.

The QR factorization produces two matrices, Q and R, such that

A = Q ## R

where Q is orthogonal such that TRANSPOSE(Q)##Q equals the identity matrix, and R is upper triangular. This procedure does not compute Q directly, but returns the more-compact Householder reflectors, which QRSOLV applies in constructing the solution.

The solution technique is to first compute the factorization using QRFAC, which yields the orthogonal matrix Q and the upper triangular matrix R. Then the solution vector, X, is computed using QRSOLV.

Pivoting can be performed using the PIVOT keyword.

Dec 17 20078 kb qrfac.pro  
Jul 16 20044 kb qrsolv.pro  

MCHOLDC - Modified Cholesky factorization of a symmetric matrix

Given a symmetric matrix A, the MCHOLDC procedure computes the factorization:

A + E = TRANSPOSE(U) ## D ## U

where A is the original matrix (optionally permuted if the PIVOT keyword is set), U is an upper triangular matrix, D is a diagonal matrix, and E is a diagonal error matrix.

The standard Cholesky factorization is only defined for a positive definite symmetric matrix (this is true both mathematically, and for the standard IDL routine CHOLDC). If the input matrix is positive definite then the error term E will be zero upon output. The user may in fact test the positive-definiteness of their matrix by factoring it and testing that all terms in E are zero.

The decomposition from MCHOLDC can now be used to solve problems with the built-in IDL function CHOLSOL, if the CHOLSOL keyword is set.

Mar 22 200210 kb mcholdc.pro  

CROSSPN - Efficient vector cross products of many terms

The function CROSSPN computes the vector cross product (outer product). The difference between CROSSPN and the IDL library function CROSSP, is that CROSSPN allows more than one cross product to be computed at one time (i.e., it is vectorized).

Thus, in the expression "C = CROSSPN(A, B)" the vector cross product is computed as C = A x B. Because CROSSPN is vectorized, the vector cross product of any combination of 3-vectors and 3xN arrays can be computed.

Mar 22 20022 kb crosspn.pro  


Copyright © 1997-2004 Craig B. Markwardt
Last Modified on 2008-03-29 14:20:22 by Craig Markwardt