comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: INTERPOL question

INTERPOL question
type: item
description: Hi All, I am using IDL Version 5.2 (SUNOS Sparc) and am having some trouble using the INTERPOL function in idl. I have several pairs of arrays of data. One of the Array pairs is an array of time and the other array holds a measurememt (i.e. data point) at the corresponding time. I have about five such array pairs (Pair1Time ; Pair1Data, Pair2Time; Pair2Data...Pair5Time ; Pair5Data) and would like to add up the Data arrays (i.e. Pair1Data + Pair2Data +...+Pair5Data), and Plot a graph of TotalDataData vs time. However these arrays are not all the same size. The Pair1 arrays have 2000 elements and the number of elements in the other array pairs vary from 1800 to 147. Thus I need to use the INTERPOL function to interpolate some of these arrays inorder to produce arrays with equal number of elements. The Pair1 arrays (Pair1Time;Pair1Data) have the most data and thus I have used them as the abscissa values for the result. I used the following command to interplolate the arrays: Pair2DataNew = Interpol (Pair2Time, Pair2Data, Pair1Time) Pair3DataNew = Interpol (Pair3Time, Pair3Data, Pair1Time) Pair4DataNew = Interpol (Pair4Time, Pair4Data, Pair1Time) Pair5DataNew = Interpol (Pair5Time, Pair5Data, Pair1Time) Sum = Pair1Data + Pair2DataNew + Pair3DataNew + Pair4DataNew + Pair5DataNew Plot, Pair1Time vs Sum However the above calls to interpol are often returning arrays with negative values, and even arrays with values of Infinity.In addition the values in the resulting arrays Pair1DataNew...Pair5DataNew) are usually completely different than in the orginal data arrays. All of the values in my original arrays are positive. The Pair1Time & Pair1Data have 2000 elements and the Pair5Data array has only 147 elements with values around .00066, but all the slots in Pair5DataNew are assigned a value of Infinity. I do not understand why the above calls to INTERPOL are returning arrays with negative values, and arrays with values of Infinity. In addition I do not unerstand why the retur…
creator: akk
date: 1999-06-09T07:00:00-00:00